Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Allow construction-time hooks to pass external tracing information to each request #348

@yurishkuro

Description

@yurishkuro

Scenario: an http server that is instrumented for Zipkin tracing and has a notion of the "current span". If such service makes a downstream call over TChannel, we don't want TChannel to start a new trace/span, but to start the new span as a child of the existing span established by the http server.

I am not sure if today it's possible to do this bridging by passing parent_tracing to each call(), but even if it's possible, it requires manually changing the application at every call site. Instead, it would be much cleaner if the app owner could set a certain "tracing hook" when creating the TChannel, so that this hook would get executed for every request and would retrieve the current parent span from http request context (by whatever means), and return the parent_tracing to the current request (or alternatively set it as the current parent_tracing in TChannel's RequestContext thread-local.

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