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

WIP: Datadog Baggage API #3069

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

Conversation

rachelyangdog
Copy link
Contributor

What does this PR do?

Adding baggage API. This is the first PR to add baggage functionality to dd-trace-go and only adds the public API methods.

Motivation

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

@rachelyangdog rachelyangdog requested a review from a team as a code owner January 8, 2025 18:51
@rachelyangdog rachelyangdog marked this pull request as draft January 8, 2025 18:51
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 8, 2025

Datadog Report

Branch report: rachel.yang/baggage-api-context
Commit report: f9c9602
Test service: dd-trace-go

❌ 1 Failed (0 Known Flaky), 5129 Passed, 70 Skipped, 2m 38.36s Total Time

❌ Failed Tests (1)

  • TestWrapConsumerGroupHandler - gopkg.in/DataDog/dd-trace-go.v1/contrib/IBM/sarama.v1 - Details

    Expand for error
     Failed
     
     === RUN   TestWrapConsumerGroupHandler
     2025/01/10 19:04:33 Sarama consumer up and running!...
         consumer_group_test.go:88: 
             	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/contrib/IBM/sarama.v1/consumer_group_test.go:88
             	Error:      	"[
             	            	name: kafka.produce
             	            	tags: map[string]interface {}{"component":"IBM/sarama", "messaging.kafka.partition":0, "messaging.system":"kafka", "offset":0, "resource.name":"Produce Topic gotest_ibm_sarama", "service.name":"kafka", "span.kind":"producer", "span.type":"queue"}
             	            	start: 2025-01-10 19:04:33.05564188 +0000 UTC m=+0.927038579
     ...
    

@pr-commenter
Copy link

pr-commenter bot commented Jan 8, 2025

Benchmarks

Benchmark execution time: 2025-01-10 19:42:22

Comparing candidate commit a481ced in PR branch rachel.yang/baggage-api-context with baseline commit 5a8a82c in branch main.

Found 0 performance improvements and 3 performance regressions! Performance is the same for 56 metrics, 0 unstable metrics.

scenario:BenchmarkSetTagString-24

  • 🟥 execution_time [+6.902ns; +13.258ns] or [+6.005%; +11.535%]

scenario:BenchmarkSetTagStringPtr-24

  • 🟥 execution_time [+4.056ns; +5.304ns] or [+2.349%; +3.072%]

scenario:BenchmarkSetTagStringer-24

  • 🟥 execution_time [+6.712ns; +14.048ns] or [+4.672%; +9.778%]

@mtoffl01 mtoffl01 requested review from darccio and mtoffl01 January 10, 2025 18:08
@mtoffl01 mtoffl01 self-assigned this Jan 10, 2025
Copy link
Contributor

@mtoffl01 mtoffl01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a light review with some comments - go ahead and address those and then I can take a second pass!

ddtrace/tracer/baggage.go Outdated Show resolved Hide resolved
ddtrace/tracer/baggage.go Outdated Show resolved Hide resolved
ddtrace/tracer/baggage.go Show resolved Hide resolved
ddtrace/tracer/baggage.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants