-
Notifications
You must be signed in to change notification settings - Fork 54
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
JVM metrics not visible in New Relic APM due to missing service.instance.id
#597
Comments
@ffsetit I tested with the Jenkins OpenTelemetry Plugin 2.11.0 and Jenkins 2.375.3 and was able to see the JVM metrics in New Relic after setting the environment variable For reference, I did this with Docker using the following:
In New Relic, it looks like this: Clicking on JVM and on Let me know if this works for you. |
@pnvnd i can confirm that adding Environment=OTEL_RESOURCE_ATTRIBUTES=service.instance.id=..... to the systemd override.conf file does add the attribute and jvm metrics become visible in new relic. Is this a bug that adding the config to manage jenkins > configure system > OpenTelemetry (advanced) > configuration properties did not work? |
Thanks for the great feedback. We will fix this soon.
Good catch. It's not supported by the code and it would be good to support it. See:
|
Note that we are re-aligning with the OTel Java Instrumentation official JVM runtime metrics adopting the instrumentation:opentelemetry-runtime-metrics lib. |
Can you please test https://github.com/jenkinsci/opentelemetry-plugin/releases/tag/opentelemetry-2.12.0-rc1 It uses the instrumentation of the Otel Java Auto Instrumentation library to collect JVM / runtime metrics and it produces |
service.instance.id
I have the OLTP plugin installed and configured to send data to New Relic which is working correctly.
However when looking at the APM data the JVM metrics are not displayed correctly with the following message displayed
The JVMs view lets you identify instances of your service that are behaving unusually and diagnose problems related to memory, garbage collection, or other internal runtime behavior. To see runtime/VM metrics broken down by instance, add the service.instance.id attribute to your OpenTelemetry metrics. To see all runtime/VM metrics, go to metrics explorer.
The raw data is present, however the service.instance.id attribute is not. I attempted to add this via the plugins advanced config as
service.instance.id=jenkins-test
however upon restarting Jenkins the attribute is still not present and the startup logs containOpenTelemetry SDK initialized: SDK [config: otel.traces.exporter=otlp, otel.metrics.exporter=otlp, otel.exporter.otlp.endpoint=https://otlp.nr-data.net, resource: service.name=jenkins, service.namespace=jenkins, service.version=2.391]
indicating that the additional SDK parameter was not read.
Jenkins: 2.391
OLTP Plugin: 2.11.0
The text was updated successfully, but these errors were encountered: