Issue : When attempting to use both the otel-profiling JAR (for trace-to-profiling linking) and the opentelemetry-samplers JAR (specified via OTEL_JAVAAGENT_EXTENSIONS env variable), the Opentelemetry Java Agent does not handle them together.
- If only otel-profiling jar is set as an environment variable, profiling and linking work correctly.
- If both the otel-profiling jar as env variable as well as opentelemetry-samplers jar as jvm arg ( -Dotel.javaagent.extensions ) are set then the trace-to-profiling linking stops working, but the SDK configuration is correctly applied.
Additionally, the sdk-config.yaml does not seem to support any other jar when provided as an environment variable.
- Working configuration (Only otel-profiling jar enabled using env variable)
export OTEL_JAVAAGENT_EXTENSIONS="/path to otel-profiling jar"
jar -javaagent:"/path to opentelemetry-javagent jar" -jar myapp.jar
This configuration enables the extension and the trace to profile linking is seen.
- Samplers and Otel-profiling jar added
export OTEL_JAVAAGENT_EXTENSIONS="/path to otel-profiling jar"
jar -javaagent:"/path to opentelemetry-javaagent jar" -Dotel.javaagent.extensions="/path to opentelemetry-samplers jar" -Dotel.experimental.config.file="/path to sdk -config yml file"
This configuration works fine for sdk config but the trace to profile linking does not seem to work.
Expected behavior :
- Both the otel-profiling and opentelemetry-samplers jars should work together without disabling the trace-to-profile linking.
- sdk-config.yaml should support otel-profiling jar when set via environment variable.
Is there a recommended way to configure both profiling and sdk extensions together ?
I would really appreciate any guidance on resolving this issue. Thank you for the insights.
Issue : When attempting to use both the otel-profiling JAR (for trace-to-profiling linking) and the opentelemetry-samplers JAR (specified via OTEL_JAVAAGENT_EXTENSIONS env variable), the Opentelemetry Java Agent does not handle them together.
Additionally, the sdk-config.yaml does not seem to support any other jar when provided as an environment variable.
export OTEL_JAVAAGENT_EXTENSIONS="/path to otel-profiling jar"
jar -javaagent:"/path to opentelemetry-javagent jar" -jar myapp.jar
This configuration enables the extension and the trace to profile linking is seen.
export OTEL_JAVAAGENT_EXTENSIONS="/path to otel-profiling jar"
jar -javaagent:"/path to opentelemetry-javaagent jar" -Dotel.javaagent.extensions="/path to opentelemetry-samplers jar" -Dotel.experimental.config.file="/path to sdk -config yml file"
This configuration works fine for sdk config but the trace to profile linking does not seem to work.
Expected behavior :
Is there a recommended way to configure both profiling and sdk extensions together ?
I would really appreciate any guidance on resolving this issue. Thank you for the insights.