Skip to content

[DSM] Expose TrackTransaction as a public manual API#8440

Merged
kr-igor merged 14 commits intomasterfrom
kr-igor/dsm-tt-manual-api-v0
Apr 28, 2026
Merged

[DSM] Expose TrackTransaction as a public manual API#8440
kr-igor merged 14 commits intomasterfrom
kr-igor/dsm-tt-manual-api-v0

Conversation

@kr-igor
Copy link
Copy Markdown
Contributor

@kr-igor kr-igor commented Apr 10, 2026

Summary of changes

Adds Datadog.Trace.DataStreams.TrackTransaction(ISpan, string, string) as a public API in Datadog.Trace.Manual, allowing customers to record Data Streams Monitoring transaction checkpoints directly from their code.

using (var scope = Tracer.Instance.StartActive("my-operation"))
{
    DataStreams.TrackTransaction(scope.Span, messageId, "kafka-produce");
}

Reason for change

DSM transaction tracking doesn't work in all scenarios due to limited set of extractors (e.g. custom messaging layers, proprietary transports, or patterns where message IDs are only available in customer code). This API gives customers a manual escape hatch to record transactions when there's no extractor.

Implementation details

Follows the existing [Instrumented] / CallTarget shim pattern used by EventTrackingSdk and SpanExtensions:

  • Datadog.Trace.Manual/DataStreams.cs — New public stub with an empty body, decorated with [Instrumented] and [MethodImpl(MethodImplOptions.NoInlining)]. The stub is the API surface customers reference from the Datadog.Trace NuGet package.

  • ClrProfiler/AutoInstrumentation/ManualInstrumentation/DataStreams/DataStreamsTrackTransactionIntegration.cs[InstrumentMethod] integration that intercepts the stub at runtime. OnMethodBegin resolves the caller's ISpan to an internal Span via duck typing, then:

    • If resolved: calls span.TrackTransaction(manager, transactionId, checkpointName) — sets the dsm.transaction.id tag on the span and sends the transaction to the DSM backend.
    • Otherwise (custom ISpan implementation): calls manager.TrackTransaction(transactionId, checkpointName) directly — sends to the backend without tagging.
    • Records PublicApiUsage.DataStreams_TrackTransaction telemetry in both paths.
  • Telemetry/Metrics/PublicApiUsage.cs — Added the DataStreams_TrackTransaction enum entry.

  • Generated filesInstrumentationDefinitions.g.cs and PublicApiUsageExtensions_EnumExtensions.g.cs regenerated automatically by Roslyn source generators during build.

Behaviour when DSM is disabled: IsTransactionTrackingEnabled (!_isInDefaultState && IsEnabled) guards both call paths, so the method is a silent no-op unless DD_DATA_STREAMS_ENABLED=true is explicitly set.

Test coverage

Unit tests (DataStreamsInstrumentationTests.cs):

  • Duck-typed span (happy path) — verifies dsm.transaction.id tag is set on the internal Span and IDataStreamsWriter.AddTransaction is called exactly once.
  • Custom ISpan implementation — verifies SetTag is never called on the mock span but AddTransaction is still called exactly once.

Structural test (existing, automatic) — DatadogTraceManualInstrumentationTests scans all [InstrumentMethod] integrations and asserts every targeted Manual method has [Instrumented] + [MethodImpl(MethodImplOptions.NoInlining)], and vice versa. Passes without changes.

Integration test (DataStreamsMonitoringManualApiTest.TrackTransaction):

  • Runs Samples.DataStreams.ManualAPI (extended to call DataStreams.TrackTransaction) with the real CLR profiler attached.
  • Asserts the dsm.transaction.id span tag is set to the expected value.
  • Asserts the transaction was flushed to the agent by decoding the raw binary payload from MockDataStreamsBucket.Transactions and TransactionCheckpointIds, verifying both the transaction ID and checkpoint name.

Other details

  • No new public types or breaking changes — DataStreams is a new static class in the Datadog.Trace namespace.
  • Requires DD_DATA_STREAMS_ENABLED=true; silently no-ops otherwise (same guard as the existing internal DataStreamsManager.TrackTransaction).
  • The Datadog.Trace.Manual project does not reference Datadog.Trace directly, so the stub body remains empty by design — the profiler provides the implementation at runtime.

@kr-igor kr-igor added area:data-streams-monitoring type:enhancement Improvement to an existing feature labels Apr 10, 2026
@kr-igor kr-igor changed the title Added Datadog.Trace.DataStreams.TrackTransaction to public API [DSM] Expose TrackTransaction as a public manual instrumentation API Apr 10, 2026
@kr-igor kr-igor changed the title [DSM] Expose TrackTransaction as a public manual instrumentation API [DSM] Expose TrackTransaction as a public manualAPI Apr 10, 2026
@kr-igor kr-igor changed the title [DSM] Expose TrackTransaction as a public manualAPI [DSM] Expose TrackTransaction as a public manual API Apr 10, 2026
@dd-trace-dotnet-ci-bot
Copy link
Copy Markdown

dd-trace-dotnet-ci-bot Bot commented Apr 10, 2026

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8440) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration75.30 ± (75.20 - 75.92) ms72.70 ± (72.73 - 73.12) ms-3.4%
.NET Framework 4.8 - Bailout
duration78.38 ± (78.13 - 78.63) ms77.38 ± (77.27 - 77.62) ms-1.3%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1077.17 ± (1078.88 - 1087.21) ms1079.73 ± (1080.82 - 1090.07) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.65 ± (22.59 - 22.72) ms22.37 ± (22.32 - 22.41) ms-1.3%
process.time_to_main_ms86.61 ± (86.27 - 86.94) ms83.97 ± (83.71 - 84.22) ms-3.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.91 - 10.92) MB10.92 ± (10.91 - 10.92) MB-0.0%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.35 ± (22.30 - 22.39) ms22.46 ± (22.42 - 22.50) ms+0.5%✅⬆️
process.time_to_main_ms86.02 ± (85.81 - 86.23) ms86.21 ± (85.93 - 86.50) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.89 ± (10.88 - 10.89) MB10.94 ± (10.94 - 10.94) MB+0.5%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms214.38 ± (213.61 - 215.15) ms213.32 ± (212.43 - 214.21) ms-0.5%
process.time_to_main_ms531.34 ± (529.89 - 532.79) ms527.46 ± (526.13 - 528.78) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.97 ± (47.95 - 47.99) MB47.94 ± (47.90 - 47.97) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 6 - Baseline
process.internal_duration_ms21.19 ± (21.14 - 21.23) ms21.48 ± (21.41 - 21.55) ms+1.4%✅⬆️
process.time_to_main_ms73.42 ± (73.20 - 73.64) ms75.66 ± (75.33 - 75.98) ms+3.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.62) MB10.62 ± (10.62 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.26 ± (21.22 - 21.31) ms21.26 ± (21.22 - 21.31) ms-0.0%
process.time_to_main_ms74.77 ± (74.56 - 74.99) ms75.47 ± (75.24 - 75.70) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.72 - 10.73) MB10.74 ± (10.73 - 10.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms381.13 ± (379.20 - 383.05) ms380.48 ± (378.65 - 382.31) ms-0.2%
process.time_to_main_ms531.90 ± (530.79 - 533.01) ms531.33 ± (530.04 - 532.63) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.29 ± (49.26 - 49.31) MB49.45 ± (49.42 - 49.47) MB+0.3%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.76 ± (19.70 - 19.82) ms19.60 ± (19.57 - 19.63) ms-0.8%
process.time_to_main_ms74.91 ± (74.61 - 75.21) ms73.72 ± (73.55 - 73.89) ms-1.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.65 - 7.66) MB7.65 ± (7.65 - 7.66) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.60 ± (19.55 - 19.65) ms20.02 ± (19.96 - 20.08) ms+2.1%✅⬆️
process.time_to_main_ms74.41 ± (74.22 - 74.59) ms77.37 ± (77.09 - 77.66) ms+4.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.70 ± (7.69 - 7.71) MB7.69 ± (7.69 - 7.70) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms300.84 ± (298.73 - 302.96) ms296.97 ± (294.56 - 299.37) ms-1.3%
process.time_to_main_ms492.08 ± (490.86 - 493.30) ms496.03 ± (494.52 - 497.54) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.49 ± (36.46 - 36.51) MB36.51 ± (36.48 - 36.53) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.1%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration203.95 ± (204.09 - 205.18) ms204.55 ± (205.23 - 206.90) ms+0.3%✅⬆️
.NET Framework 4.8 - Bailout
duration208.04 ± (208.10 - 209.19) ms208.34 ± (208.59 - 209.87) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1214.16 ± (1213.95 - 1221.43) ms1209.09 ± (1212.37 - 1221.27) ms-0.4%
.NET Core 3.1 - Baseline
process.internal_duration_ms200.06 ± (199.38 - 200.74) ms198.82 ± (198.18 - 199.46) ms-0.6%
process.time_to_main_ms87.53 ± (87.15 - 87.91) ms86.39 ± (86.04 - 86.74) ms-1.3%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.95 ± (15.94 - 15.97) MB15.96 ± (15.95 - 15.98) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.8%
.NET Core 3.1 - Bailout
process.internal_duration_ms199.90 ± (199.20 - 200.59) ms198.26 ± (197.67 - 198.85) ms-0.8%
process.time_to_main_ms88.54 ± (88.22 - 88.87) ms87.91 ± (87.60 - 88.22) ms-0.7%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.02 ± (16.01 - 16.03) MB16.02 ± (16.00 - 16.04) MB-0.0%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.9%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms391.46 ± (389.91 - 393.01) ms393.95 ± (392.59 - 395.32) ms+0.6%✅⬆️
process.time_to_main_ms539.02 ± (537.33 - 540.71) ms537.75 ± (536.19 - 539.31) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.91 ± (57.72 - 58.10) MB58.30 ± (58.14 - 58.45) MB+0.7%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms205.47 ± (204.76 - 206.19) ms202.83 ± (202.18 - 203.48) ms-1.3%
process.time_to_main_ms76.15 ± (75.82 - 76.48) ms74.88 ± (74.60 - 75.16) ms-1.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.19 ± (16.17 - 16.21) MB16.22 ± (16.20 - 16.24) MB+0.2%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.0%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms203.55 ± (202.96 - 204.13) ms202.45 ± (201.79 - 203.12) ms-0.5%
process.time_to_main_ms77.04 ± (76.74 - 77.33) ms76.19 ± (75.88 - 76.49) ms-1.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.27 ± (16.25 - 16.29) MB16.27 ± (16.25 - 16.29) MB+0.0%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.2%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms597.87 ± (595.26 - 600.49) ms597.88 ± (595.37 - 600.39) ms+0.0%✅⬆️
process.time_to_main_ms536.98 ± (535.85 - 538.10) ms536.21 ± (534.72 - 537.70) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.98 ± (60.89 - 61.08) MB61.11 ± (61.01 - 61.21) MB+0.2%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.3%
.NET 8 - Baseline
process.internal_duration_ms203.25 ± (202.56 - 203.95) ms201.66 ± (201.01 - 202.31) ms-0.8%
process.time_to_main_ms74.97 ± (74.64 - 75.30) ms74.36 ± (74.05 - 74.67) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.60 ± (11.58 - 11.61) MB11.56 ± (11.54 - 11.57) MB-0.4%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.0%
.NET 8 - Bailout
process.internal_duration_ms203.24 ± (202.40 - 204.08) ms201.08 ± (200.47 - 201.70) ms-1.1%
process.time_to_main_ms77.04 ± (76.64 - 77.44) ms75.57 ± (75.29 - 75.86) ms-1.9%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.66 ± (11.65 - 11.68) MB11.65 ± (11.63 - 11.66) MB-0.1%
runtime.dotnet.threads.count20 ± (20 - 20)19 ± (19 - 19)-1.7%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms518.99 ± (515.30 - 522.68) ms521.12 ± (517.12 - 525.11) ms+0.4%✅⬆️
process.time_to_main_ms496.01 ± (494.85 - 497.17) ms500.22 ± (498.92 - 501.53) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.28 ± (50.23 - 50.32) MB50.23 ± (50.19 - 50.28) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.4%
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8440) - mean (73ms)  : 70, 76
    master - mean (76ms)  : 70, 81

    section Bailout
    This PR (8440) - mean (77ms)  : 75, 79
    master - mean (78ms)  : 74, 82

    section CallTarget+Inlining+NGEN
    This PR (8440) - mean (1,085ms)  : 1016, 1155
    master - mean (1,083ms)  : 1021, 1145

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8440) - mean (113ms)  : 108, 119
    master - mean (117ms)  : 110, 123

    section Bailout
    This PR (8440) - mean (116ms)  : 109, 123
    master - mean (115ms)  : 112, 119

    section CallTarget+Inlining+NGEN
    This PR (8440) - mean (779ms)  : 756, 801
    master - mean (785ms)  : 751, 819

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8440) - mean (104ms)  : 98, 110
    master - mean (101ms)  : 96, 106

    section Bailout
    This PR (8440) - mean (103ms)  : 99, 108
    master - mean (102ms)  : 97, 108

    section CallTarget+Inlining+NGEN
    This PR (8440) - mean (939ms)  : 903, 975
    master - mean (940ms)  : 900, 981

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8440) - mean (101ms)  : 97, 105
    master - mean (103ms)  : 97, 109

    section Bailout
    This PR (8440) - mean (105ms)  : 99, 111
    master - mean (102ms)  : 99, 104

    section CallTarget+Inlining+NGEN
    This PR (8440) - mean (825ms)  : 779, 870
    master - mean (822ms)  : 788, 856

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8440) - mean (206ms)  : 193, 219
    master - mean (205ms)  : 196, 213

    section Bailout
    This PR (8440) - mean (209ms)  : 200, 219
    master - mean (209ms)  : 201, 217

    section CallTarget+Inlining+NGEN
    This PR (8440) - mean (1,217ms)  : 1150, 1284
    master - mean (1,218ms)  : 1163, 1272

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8440) - mean (296ms)  : 279, 313
    master - mean (298ms)  : 280, 316

    section Bailout
    This PR (8440) - mean (297ms)  : 282, 311
    master - mean (299ms)  : 282, 316

    section CallTarget+Inlining+NGEN
    This PR (8440) - mean (969ms)  : 939, 1000
    master - mean (971ms)  : 939, 1003

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8440) - mean (288ms)  : 271, 305
    master - mean (291ms)  : 276, 306

    section Bailout
    This PR (8440) - mean (289ms)  : 273, 306
    master - mean (290ms)  : 276, 304

    section CallTarget+Inlining+NGEN
    This PR (8440) - mean (1,166ms)  : 1120, 1212
    master - mean (1,166ms)  : 1125, 1206

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8440) - mean (287ms)  : 273, 302
    master - mean (290ms)  : 273, 306

    section Bailout
    This PR (8440) - mean (289ms)  : 273, 305
    master - mean (291ms)  : 273, 310

    section CallTarget+Inlining+NGEN
    This PR (8440) - mean (1,054ms)  : 996, 1111
    master - mean (1,052ms)  : 993, 1111

Loading

@kr-igor kr-igor marked this pull request as ready for review April 10, 2026 19:47
@kr-igor kr-igor requested review from a team as code owners April 10, 2026 19:47
@kr-igor kr-igor requested a review from anna-git April 10, 2026 19:47
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 10, 2026

Benchmarks

Benchmark execution time: 2026-04-28 16:57:29

Comparing candidate commit 66e7785 in PR branch kr-igor/dsm-tt-manual-api-v0 with baseline commit c2ddea2 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 56 known flaky benchmarks, 31 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟩 throughput [+8708.952op/s; +10959.572op/s] or [+7.320%; +9.212%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+310.903ms; +315.580ms] or [+154.281%; +156.602%]
  • 🟥 throughput [-48.235op/s; -43.992op/s] or [-8.678%; -7.915%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+378.950ms; +380.262ms] or [+299.393%; +300.430%]
  • 🟩 throughput [+93.895op/s; +96.168op/s] or [+12.380%; +12.679%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+394.796ms; +397.107ms] or [+349.380%; +351.425%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-16.448ms; -12.271ms] or [-7.682%; -5.731%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.502%; +27.510%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • 🟥 throughput [-271449.799op/s; -268014.351op/s] or [-27.716%; -27.366%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-26.284ms; -21.432ms] or [-11.722%; -9.558%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-140436.858op/s; -123878.567op/s] or [-20.178%; -17.799%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟩 throughput [+8979.262op/s; +11896.987op/s] or [+5.713%; +7.570%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 throughput [+349072.090op/s; +374917.479op/s] or [+11.640%; +12.501%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-18.330ms; -13.944ms] or [-8.450%; -6.428%]
  • 🟩 throughput [+166274.584op/s; +221125.547op/s] or [+6.600%; +8.777%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+299.501ms; +300.045ms] or [+149.651%; +149.923%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟥 execution_time [+299.603ms; +302.857ms] or [+151.091%; +152.732%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟥 execution_time [+299.645ms; +302.195ms] or [+150.938%; +152.222%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+296.249ms; +297.005ms] or [+145.506%; +145.877%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+295.679ms; +299.280ms] or [+144.546%; +146.307%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+300.863ms; +302.604ms] or [+150.371%; +151.241%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+25.046µs; +48.650µs] or [+7.996%; +15.531%]
  • 🟥 throughput [-450.116op/s; -251.498op/s] or [-14.031%; -7.840%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.332ms; +300.027ms] or [+149.398%; +149.744%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • unstable execution_time [+317.235ms; +367.614ms] or [+344.688%; +399.427%]
  • 🟩 throughput [+1000.409op/s; +1143.916op/s] or [+8.221%; +9.400%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+265.652ms; +315.504ms] or [+201.707%; +239.559%]
  • 🟩 throughput [+610.445op/s; +814.385op/s] or [+5.910%; +7.884%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+356.435ms; +410.307ms] or [+163.885%; +188.655%]
  • 🟥 throughput [-565.333op/s; -525.630op/s] or [-51.225%; -47.627%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [+205.901ms; +339.135ms] or [+87.746%; +144.525%]
  • 🟥 throughput [-676.659op/s; -593.101op/s] or [-45.133%; -39.560%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+344.215ms; +354.704ms] or [+205.881%; +212.154%]
  • 🟥 throughput [-406.100op/s; -368.835op/s] or [-28.276%; -25.681%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1

  • unstable throughput [+30.336op/s; +123.278op/s] or [+5.662%; +23.011%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 throughput [+26.000op/s; +35.363op/s] or [+5.133%; +6.981%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+302.948ms; +304.114ms] or [+152.559%; +153.146%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+302.527ms; +303.888ms] or [+151.597%; +152.279%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+301.779ms; +305.151ms] or [+151.601%; +153.295%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+303.578ms; +305.472ms] or [+152.447%; +153.398%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+298.462ms; +300.027ms] or [+147.576%; +148.350%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+303.407ms; +306.834ms] or [+153.780%; +155.517%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.391ms; +302.786ms] or [+151.271%; +151.971%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+300.311ms; +302.422ms] or [+149.678%; +150.730%]
  • 🟩 throughput [+46226.815op/s; +51251.368op/s] or [+9.179%; +10.177%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+298.968ms; +301.451ms] or [+148.734%; +149.969%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-16.255ms; -12.618ms] or [-7.559%; -5.867%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-19.869KB; -19.848KB] or [-7.248%; -7.240%]
  • unstable execution_time [-59.564µs; -7.987µs] or [-11.773%; -1.579%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟩 allocated_mem [-18.706KB; -18.689KB] or [-6.819%; -6.813%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • unstable execution_time [+6.409µs; +10.708µs] or [+15.149%; +25.310%]
  • 🟥 throughput [-4739.917op/s; -2940.281op/s] or [-19.954%; -12.378%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-13.219µs; -5.961µs] or [-20.509%; -9.248%]
  • 🟩 throughput [+1484.942op/s; +3006.060op/s] or [+9.111%; +18.443%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.844ms; +302.877ms] or [+152.569%; +153.091%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+302.253ms; +305.576ms] or [+153.846%; +155.537%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+300.181ms; +302.174ms] or [+150.278%; +151.275%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.412ms; +301.129ms] or [+149.230%; +150.086%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+300.248ms; +301.507ms] or [+150.770%; +151.403%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+303.357ms; +306.155ms] or [+153.843%; +155.262%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.283ms; +299.931ms] or [+149.284%; +149.607%]
  • 🟩 throughput [+66116750.370op/s; +66384844.841op/s] or [+48.150%; +48.346%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟥 execution_time [+425.102ms; +429.468ms] or [+528.690%; +534.119%]
  • 🟩 throughput [+1078.110op/s; +1252.310op/s] or [+8.334%; +9.681%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+299.417ms; +300.333ms] or [+149.342%; +149.799%]
  • 🟩 throughput [+14925591.821op/s; +17858767.578op/s] or [+6.611%; +7.910%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+80754.417op/s; +94537.253op/s] or [+7.540%; +8.827%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 throughput [+55160.176op/s; +63753.665op/s] or [+5.478%; +6.332%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+30124.035op/s; +38533.836op/s] or [+5.470%; +6.997%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

  • 🟩 throughput [+25505.789op/s; +35182.041op/s] or [+5.709%; +7.875%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 throughput [+71426.266op/s; +88869.921op/s] or [+7.980%; +9.929%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

/// <param name="checkpointName">The logical name of the checkpoint (e.g. "kafka-produce", "http-send").</param>
[Instrumented]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void TrackTransaction(ISpan span, string transactionId, string checkpointName)
Copy link
Copy Markdown
Member

@lucaspimentel lucaspimentel Apr 10, 2026

Choose a reason for hiding this comment

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

Making this an extension method on ISpan might help with discoverability and make it feel more idiomatic. You only need to add this to the first parameter in the method declaration:

- public static void TrackTransaction(ISpan span, string transactionId, string checkpointName)
+ public static void TrackTransaction(this ISpan span, string transactionId, string checkpointName)

Using your example in the PR description, usage would look like:

using (var scope = Tracer.Instance.StartActive("my-operation"))
{
-    DataStreams.TrackTransaction(scope.Span, messageId, "kafka-produce");
+    scope.Span.TrackTransaction(messageId, "kafka-produce");
}

It's just C# syntax sugar. The compiler will convert it to DataStreams.TrackTransaction(...), and users can still call it that way as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm going to suggest the alternative, do we actually need this to take an ISpan, or can we implicitly apply it to the active span only? 😬 Given the method says "the active span representing the current operation" this seems like it might be ok

My concern is that taking an ISpan in the method puts us in a tricky position in practice. Customers can pass "custom" ISpan implementations and we basically have to fail in those cases. This is a problem we have today in other public APIs, and we basically have to fail in a bunch of cases.

Suggested change
public static void TrackTransaction(ISpan span, string transactionId, string checkpointName)
public static void TrackTransaction(string transactionId, string checkpointName)

That said, if we have to provide an API that takes a span, we could add it later as required, it's just not great for us implementation wise

Copy link
Copy Markdown
Member

@lucaspimentel lucaspimentel Apr 13, 2026

Choose a reason for hiding this comment

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

Interesting! Just to clarify, you mean the method call in user code would look like this (no span) and the method should act on whatever the active span is at that moment?

DataStreams.TrackTransaction(messageId, "kafka-produce");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll use the active span and simplify the iterrface.

/// <param name="checkpointName">The logical name of the checkpoint (e.g. "kafka-produce", "http-send").</param>
[Instrumented]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void TrackTransaction(ISpan span, string transactionId, string checkpointName)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm going to suggest the alternative, do we actually need this to take an ISpan, or can we implicitly apply it to the active span only? 😬 Given the method says "the active span representing the current operation" this seems like it might be ok

My concern is that taking an ISpan in the method puts us in a tricky position in practice. Customers can pass "custom" ISpan implementations and we basically have to fail in those cases. This is a problem we have today in other public APIs, and we basically have to fail in a bunch of cases.

Suggested change
public static void TrackTransaction(ISpan span, string transactionId, string checkpointName)
public static void TrackTransaction(string transactionId, string checkpointName)

That said, if we have to provide an API that takes a span, we could add it later as required, it's just not great for us implementation wise

Comment thread tracer/src/Datadog.Trace.Manual/DataStreams.cs Outdated
Comment thread tracer/src/Datadog.Trace.Manual/DataStreams.cs
MethodName = "TrackTransaction",
ReturnTypeName = ClrNames.Void,
ParameterTypeNames = ["Datadog.Trace.ISpan", ClrNames.String, ClrNames.String],
MinimumVersion = ManualInstrumentationConstants.MinVersion,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The method doesn't exist until this version, so set the minimum to the current version

Suggested change
MinimumVersion = ManualInstrumentationConstants.MinVersion,
MinimumVersion = "3.42.0",

Comment on lines +39 to +50
if (span is IDuckType { Instance: Span s })
{
s.TrackTransaction(manager, transactionId, checkpointName);
}
else if (span is Span autoSpan)
{
autoSpan.TrackTransaction(manager, transactionId, checkpointName);
}
else
{
manager.TrackTransaction(transactionId, checkpointName);
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we ditch the span from the public API we get:

Suggested change
if (span is IDuckType { Instance: Span s })
{
s.TrackTransaction(manager, transactionId, checkpointName);
}
else if (span is Span autoSpan)
{
autoSpan.TrackTransaction(manager, transactionId, checkpointName);
}
else
{
manager.TrackTransaction(transactionId, checkpointName);
}
if (Tracer.Instance.InternalActiveScope?.Span is Span span)
{
span.TrackTransaction(manager, transactionId, checkpointName);
}
else
{
manager.TrackTransaction(transactionId, checkpointName);
}

public void HappyPath_DuckTypedRealSpan_SetsTagAndTracksTransaction()
{
var dsm = CreateDsmWithWriter(out var writer);
var manager = CreateTracerManager(dsm);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is problematic - it creates a TracerManager that runs for the life of the test application and is never shut down. A better approach is to use the TracerHelpers.CreateScoped helper we have, and use it in a using declaration so that it's disposed.

I would personally also strongly prefer extracting a method that doesn't use the static Tracer.Instance method calls inside the integration, and instead passes in the "local" tracer instance instead, if that makes sense? (I can demonstrate if not!)

await Task.Delay(millisecondsDelay: 100);

Console.WriteLine("Sending one message to the queue...");
Datadog.Trace.DataStreams.TrackTransaction(scope.Span, "my-transaction-id", "send-checkpoint");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't actually seem to have an impact on the integration tests, which seems like a problem? 🤔 Essentially it means it's a test without asserts 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's verified in DataStreamsMonitoringManualApiTest -> TrackTransaction

Copy link
Copy Markdown
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

LGTM in principle, but I'd strongly suggest handling the null values scenario, ideally by splitting the public API and instrumentation target

Comment thread tracer/src/Datadog.Trace.Manual/DataStreams.cs
}
public static class DataStreams
{
public static void TrackTransaction(Datadog.Trace.ISpan span, string transactionId, string checkpointName) { }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This API changed:

Suggested change
public static void TrackTransaction(Datadog.Trace.ISpan span, string transactionId, string checkpointName) { }
public static void TrackTransaction(string transactionId, string checkpointName) { }

Copy link
Copy Markdown
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kr-igor kr-igor merged commit 05672e3 into master Apr 28, 2026
139 checks passed
@kr-igor kr-igor deleted the kr-igor/dsm-tt-manual-api-v0 branch April 28, 2026 18:54
@github-actions github-actions Bot added this to the vNext-v3 milestone Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:data-streams-monitoring type:enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants