Skip to content

Conversation

@darccio
Copy link
Member

@darccio darccio commented Aug 20, 2025

What does this PR do?

Implements an on-the-flight injector to include RUM's snippet in HTTP responses.

Benchmark

goos: darwin
goarch: arm64
pkg: github.com/DataDog/dd-trace-go/v2/instrumentation/rum
cpu: Apple M1 Max
=== RUN   BenchmarkInjectorWrite
BenchmarkInjectorWrite
BenchmarkInjectorWrite-10        1066776              1104 ns/op              16 B/op            1 allocs/op
PASS
ok      github.com/DataDog/dd-trace-go/v2/instrumentation/rum   3.603s

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 Aug 20, 2025

Benchmarks

Benchmark execution time: 2025-09-03 15:01:33

Comparing candidate commit e78b666 in PR branch dario.castane/x/inject-rum with baseline commit 1921d92 in branch main.

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

@darccio darccio force-pushed the dario.castane/x/inject-rum branch from bfbf911 to 0b0a175 Compare August 20, 2025 17:48
@darccio darccio changed the title feat(tracer): RUM injection POC feat(instrumentation/rum): RUM injection POC Aug 21, 2025
@darccio darccio force-pushed the dario.castane/x/inject-rum branch from 0b0a175 to 7ca6e6e Compare August 21, 2025 14:38
@darccio darccio force-pushed the dario.castane/x/inject-rum branch from 7ca6e6e to e78b666 Compare September 3, 2025 14:48
@datadog-official
Copy link
Contributor

datadog-official bot commented Sep 3, 2025

⚠️ Tests

⚠️ Warnings

🧪 2 Tests failed

❄️ Known flaky: TestSpansStartedTags from github.com/DataDog/dd-trace-go/v2/ddtrace/tracer (Datadog)
Failed

=== RUN   TestSpansStartedTags
--- FAIL: TestSpansStartedTags (0.14s)
❄️ Known flaky: TestSpansStartedTags/default from github.com/DataDog/dd-trace-go/v2/ddtrace/tracer (Datadog)
Failed

=== RUN   TestSpansStartedTags/default
    metrics_test.go:111: 
        	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/ddtrace/tracer/metrics_test.go:111
        	Error:      	Not equal: 
        	            	expected: 0
        	            	actual  : 1
        	Test:       	TestSpansStartedTags/default
    --- FAIL: TestSpansStartedTags/default (0.08s)

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e78b666 | Docs | Was this helpful? Give us feedback!

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