-
Notifications
You must be signed in to change notification settings - Fork 849
Feature/support activity source tags in zipkin exporter #6275
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
Feature/support activity source tags in zipkin exporter #6275
Conversation
|
From #5936
Activity tags were previously not added to Zipkin due to this issue. How did you resolve it? Does the spec provide guidance now? |
…for activity source tags
…tags-in-zipkin-exporter' into feature/support-activity-source-tags-in-zipkin-exporter
@rajkumar-rangaraj Previously, only Activity tags were exported to Zipkin, while ActivitySource tags were not included. The spec does not provide explicit guidance on how to handle collisions for ActivitySource tags. According to the OpenTelemetry mapping spec, instrumentation scope tags should be exported as span tags, but no standard prefix is defined. To avoid collisions with span tags, I used the otel.scope. prefix for ActivitySource tags, which aligns with OpenTelemetry terminology and keeps them distinct. If the spec is updated with a recommended approach, we can adjust accordingly. |
Can you be proactive in this topic and create PR with some proposal/issue to discuss this? |
Thank you for your feedback! Regarding the discussion, there is already an open issue addressing this exact concern: This issue specifically discusses priority handling and collision resolution between tags added directly to an Activity (span attributes) and tags originating from the ActivitySource (instrumentation scope attributes). My current implementation follows a similar approach by clearly prefixing ActivitySource tags ( Additionally, note that the Console exporter already represents instrumentation scope tags separately, |
|
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
|
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
#5936
This pull request enhances the
OpenTelemetry.Exporter.Zipkinimplementation by refactoring the tag processing logic and adding comprehensive test coverage. The most notable changes include introducing methods to handle source and activity tags, improving the handling of special tags, and adding new unit tests to ensure correctness. Additionally, a utility class for creatingActivitySourceinstances was added to streamline test setup.Refactoring and Enhancements:
TagEnumerationStateinZipkinActivityConversionExtensionsto includeProcessSourceTagsandProcessActivityTagsmethods for better separation of concerns and to handle source tags with a prefix (otel.scope). Null values are now skipped during processing. [1] [2]ProcessSpecialTaginTagEnumerationStateto centralize logic for handling special tags likeStatusCode,StatusDescription, andZipkinErrorFlagTagName.Test Coverage Improvements:
ZipkinActivityConversionExtensionsTestswith new test cases to validate:ActivitySourceBuilderutility class to simplify the creation ofActivitySourceinstances in test scenarios.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes