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

feat(propagation): otel baggage support #4371

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ZStriker19
Copy link
Contributor

What does this PR do?
Following the spec here: https://www.w3.org/TR/baggage/ we implement baggage propagation for the Ruby tracer
Motivation:

Change log entry

Additional Notes:

How to test the change?

Copy link

👋 Hey @DataDog/ruby-guild, please fill "Change log entry" section in the pull request description.

If changes need to be present in CHANGELOG.md you can state it this way

**Change log entry**

Yes. A brief summary to be placed into the CHANGELOG.md

(possible answers Yes/Yep/Yeah)

Or you can opt out like that

**Change log entry**

None.

(possible answers No/Nope/None)

Visited at: 2025-02-11 22:38:59 UTC

@ZStriker19 ZStriker19 force-pushed the zachg/baggage_support branch from e9d741c to eee20a9 Compare February 11, 2025 22:55
@github-actions github-actions bot added the integrations Involves tracing integrations label Feb 11, 2025
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Feb 11, 2025

Datadog Report

Branch report: zachg/baggage_support
Commit report: eee20a9
Test service: dd-trace-rb

❌ 2207 Failed (15 Known Flaky), 17720 Passed, 1395 Skipped, 10m 23.12s Total Time
❄️ 5 New Flaky

❌ Failed Tests (2207)

This report shows up to 5 failed tests.

  • Auto Instrumentation of non Rails request which runs a query auto_instruments all relevant gems automatically - rspec - Details

    Expand for error
     Please invoke Datadog.configure at least once before calling this method
     
     Failure/Error: raise 'Please invoke Datadog.configure at least once before calling this method' unless @propagation
     
     RuntimeError:
       Please invoke Datadog.configure at least once before calling this method
     ./lib/datadog/tracing/contrib/http.rb:26:in \`extract'
     ./lib/datadog/tracing/contrib/rack/middlewares.rb:45:in \`call'
     /usr/local/bundle/gems/sinatra-2.2.4/lib/sinatra/base.rb:2004:in \`call'
     /usr/local/bundle/gems/sinatra-2.2.4/lib/sinatra/base.rb:1564:in \`block in call'
     ...
    
  • ConcurrentRuby integration tests Concurrent::Async when context propagation is enabled behaves like deferred execution creates outer span without a parent - rspec - Details

    Expand for error
     unknown keyword: :baggage
     
     Failure/Error:
       def initialize(
         span_id: nil,
         span_name: nil,
         span_resource: nil,
         span_service: nil,
         span_type: nil,
         trace_distributed_tags: nil,
     ...
    
  • ConcurrentRuby integration tests Concurrent::Async when context propagation is enabled behaves like deferred execution writes inner span to tracer - rspec - Details

    Expand for error
     unknown keyword: :baggage
     
     Failure/Error:
       def initialize(
         span_id: nil,
         span_name: nil,
         span_resource: nil,
         span_service: nil,
         span_type: nil,
         trace_distributed_tags: nil,
     ...
    
  • ConcurrentRuby integration tests Concurrent::Async when context propagation is enabled behaves like deferred execution writes outer span to tracer - rspec - Details

    Expand for error
     unknown keyword: :baggage
     
     Failure/Error:
       def initialize(
         span_id: nil,
         span_name: nil,
         span_resource: nil,
         span_service: nil,
         span_type: nil,
         trace_distributed_tags: nil,
     ...
    
  • ConcurrentRuby integration tests Concurrent::Async when context propagation is enabled inner span parent should be included in outer span - rspec - Details

    Expand for error
     unknown keyword: :baggage
     
     Failure/Error:
       def initialize(
         span_id: nil,
         span_name: nil,
         span_resource: nil,
         span_service: nil,
         span_type: nil,
         trace_distributed_tags: nil,
     ...
    

New Flaky Tests (5)

  • Datadog::Tracing::Distributed::Datadog behaves like Datadog distributed format #extract with trace_id and span_id with trace_distributed_tags within an active trace with invalid tags sets error tag - rspec - Last Failure

    Expand for error
       expected: (/Failed to extract/)
            got: ("Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage")
     Diff:
     @@ -1 +1 @@
     -[/Failed to extract/]
     +["Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage"]
     
     
         expected: (/Failed to extract/)
              got: ("Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage")
     ...
    
  • Datadog::Tracing::Distributed::Datadog behaves like Datadog distributed format #extract with trace_id and span_id with trace_distributed_tags within an active trace with tags too large sets error tag - rspec - Last Failure

    Expand for error
       expected: (/tags are too large/)
            got: ("Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage")
     Diff:
     @@ -1 +1 @@
     -[/tags are too large/]
     +["Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage"]
     
     
         expected: (/tags are too large/)
              got: ("Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage")
     ...
    
  • Datadog::Tracing::Distributed::Datadog behaves like Datadog distributed format #inject! with TraceDigest with trace_distributed_tags within an active trace with invalid tags sets error tag - rspec - Last Failure

    Expand for error
       expected: (/Failed to inject/)
            got: ("Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage")
     Diff:
     @@ -1 +1 @@
     -[/Failed to inject/]
     +["Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage"]
     
     
         expected: (/Failed to inject/)
              got: ("Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage")
     ...
    
  • Datadog::Tracing::Distributed::Datadog behaves like Datadog distributed format #inject! with TraceDigest with trace_distributed_tags within an active trace with tags too large sets error tag - rspec - Last Failure

    Expand for error
       expected: (/tags are too large/)
            got: ("Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage")
     Diff:
     @@ -1 +1 @@
     -[/tags are too large/]
     +["Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage"]
     
     
         expected: (/tags are too large/)
              got: ("Error configuring integration http: uninitialized constant Datadog::Tracing::Distributed::Propagation::Baggage")
     ...
    
  • Datadog::Tracing::Workers::AsyncTransport callbacks when raising errors does not re-raise - rspec - Last Failure

    Expand for error
     Failure/Error: expect(lines.count).to eq(1), "Expected single line, got #{lines.inspect}"
     ./spec/datadog/tracing/workers_spec.rb:37:in \`block in <main>'
     ./spec/spec_helper.rb:238:in \`block in <main>'
     ./spec/spec_helper.rb:123:in \`block in <main>'
     /usr/local/bundle/gems/webmock-3.13.0/lib/webmock/rspec.rb:37:in \`block in <main>'
     /usr/local/bundle/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in \`block in <main>'
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrations Involves tracing integrations tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant