GeezerVison is showing github.com — OTLP export silently drops application name and labels · Issue #344 · grafana/pyroscope-java
OTLP export silently drops application name and labels #344DescriptionFound while reviewing #335.
In OTLP mode (PYROSCOPE_FORMAT=otlp), PYROSCOPE_APPLICATION_NAME, static labels, PYROSCOPE_LABELS, and dynamic labels from Pyroscope.LabelsWrapper are all silently ignored. PyroscopeExporter sends the raw async-profiler OTLP payload, which does not include service.name, so profiles land under service_name="unknown_service". This is currently acknowledged only in a comment inside the integration test.
Suggested improvements:
- Document this limitation in the README's OTLP section.
- Log a warning at startup when an application name or labels are configured together with
PYROSCOPE_FORMAT=otlp, so users aren't left wondering where their data went.
- Relatedly,
AsyncProfilerDelegate.dumpImpl still calls Pyroscope.LabelsWrapper.dump() in OTLP mode and the result is discarded. If draining the label state is intentional, fine; otherwise it is wasted work.
cc @arnabnandy7 Activityarnabnandy7 commented on Aug 5, 2026 Please assign me I'll look into these findings in sometime. korniltsev-grafanista commented on Aug 5, 2026 ContributorAuthor More actions ping me when you start working on these. I also have not reviewed if these are valid - they are straight from Dario arnabnandy7 commented on Aug 5, 2026
ping me when you start working on these. I also have not reviewed if these are valid - they are straight from Dario
Sure, let me start with this one. I'll share you the findings first and then if we're agreed on proceedings then I'll implement. @korniltsev-grafanista hope that's fine with you. arnabnandy7 commented on Aug 5, 2026 @korniltsev-grafanista I reviewed this, and the findings are valid.
In OTLP mode, we forward async-profiler’s protobuf payload as-is. The application name and labels managed by the Java agent aren’t added to that payload, so profiles can end up under service_name="unknown_service".
LabelsWrapper.dump() still serves a purpose because it cleans up closed scoped contexts. Removing it without disabling dynamic-label collection could cause those contexts to accumulate, so I think we should keep it and add a comment explaining why.
For this issue, I suggest documenting the limitation in the README, logging a startup warning when OTLP is enabled, and adding a test for that warning. Adding the application name and labels to the OTLP payload would be a larger follow-up since it would require parsing and modifying async-profiler’s experimental protobuf output.
If this scope sounds good, I’ll go ahead with the implementation. korniltsev-grafanista commented on Aug 5, 2026 ContributorAuthor More actions
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|