Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Plan for span event API deprecation #4561

Open
@alexmojaki

Description

@alexmojaki

Based on open-telemetry/opentelemetry-specification#4430, the methods span.add_event and span.record_exception will eventually need to be deprecated. Usages of span.record_exception will need to be replaced by logging calls.

I discussed at length with @trask and @lmolkova what this means for SDKs like Python which automatically call span.record_exception within commonly used SDK conveniences like tracer.start_as_current_span. Essentially these will have to be deprecated too on the main Tracer classes since ordinary tracers shouldn't be coupled to the logging API. They can instead be added to specialised tracer classes (see https://github.com/open-telemetry/opentelemetry-js/blob/c6ab2ba4887d0cbbbdf3c1bda229440c67a8497e/api/src/experimental/trace/SugaredTracer.ts for an example) which aren't in the main API/SDK packages. These new packages can make major releases with breaking changes without causing as much disruption as in the core API/SDK packages. It seems that this is what should have been done in the first place since these kinds of conveniences aren't defined in the OTel API spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAffects the API package.discussionIssue or PR that needs/is extended discussion.sdkAffects the SDK package.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions