Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart Guide Fails Because of Missing Redis #11880

Open
1 task done
DaGeRe opened this issue Dec 30, 2024 · 9 comments
Open
1 task done

Quickstart Guide Fails Because of Missing Redis #11880

DaGeRe opened this issue Dec 30, 2024 · 9 comments

Comments

@DaGeRe
Copy link
Contributor

DaGeRe commented Dec 30, 2024

Prerequisites

  • I have checked the FAQ, and issues and found no answer.

What version of pinpoint are you using?

v3.0.1

Describe the bug

I am just getting started and tried to execute the quickstart guide (https://pinpoint-apm.gitbook.io/pinpoint/getting-started/quickstart). This doesn't work, the collector doesn't start and seems to require redis (and I didn't find any documentation for this). Also, the installation guide (https://pinpoint-apm.gitbook.io/pinpoint/getting-started/installation#3-pinpoint-collector) didn't help, always the collector is shutting down.

What did you do to trigger the bug?

Steps to reproduce, for example:

  1. Started hbase:
 wget https://dlcdn.apache.org/hbase/2.6.1/hbase-2.6.1-bin.tar.gz
 tar -xvf hbase-2.6.1-bin.tar.gz
 cd hbase/hbase-2.6.1
 
 wget https://raw.githubusercontent.com/pinpoint-apm/pinpoint/refs/heads/master/hbase/scripts/hbase-create.hbase
 
 bin/hbase shell hbase-create.hbase
 bin/start-hbase.sh
  1. Started kafka:
   if [ ! -d kafka_2.13-3.9.0 ]
   then
   	wget https://dlcdn.apache.org/kafka/3.9.0/kafka_2.13-3.9.0.tgz
   	tar -xvf kafka_2.13-3.9.0.tgz
   fi
   cd kafka_2.13-3.9.0

   KAFKA_CLUSTER_ID="$(bin/kafka-storage.sh random-uuid)"
   bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/kraft/reconfig-server.properties
   bin/kafka-server-start.sh config/kraft/reconfig-server.properties &> ${BASE_DIR}/logs/kafka.log &
   
   echo "Waiting for Kafka start..."
   sleep 3
   bin/kafka-topics.sh --create --topic inspector-stat-agent-00 --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
   bin/kafka-topics.sh --create --topic inspector-stat-app --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
  1. Started Pinot:
   PINOT_VERSION=1.1.0 #set to the Pinot version you decide to use
   if [ ! -d apache-pinot-$PINOT_VERSION-bin ]
   then
      wget https://downloads.apache.org/pinot/apache-pinot-$PINOT_VERSION/apache-pinot-$PINOT_VERSION-bin.tar.gz
      tar -zxvf apache-pinot-$PINOT_VERSION-bin.tar.gz
   fi
	
   cd apache-pinot-$PINOT_VERSION-bin
   ./bin/pinot-admin.sh QuickStart -type batch &> ${BASE_DIR}/logs/pinot.log

Afterwards, I executed ./multi-table.sh 0 1 http://localhost:9000 in a different terminal, where I changed the REALTIME template to 1 replica (https://github.com/kieker-monitoring/moobench/blob/f4b14fbacf7416465730701dd626065d0f3577d1/frameworks/pinpoint-java/scripts/template_REALTIME.json#L8) and the port to Kafkas default port 9092 (https://github.com/kieker-monitoring/moobench/blob/f4b14fbacf7416465730701dd626065d0f3577d1/frameworks/pinpoint-java/scripts/template_REALTIME.json#L33) -- it would also be nice if this was specified in the quickstart guide in a way the user doesn't have to fiddle with it (so it would be possible to specify that Kafka listens to a different port, or to change the port in the template).
4. Start the collector:
wget https://repo1.maven.org/maven2/com/navercorp/pinpoint/pinpoint-collector-starter/3.0.1/pinpoint-collector-starter-3.0.1-exec.jar

This results in

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.                                          
12-30 12:15:25.025 [           main] ERROR o.s.b.SpringApplication                 :851 -- Application run failed                                       
org.springframework.context.ApplicationContextException: Failed to start bean 'redisMessageListenerContainer'                                                                                                      
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:291) ~[spring-context-6.1.5.jar!/:6.1.5]                                                           
        at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:471) ~[spring-context-6.1.5.jar!/:6.1.5]                                              
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]                                                                                                                                                     
        at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:260) ~[spring-context-6.1.5.jar!/:6.1.5]                                                        
        at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:205) ~[spring-context-6.1.5.jar!/:6.1.5]        

It seems like for some reason, no connection to redis can be started - which makes sense, since I didn't start Redis and the quickstart guide doesn't specify to do so. Since the collector stops, I think starting the web started and the agent doesn't make sense.

My guess would be that there is another configuration needed, that potentially disables Redis usage, or that Redis should be started and configured - but in any case, this needs to be changed in the quickstart and installation guide.

Expected behavior

I expect the quickstart demo to just show some spans pinpoint gathered.

Logs

The full log is here: collector-start.txt

@donghun-cho
Copy link
Contributor

to disable redis usage add pinpoint.modules.realtime.enabled=false to configuration file or jvm option
this option is for Realtime Request Monitoring https://pinpoint-apm.gitbook.io/pinpoint/documents/realtime

If you are using the web-starter module, please add this property as well.
I checked that Realtime is not disabled by default in both the collector-starter and web-starter modules.

Thank you for the detailed explanation and feedback. I will further check this issue.

@DaGeRe
Copy link
Contributor Author

DaGeRe commented Jan 1, 2025

Thanks for the hint, adding -Dpinpoint.modules.realtime.enabled=false indeed stops the collector from exiting overall. Nevertheless, it still displays the Failed to start bean 'redisMessageListenerContainer' exception -- probably this needs some fixing.

Taking these changes, the following script seems so start the pinpoint services for me correctly:

function startHBase() {
   HBASE_VERSION=2.6.1
   if [ ! -d $BASE_DIR/hbase-$HBASE_VERSION ]
   then
      wget https://dlcdn.apache.org/hbase/$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz
      tar -xvf hbase-$HBASE_VERSION-bin.tar.gz
      cd hbase-$HBASE_VERSION
      wget https://raw.githubusercontent.com/pinpoint-apm/pinpoint/refs/heads/master/hbase/scripts/hbase-create.hbase
      cd $BASE_DIR
   fi

   cd hbase-$HBASE_VERSION
   bin/start-hbase.sh
   
   if [ ! -f hbase-create.hbase ]
   then
      wget https://raw.githubusercontent.com/pinpoint-apm/pinpoint/refs/heads/master/hbase/scripts/hbase-create.hbase
   fi
   
   bin/hbase shell hbase-create.hbase
}

function startPinot() {
   PINOT_VERSION=1.2.0 #set to the Pinot version you decide to use
   if [ ! -d apache-pinot-$PINOT_VERSION-bin ]
   then
      wget https://downloads.apache.org/pinot/apache-pinot-$PINOT_VERSION/apache-pinot-$PINOT_VERSION-bin.tar.gz
      tar -zxvf apache-pinot-$PINOT_VERSION-bin.tar.gz
   fi
	
   cd apache-pinot-$PINOT_VERSION-bin
   ./bin/pinot-admin.sh QuickStart -type batch &> ${BASE_DIR}/logs/pinot.log &
}

function startKafka() {
   if [ ! -d kafka_2.13-3.9.0 ]
   then
   	wget https://dlcdn.apache.org/kafka/3.9.0/kafka_2.13-3.9.0.tgz
   	tar -xvf kafka_2.13-3.9.0.tgz
   fi
   cd kafka_2.13-3.9.0

   KAFKA_CLUSTER_ID="$(bin/kafka-storage.sh random-uuid)"
   bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/kraft/reconfig-server.properties
   bin/kafka-server-start.sh config/kraft/reconfig-server.properties &> ${BASE_DIR}/logs/kafka.log &
   
   echo "Waiting for Kafka start..."
   sleep 3
   bin/kafka-topics.sh --create --topic inspector-stat-agent-00 --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
   bin/kafka-topics.sh --create --topic inspector-stat-app --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
}

function startCollectorAndWeb() {
   PINPOINT_VERSION=3.0.1

   if [ ! -f pinpoint-collector-starter-${PINPOINT_VERSION}-exec.jar ]
   then
      wget https://repo1.maven.org/maven2/com/navercorp/pinpoint/pinpoint-collector-starter/${PINPOINT_VERSION}/pinpoint-collector-starter-${PINPOINT_VERSION}-exec.jar
   fi
   
   java -Dpinpoint.zookeeper.address=localhost -Dpinpoint.modules.realtime.enabled=false -jar pinpoint-collector-starter-${PINPOINT_VERSION}-exec.jar &> ${BASE_DIR}/collector.log &
   
   if [ ! -f pinpoint-web-starter-${PINPOINT_VERSION}-exec.jar ]
   then
      wget https://repo1.maven.org/maven2/com/navercorp/pinpoint/pinpoint-web-starter/${PINPOINT_VERSION}/pinpoint-web-starter-${PINPOINT_VERSION}-exec.jar
   fi
   
   java  -Dpinpoint.zookeeper.address=localhost  -Dpinpoint.modules.realtime.enabled=false -jar pinpoint-web-starter-${PINPOINT_VERSION}-exec.jar &> ${BASE_DIR}/web-starter.log &
}

My next goal is to execute the quickstart demo. Unfortunately, this doesn't compile:


[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.navercorp.pinpoint:pinpoint-quickstart-testapp:3.1.0-SNAPSHOT (/home/reichelt/nvme/workspaces/kiekerworkspace/pinpoint/quickstart/testapp/pom.xml) has 3 errors
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-thymeleaf:jar is missing. @ line 40, column 21
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 44, column 21
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-tomcat:jar is missing. @ line 48, column 21

My first try was to fix the dependencies, but according to the quickstart version, some Java imports needed to be fixed. The PR #11885 fixes the compilation.

If I run this using ./mvnw clean package && java -Dserver.port=7070 -jar target/pinpoint-quickstart-testapp-3.1.0-SNAPSHOT.jar, the compilation succeeds, but I cannot start the demo app:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'apisController': Invocation of init method failed; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because the return value of "org.springframework.web.servlet.mvc.method.RequestMappingInfo.getPatternsCondition()" is null
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) ~[spring-beans-5.3.28.jar!/:5.3.28]        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920) ~[spring-context-5.3.28.jar!/:5.3.28]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.28.jar!/:5.3.28]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.13.jar!/:2.7.13]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.13.jar!/:2.7.13]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.13.jar!/:2.7.13]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.13.jar!/:2.7.13]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.13.jar!/:2.7.13]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.13.jar!/:2.7.13]
        at com.navercorp.pinpoint.testapp.TestApp.main(TestApp.java:29) ~[!/:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[na:na]
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) ~[pinpoint-quickstart-testapp-3.1.0-SNAPSHOT.jar:na]
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) ~[pinpoint-quickstart-testapp-3.1.0-SNAPSHOT.jar:na]
        at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) ~[pinpoint-quickstart-testapp-3.1.0-SNAPSHOT.jar:na]
Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because the return value of "org.springframework.web.servlet.mvc.method.RequestMappingInfo.getPatternsCondition()" is null
        at com.navercorp.pinpoint.testapp.controller.ApisController.initApiMappings(ApisController.java:52) ~[!/:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[na:na]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) ~[spring-beans-5.3.28.jar!/:5.3.28]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ~[spring-beans-5.3.28.jar!/:5.3.28]
        ... 25 common frames omitted

Unfortunately, I am not a spring expert, do you have a fix for this?

@donghun-cho
Copy link
Contributor

I've fixed the problem and made some changes, but some outdated APIs will not work. 4eb6a07

@DaGeRe
Copy link
Contributor Author

DaGeRe commented Jan 3, 2025

Thanks, with this update, the example app starts, and using java -Dserver.port=7070 -javaagent:pinpoint-agent-3.0.1/pinpoint-bootstrap-3.0.1.jar -Dpinpoint.agentId=test-agent -Dpinpoint.applicationName=TESTAPP -jar target/pinpoint-quickstart-testapp-3.1.0-SNAPSHOT.jar, I can also see it in Pinpoint web.

But the only thing I see right now (after clicking around in the application) is the following:

grafik

Looking at the inspector yields empty graphs and the following error:

Something went wrong:
/api/inspector/applicationStat/chartList

Error querying database. Cause: java.sql.SQLException: Failed to execute query : SELECT DISTINCT(primaryTag) FROM inspectorStatApp WHERE sortKey = 'TESTAPP#dataSource' AND fieldName = 'activeConnectionSize' AND roundedEventTime BETWEEN 1735896180000 AND 1735896480000 LIMIT 2147483647 ### The error may exist in URL [jar:file:/home/reichelt/nvme/workspaces/kiekerworkspace/pinpoint/start-env/pinpoint-web-starter-3.0.1-exec.jar!/BOOT-INF/lib/pinpoint-inspector-web-3.0.1.jar!/inspector/web/mapper/pinot/applicationInspectorMapper.xml] ### The error may involve com.navercorp.pinpoint.inspector.web.dao.pinot.PinotApplicationStatDao.selectTagInfo-Inline ### The error occurred while setting parameters ### SQL: SELECT DISTINCT(primaryTag) FROM inspectorStatApp WHERE sortKey = ? AND fieldName = ? AND roundedEventTime BETWEEN ? AND ? ### Cause: java.sql.SQLException: Failed to execute query : SELECT DISTINCT(primaryTag) FROM inspectorStatApp WHERE sortKey = 'TESTAPP#dataSource' AND fieldName = 'activeConnectionSize' AND roundedEventTime BETWEEN 1735896180000 AND 1735896480000 LIMIT 2147483647 ; uncategorized SQLException; SQL state [null]; error code [0]; Failed to execute query : SELECT DISTINCT(primaryTag) FROM inspectorStatApp WHERE sortKey = 'TESTAPP#dataSource' AND fieldName = 'activeConnectionSize' AND roundedEventTime BETWEEN 1735896180000 AND 1735896480000 L

(I cannot copy the whole error).

I would like to see the traces and spans of my call, i.e., which method was called, when did the method start and when did it end (like Zipkin would do it). According to the FAQ on https://github.com/pinpoint-apm/pinpoint-apm.github.io/blob/main/faq.md, I can also set profiler.entrypoint, so I changed the entrypoint line in pinpoint-agent-3.0.1/profiles/release/pinpoint.config to profiler.entrypoint=com.navercorp.pinpoint.testapp.TestApp. Nevertheless, no spans appear, and I can't find a documentation that describes how to obtain them.

Could you give me an hint how to also collect the spans (maybe starting Redis)?

@donghun-cho
Copy link
Contributor

to check span data

  1. send some data by access to test app
  2. drag dots in pinpoint web scatter chart
image
  1. click transaction
image

you don't need to set profiler.entrypoint because test app is spring boot and pinpoint has a plugin for spring boot

inspector page error

The Inspector page displays metric data (e.g., Heap Usage, CPU Usage).
The probable cause of this error is a missing Pinot table.
For more details, refer to https://pinpoint-apm.gitbook.io/pinpoint/documents/new-inspector#id-2.2.b-create-pinot-tables

@DaGeRe
Copy link
Contributor Author

DaGeRe commented Jan 3, 2025

Thanks for the hint. Creating the requests and seeing them in the transaction view works, I've set -Dprofiler.sampling.counting.sampling-rate=1, and so I see every transaction.

Unfortunately, for some reason, /consumeCpu is not traced - is there any specific reason for this?

Furthermore, I changed the TestApp like this:

public class TestApp {

    public static void main(String[] args) {
        method1();
        SpringApplication.run(TestApp.class, args);
    }

    public static void method1(){
        method2();
    }

    public static void method2() {
        System.out.println("Test");
    }
}

Furthermore, I tried to change the entrypoint using profiler.entrypoint=com.navercorp.pinpoint.testapp.TestApp.main. Still, the calls to method1 and method2 do not appear - is there any way to also trace these regular Java calls?

Additionally, I tried to get the internal method calls directly in the HTTP calls by extending the SimpleController:

    @RequestMapping("/sleep3")
    @Description("Call that takes 3 seconds to complete.")
    public Map<String, Object> sleep3() throws InterruptedException {
        Thread.sleep(3000);

        Map<String, Object> map = new HashMap<>();
        map.put("message", "ok");
        for (int i = 0; i < 10; i++){
           myMethod();
        }
        return map;
    }

    public void myMethod() throws InterruptedException {
       Thread.sleep(100);
    }

Still, I do not see any calls to myMethod (but it affects the call time). Is there any way to instrument these simple calls?

And regarding the metric display, I tried to add all tables, but I didn't manage to get inspectorStatApp. When I try to add it, the following happens:

curl -X 'POST' 'http://localhost:9000/schemas?override=true&force=false' -H 'accept: application/json' -H 'Content-Type: application/json' -d @pinot-inspector-stat-application-schema.json 
{"unrecognizedProperties":{},"status":"inspectorStatApp successfully added"}

curl -X 'POST' 'http://localhost:9000/schemas?override=true&force=false' -H 'accept: application/json' -H 'Content-Type: application/json' -d @pinot-inspector-stat-application-realtime-table.json 
{"code":400,"error":"Invalid schema. Reason: 'schemaName' should not be null or empty"}

I am surprised by this, since the schemaName in https://github.com/pinpoint-apm/pinpoint/blob/master/inspector-module/inspector-collector/src/main/pinot/pinot-inspector-stat-application-realtime-table.json is clearly defined. Do you have a hint how to fix this?

@donghun-cho
Copy link
Contributor

I will only answer what I can at the moment. For other matters, I need to try things out.

for tracking myMethod() at /sleep3

using profiler.include might work.
usage

###########################################################
# user defined classes #
###########################################################
# Specify classes and methods you want to profile here.
# Include
# It is designed for plugin debugging.
# Many classes of methods can be tracked.
# Tracks all public methods of the target class.
# Needs to be a comma separated list of fully qualified class names, or fully qualified package names with wild card class.
profiler.include=
# Ex: foo.bar.MyClass, foo.baz.*
# Entry point
# Tracks libraries that pinpoint plugin does not support.
# The target method serves as an entry point for tracking.
# Excluding the abstract and native method.
# Needs to be a comma separated list of fully qualified method names. Wild card not supported.
profiler.entrypoint=
# Ex: foo.bar.MyClass.myMethod, foo.bar.MyClass.anotherMethod

creating inspectorStatApp pinot table

use /tables instead of /schemas

@DaGeRe
Copy link
Contributor Author

DaGeRe commented Jan 7, 2025

Thanks for the hints. I tried setting

profiler.include=com.navercorp.pinpoint.testapp.controller.SimpleController

and

profiler.entrypoint=com.navercorp.pinpoint.testapp.controller.SimpleController.sleep3

but both (and their combinations) didn't make profiling work.

Additionally, I searched the pinpoint code base for the solution. I found this: https://github.com/pinpoint-apm/pinpoint-plugin-sample/blob/master/plugins/sample/src/main/java/com/navercorp/pinpoint/plugin/sample/_02_Injecting_Custom_Interceptor/Sample_02_Inject_Custom_Interceptor.java which in turn recommends to use https://github.com/pinpoint-apm/pinpoint/blob/master/agent-module/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/interceptor/SpanEventSimpleAroundInterceptorForPlugin.java#L30 for that purpose. Unfortunately, I couldn't find any subclass that does pure tracing of methods, all of them are suited towards some framework.

Additionally, I tried starting redis (using docker run -d --name my-redis -p 6379:6379 redis), and enabled realtime data, but that didn't change anything (but with started redis, the collector doesn't crash with realtime data enabled).

The logs of my run are here:
pinpoint.log
pinpoint_stat.log

And I see the BeforeMethodInterceptor being called - but I don't see from where, and I also didn't see in the code how this is configured.

Do you have another idea, maybe also where to search in the code?

Thanks also for the hint regarding the inspectorStatApp. This works now. Just needed to change the kafka port in "stream.kafka.broker.list": "localhost:9092".

@DaGeRe
Copy link
Contributor Author

DaGeRe commented Jan 7, 2025

After extensive reading of the code, I found the issue: profiler.pinpoint.base-package needs to be set to the package (from

).

I'll create a PR to document this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants