Skip to content

Change visibility of OtelData to pub #227

@ollyswanson

Description

@ollyswanson

Feature Request

Motivation

A recently merged PR #202 has changed the visibility of OtelData. It was previously pub and it was possible to access it from other layers by poking around in the span extensions - I've been using this to inject trace_id and span_id into my logs.

This is also being used by the opentelemetry-appender-tracing crate for, I think, the same purpose.

Proposal

Make OtelData pub again as it was previously.

I think it might be simpler to just make it pub again as I can't discern any motivation for changing the visibility. I'm happy to raise a PR for it but I want to understand if there was a motivation for the change before doing that.

Alternatives

If there's a better way of doing this I'd be happy to adopt that pattern instead, but up until now it's been a very convenient way to transparently include the trace_id and span_id in my own logging layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions