Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Kafka consumers include trace_id in log context #121

Merged
merged 3 commits into from
Oct 2, 2023
Merged

Commits on Oct 2, 2023

  1. Centralize adding TraceId to the logging context

    This commit adds some functions to OpenTelemetry for working with the
    current trace-id as converted to Datadog's format and for the purposes
    of setting the log context. It's then re-used in the Middleware from
    which it was extracted.
    
    This will allow us to do the same thing in other persistent-process
    runners, such as Kafka consumers, just like we do in APIs through the
    middleware.
    pbrisbin committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    34671b2 View commit details
    Browse the repository at this point in the history
  2. Wrap runConsumer in withTraceIdContext

    This will ensure consumer logs all contain the current `trace_id`.
    pbrisbin committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    98da8d6 View commit details
    Browse the repository at this point in the history
  3. Version bump

    pbrisbin committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    e3a2d82 View commit details
    Browse the repository at this point in the history