Skip to content

aligning opentracing.tracer with servicer_context.tracer #34

@niryarden

Description

@niryarden

When I use the python-grpc module on a server, the only way I can access the active span in the code is using the RPC context (that includes the span). That's because the RPC context is the only place that keeps track of the scope manager and the current active span. However, if I'm not mistaken, it's a pretty common pattern that the general opentracing module would be aligned with the tracing activity that the framework-specific module is generating.

why?

  1. this would enable me to access the active span anywhere my the code by calling opentracing.tracer.active_span without being required to pass the context to every function I call from the RPC.
  2. that would enable me to generate more complex spans activity on top of the activity the python-grpc module generates. (for example, opening and closing spans for child functions of the RPC).
  3. that would enable third-party software products that uses or communicates with the opentracing data to be able to do so, by importing opentracing and using it anywhere it wants. (That's actually how I bumped into this issue, my company's agent is accessing the server's tracing data for advanced features)è

how?
#35

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