feat(opentracing-shim): Map OpenTracing span.kind tag to OTel SpanKind#4953
feat(opentracing-shim): Map OpenTracing span.kind tag to OTel SpanKind#4953cabaret-pro wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
5ff08e5 to
d121e33
Compare
The OpenTracing shim was not translating the span.kind tag to the OpenTelemetry SpanKind argument. This change extracts the span.kind tag from OpenTracing spans and maps it to the corresponding OTel SpanKind (CLIENT, SERVER, CONSUMER, PRODUCER, or INTERNAL). The span.kind tag is preserved in the span attributes to avoid modifying user data within the shim. Fixes open-telemetry#2549 Made-with: Cursor
d121e33 to
fab489d
Compare
|
The failing All other checks are passing, including:
|
|
Update on CI failures: After further investigation, the Core Contrib Test failures are expected for external contributor PRs. The CI is trying to install dependencies from: But commit All tests that can be run against the fork are passing. |
|
@cabaret-pro thanks for the PR, do you need this or are you going through issues to find something to fix? |
|
Mainly looking through issues but happy to work on something that's actively impacting. |
Summary
span.kindtag to the OpenTelemetrySpanKindargument when creating spans via the shimopentracing_kind_to_otel_kind()inutil.pywith a constant mapping for CLIENT, SERVER, CONSUMER, and PRODUCER kindsspan.kindtag in span attributes (shim does not modify user data)Fixes #2549
Changes
util.py: Added_OPENTRACING_TO_OTEL_KINDconstant andopentracing_kind_to_otel_kind()function__init__.py: Modifiedstart_span()to extract and convert thespan.kindtagTest Plan
python3 -m pytest shim/opentelemetry-opentracing-shim/tests/ -v- All 61 tests passtox -e precommit- All formatters/linters passMade with Cursor