Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

ochttp public traceparent/tracestate marshal/unmarshal #1208

@slinkydeveloper

Description

@slinkydeveloper

NB: Before opening a feature request against this repo, consider whether the feature should/could be implemented in OpenCensus libraries in other languages. If so, please open an issue on opencensus-specs first.

Is your feature request related to a problem? Please describe.
I wish to read and write traceparent/tracestate, encoded using trace context, without passing an http.Request

Describe the solution you'd like
Two new methods should be added to HttpFormat or as public functions:

SpanContextFromHeaders(traceparent string, tracestate string) (sc trace.SpanContext, ok bool)
SpanContextToRequest(sc trace.SpanContext) (traceparent string, tracestate string)

Describe alternatives you've considered
AFAIK no alternatives are available in this library, except copy pasting that code in my own code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions