Skip to content

Conversation

@felixge
Copy link
Member

@felixge felixge commented Oct 23, 2025

Continuation of #4061

PROF-12822

What does this PR do?

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.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • 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.

Unsure? Have a question? Request a review!

@pr-commenter
Copy link

pr-commenter bot commented Oct 23, 2025

Benchmarks

Benchmark execution time: 2025-10-23 05:29:34

Comparing candidate commit 17096cf in PR branch felix.geisendoerfer/chore-enable-shuffle-testing-for-contrib-packages with baseline commit 56a1413 in branch main.

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

@felixge felixge force-pushed the felix.geisendoerfer/chore-enable-shuffle-testing-for-contrib-packages branch 2 times, most recently from ceddef6 to 722d24a Compare October 23, 2025 04:47
@datadog-official
Copy link
Contributor

datadog-official bot commented Oct 23, 2025

⚠️ Tests

⚠️ Warnings

❄️ 1 New flaky test detected

TestPostgres/Connect from github.com/DataDog/dd-trace-go/contrib/gorm.io/gorm.v1/v2 (Datadog)
Failed

=== RUN   TestPostgres/Connect
    sql.go:80: 
        	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/instrumentation/testutils/sql/sql.go:80
        	Error:      	"[]" should have 2 item(s), but has 0
        	Test:       	TestPostgres/Connect
    --- FAIL: TestPostgres/Connect (0.00s)
panic: runtime error: index out of range [0] with length 0 [recovered, repanicked]

...

🧪 2 Tests failed

TestWrapConsumerGroupHandler from github.com/DataDog/dd-trace-go/contrib/IBM/sarama/v2 (Datadog)
Failed

=== RUN   TestWrapConsumerGroupHandler
2025/10/23 05:22:18 Sarama consumer up and running!...
    consumer_group_test.go:88: 
        	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/contrib/IBM/sarama/consumer_group_test.go:88
        	Error:      	"[
        	            	name: kafka.produce
        	            	tags: map[string]interface {}{"_dd.base_service":"", "_dd.p.tid":"68f9bb8a00000000", "_dd.profiling.enabled":0, "_dd.top_level":1, "component":"IBM/sarama", "language":"go", "messaging.destination.name":"IBM_sarama_TestWrapConsumerGroupHandler", "messaging.kafka.partition":0, "messaging.system":"kafka", "offset":0, "resource.name":"Produce Topic IBM_sarama_TestWrapConsumerGroupHandler", "service.name":"kafka", "span.kind":"producer", "span.name":"kafka.produce", "span.type":"queue"}
        	            	start: 2025-10-23 05:22:18.299780095 +0000 UTC
...
TestFire from github.com/DataDog/dd-trace-go/contrib/sirupsen/logrus/v2 (Datadog)
Failed

=== RUN   TestFire
    logrus_test.go:31: 
        	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/contrib/sirupsen/logrus/logrus_test.go:31
        	Error:      	Not equal: 
        	            	expected: "68f9bbf20000000000000000000004d2"
        	            	actual  : "1234"
        	            	
        	            	Diff:
...
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 17096cf | Docs | Was this helpful? Give us feedback!

Fix the test failure below by removing global state from the
implementation.

```
$ go test -test.shuffle 1761195191840193457 ./contrib/log/slog/
--- FAIL: TestWrapHandler (0.03s)
    --- FAIL: TestWrapHandler/testLogger (0.03s)
        slog_test.go:103: {"time":"2025-10-23T07:14:27.195674+02:00","level":"INFO","msg":"this is an info log with tracing information","dd.trace_id":"2097471805985655682","dd.span_id":"2097471805985655682"}
        slog_test.go:103: 
                Error Trace:    /Users/felix.geisendoerfer/go/src/github.com/DataDog/dd-trace-go/contrib/log/slog/slog_test.go:42
                                                        /Users/felix.geisendoerfer/go/src/github.com/DataDog/dd-trace-go/contrib/log/slog/slog_test.go:103
                                                        /Users/felix.geisendoerfer/go/src/github.com/DataDog/dd-trace-go/contrib/log/slog/slog_test.go:149
                Error:          Not equal: 
                                expected: "68f9b9b3000000001d1bb77ea22c0b82"
                                actual  : "2097471805985655682"
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1 +1 @@
                                -68f9b9b3000000001d1bb77ea22c0b82
                                +2097471805985655682
                Test:           TestWrapHandler/testLogger
                Messages:       trace id not found
        slog_test.go:104: {"time":"2025-10-23T07:14:27.195681+02:00","level":"ERROR","msg":"this is an error log with tracing information","dd.trace_id":"2097471805985655682","dd.span_id":"2097471805985655682"}
        slog_test.go:104: 
                Error Trace:    /Users/felix.geisendoerfer/go/src/github.com/DataDog/dd-trace-go/contrib/log/slog/slog_test.go:42
                                                        /Users/felix.geisendoerfer/go/src/github.com/DataDog/dd-trace-go/contrib/log/slog/slog_test.go:104
                                                        /Users/felix.geisendoerfer/go/src/github.com/DataDog/dd-trace-go/contrib/log/slog/slog_test.go:149
                Error:          Not equal: 
                                expected: "68f9b9b3000000001d1bb77ea22c0b82"
                                actual  : "2097471805985655682"
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1 +1 @@
                                -68f9b9b3000000001d1bb77ea22c0b82
                                +2097471805985655682
                Test:           TestWrapHandler/testLogger
                Messages:       trace id not found
        slog_test.go:132: {"time":"2025-10-23T07:14:27.203777+02:00","level":"INFO","msg":"this is an info log with tracing information"}
        slog_test.go:133: {"time":"2025-10-23T07:14:27.20378+02:00","level":"ERROR","msg":"this is an error log with tracing information"}
```
@felixge felixge force-pushed the felix.geisendoerfer/chore-enable-shuffle-testing-for-contrib-packages branch from 722d24a to 17096cf Compare October 23, 2025 05:16
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.

1 participant