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

Take a minute to start #13326

Open
SeakyLuo opened this issue Feb 17, 2025 · 3 comments
Open

Take a minute to start #13326

SeakyLuo opened this issue Feb 17, 2025 · 3 comments
Labels
needs author feedback Waiting for additional feedback from the author

Comments

@SeakyLuo
Copy link

Hi, after adding opentelemetry-javaagent.jar to the init command, it takes a minute longer to start the jvm. What are possible causes for that and how can I analyze and reduce the slow start? It doesn't seem to vary much between servers of different configs, so I think there might be some network issue during the startup? But it did report trace.

nohup java -javaagent:"$workspace"/AliyunJavaAgent/aliyun-java-agent.jar \
           -Dmse.licenseKey="$licenseKey" \
           -Dmse.appName="$appKey" \
           -Dprofiler.micro.service.mse.version=pro \
           -Dmse.namespace="$profile" \
           -Dmse.enable=true \
           -javaagent:"$workspace"/opentelemetry-javaagent.jar \
           -Dotel.resource.attributes=service.name="$trace_service_name",service.version=v1.0.0,deployment.environment="$profile" \
           -Dotel.exporter.otlp.protocol=http/protobuf \
           -Dotel.exporter.otlp.traces.endpoint=http://tracing-analysis-dc-hz-internal.aliyuncs.com/xxx \
           -Dotel.exporter.otlp.metrics.endpoint=http://tracing-analysis-dc-hz-internal.aliyuncs.com/xxx \
           -Dotel.logs.exporter=none \
           -jar "$jar_file" --spring.profiles.active="$profile" > "$workspace"/project.log 2>&1 &
@steverao
Copy link
Contributor

steverao commented Feb 17, 2025

after adding opentelemetry-javaagent.jar to the init command, it takes a minute longer to start the jvm

Without the java agent, how long does it take on average? BTW, how do you measure the time to start the jvm?

What are possible causes for that and how can I analyze and reduce the slow start?

From the information you provided, you used two java agents, it might increases start time. BTW, you used the Java Agent from Aliyun, as far as I know, it also provide observability ability in their java agent, for detail, you can ask for help from related cloud service provider.

@laurit
Copy link
Contributor

laurit commented Feb 17, 2025

You could use your favourite profiling tool and see if you can discover where the time is spent while your application is starting.

@laurit
Copy link
Contributor

laurit commented Feb 18, 2025

Also test your application with only the otel agent to rule out that the issue is caused by running with 2 agents.

@laurit laurit added the needs author feedback Waiting for additional feedback from the author label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs author feedback Waiting for additional feedback from the author
Projects
None yet
Development

No branches or pull requests

3 participants