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

tracer: support 128-bit trace ids #1833

Merged
merged 19 commits into from
Mar 30, 2023
Merged

Commits on Mar 28, 2023

  1. ddtrace/tracer: 128-bit support (#1663)

    Adds support for generating 128 bit trace ids and exposing them from the Datadog API via a new SpanContextW3C. Future PRs will propagate this id for distributed tracing.
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    7d4aed9 View commit details
    Browse the repository at this point in the history
  2. tracer: remove WithTraceID128 (#1687)

    Remove the WithTraceID128 API that was added to this feature branch (not currently in a dd-trace-go release or in main).
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    b6769f7 View commit details
    Browse the repository at this point in the history
  3. tracer: support DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED (#1685)

    Support DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED to only log 128 bit trace id values when enabled.
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    9d36b7e View commit details
    Browse the repository at this point in the history
  4. tracer: make high 64 bits of 128-bit trace id a timestamp (#1715)

    Rather than generate a random 64 bits for the upper half of a 128-bit trace id, use the first 32 bits as a timestamp, and the remaining 32 bits padded with zeroes.
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    f0aadd7 View commit details
    Browse the repository at this point in the history
  5. tracer: support 128-bit propagation of B3 multi header (#1717)

    Supports 128-bit trace id propagation in B3 multi headers. Other carriers will be supported in future PRs, and TODOs have been added in the code where it is needed.
    
    Also fixes the issue where a spanContext needed to have an associated span to access and store 128-bit trace ids. It is now a separate field of the spanContext. Now, the _dd.p.tid tag in the Meta map (upper 64 bits of 128-bit trace ID) is populated from the spanContext upon span finish.
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    2c2005b View commit details
    Browse the repository at this point in the history
  6. tracer: refactor tests to support 128-bit trace id propagation (#1724)

    Small refactor to tests to make it easier to test with 128-bit trace ids for other carriers.
    
    These tests could probably be refactored even further to have less repetition, but for now, it's just extending them to support 128-bit trace ids.
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    6766f99 View commit details
    Browse the repository at this point in the history
  7. tracer: support 128-bit trace propagation of all carriers (#1738)

    Supports 128-bit trace propagation of the remaining carriers per the specification.
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    45cab01 View commit details
    Browse the repository at this point in the history
  8. tracer: fix trace id logging (#1746)

    When DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED is false, only the lower-order 64-bits of the TraceId should be logged.
    When DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED is true, the format of the injected TraceId is conditional based on the higher-order 64 bits of the TraceId - specifically, when:
    zero - the injected TraceId will be its decimal string encoding (preserving the current behavior of 64-bit TraceIds)
    non-zero - the injected TraceId will be encoded as 32 lower-case hexadecimal characters with zero-padding as necessary
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    299a356 View commit details
    Browse the repository at this point in the history
  9. tracer: 128-bit trace id bug fixes (#1812)

    - guarantee that the propagating tags have been set before reading them during extraction
    - only set _dd.p.tid if the top 64 bits is not empty or zero
    - always set _dd.p.tid to 16 characters, with padding if needed
    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    26b7630 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    08a9ef8 View commit details
    Browse the repository at this point in the history
  11. tracer: Refactor span context's TraceID to be a full [16]byte (#1822)

    * WIP: more refactoring, still broken tests though
    * Even more bug fixes
    * Update ddtrace/tracer/spancontext.go
    * PR Comments: use strconv.ParseUint instead of hex.Decode since it can handle odd length strings
    Co-authored-by: Katie Hockman <katie@hockman.dev>
    ajgajg1134 authored and katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    7549598 View commit details
    Browse the repository at this point in the history
  12. rebase

    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    cfe1f41 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    19a64f0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    10e4068 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c5b351b View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    784faa3 View commit details
    Browse the repository at this point in the history
  17. fix rebase

    katiehockman committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    f858a2f View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. Configuration menu
    Copy the full SHA
    9cf8252 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d48d3ef View commit details
    Browse the repository at this point in the history