Skip to content

Conversation

robcarlan-datadog
Copy link
Contributor

@robcarlan-datadog robcarlan-datadog commented Mar 11, 2025

Summary of changes

Sets the messaging.destination.name tag to the Kafka topic name for the auto-instrumented Kafka tracer. This results in the inferred service name of a trace to be the Kafka topic, rather than the broker.

Reason for change

For an auto instrumented tracer, the inferred service name for kafka requests uses the precedence defined here. The peer.messaging.destination peer tag is mapped from messaging.destination.name, which is the topic name for Kafka.
This then provides better fidelity for trace propagation in the service map, as we correlate a trace with a given topic, rather than the Kafka broker.
This has already been done for other tracers, i.e. python.

Implementation details

Added the tag in Kafka auto-instrumentation on produce & consume side. Consistent with other tracer implementations.

Test coverage

  • Updated integration tests
  • Ran this version of the tracer on a local test app, and verified in APM that we populate the new tag

Other details

N/A

@datadog-datadog-prod-us1
Copy link

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

Datadog Report

All test runs 9ab660e 🔗

2 Total Test Services: 0 Failed, 2 Passed
1 with Regressions

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Performance Regressions Test Service View
dd-trace-dotnet 0 0 0 562293 4410 35h 41m 2.21s 7 Link
exploration_tests 0 0 0 22085 3 2m 8.85s 0 Link

⌛ Performance Regressions vs Default Branch (7)

This report shows up to 5 performance regressions.

  • Baseline_exception - scenarios 4.08s (+190.48ms, +5%) - Details
  • CallTarget+Inlining+NGEN - Samples.FakeDbCommand.windows.net60.json.scenarios 700.97ms (+57.52ms, +9%) - Details
  • CallTarget+Inlining+NGEN - Samples.FakeDbCommand.windows.net462.json.scenarios 1.09s (+86.02ms, +9%) - Details
  • CallTarget+Inlining+NGEN - Samples.FakeDbCommand.windows.netcoreapp31.json.scenarios 751.72ms (+64.06ms, +9%) - Details
  • Baseline_allocation - scenarios 2.17s (+26.86ms, +1%) - Details

@andrewlock
Copy link
Member

andrewlock commented Mar 11, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6758) - mean (79ms)  : 72, 86
     .   : milestone, 79,
    master - mean (69ms)  : 65, 74
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6758) - mean (1,093ms)  : crit, 1056, 1130
     .   : crit, milestone, 1093,
    master - mean (1,002ms)  : 977, 1026
     .   : milestone, 1002,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6758) - mean (115ms)  : 109, 121
     .   : milestone, 115,
    master - mean (102ms)  : 100, 104
     .   : milestone, 102,

    section CallTarget+Inlining+NGEN
    This PR (6758) - mean (752ms)  : crit, 729, 774
     .   : crit, milestone, 752,
    master - mean (686ms)  : 665, 706
     .   : milestone, 686,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6758) - mean (102ms)  : 97, 107
     .   : milestone, 102,
    master - mean (89ms)  : 87, 91
     .   : milestone, 89,

    section CallTarget+Inlining+NGEN
    This PR (6758) - mean (701ms)  : crit, 680, 722
     .   : crit, milestone, 701,
    master - mean (642ms)  : 626, 659
     .   : milestone, 642,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6758) - mean (191ms)  : 187, 195
     .   : milestone, 191,
    master - mean (190ms)  : 186, 195
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (6758) - mean (1,113ms)  : 1087, 1139
     .   : milestone, 1113,
    master - mean (1,109ms)  : 1078, 1139
     .   : milestone, 1109,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6758) - mean (269ms)  : 266, 273
     .   : milestone, 269,
    master - mean (269ms)  : 265, 274
     .   : milestone, 269,

    section CallTarget+Inlining+NGEN
    This PR (6758) - mean (878ms)  : 849, 907
     .   : milestone, 878,
    master - mean (876ms)  : 847, 904
     .   : milestone, 876,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6758) - mean (262ms)  : 259, 265
     .   : milestone, 262,
    master - mean (262ms)  : 258, 265
     .   : milestone, 262,

    section CallTarget+Inlining+NGEN
    This PR (6758) - mean (860ms)  : 825, 895
     .   : milestone, 860,
    master - mean (861ms)  : 824, 898
     .   : milestone, 861,

Loading

@andrewlock
Copy link
Member

andrewlock commented Mar 11, 2025

Benchmarks Report for tracer 🐌

Benchmarks for #6758 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.165
  • 2 benchmarks are slower, with geometric mean 1.216
  • 1 benchmarks have fewer allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.91μs 42.9ns 231ns 0.0124 0.00412 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.3μs 55.4ns 323ns 0.0243 0.0097 0 5.81 KB
master StartStopWithChild net472 16.1μs 44.3ns 166ns 1.04 0.304 0.0962 6.22 KB
#6758 StartStopWithChild net6.0 8.1μs 43.2ns 237ns 0.0194 0.00776 0 5.61 KB
#6758 StartStopWithChild netcoreapp3.1 10μs 51ns 239ns 0.0206 0.0103 0 5.81 KB
#6758 StartStopWithChild net472 16.1μs 47.5ns 184ns 1.05 0.313 0.112 6.22 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 517μs 280ns 969ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 658μs 407ns 1.52μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 844μs 471ns 1.83μs 0.422 0 0 3.3 KB
#6758 WriteAndFlushEnrichedTraces net6.0 509μs 331ns 1.24μs 0 0 0 2.7 KB
#6758 WriteAndFlushEnrichedTraces netcoreapp3.1 669μs 644ns 2.49μs 0 0 0 2.7 KB
#6758 WriteAndFlushEnrichedTraces net472 861μs 680ns 2.63μs 0.431 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 129μs 565ns 2.19μs 0.194 0 0 14.47 KB
master SendRequest netcoreapp3.1 148μs 131ns 490ns 0.223 0 0 17.27 KB
master SendRequest net472 0.000427ns 0.000245ns 0.000918ns 0 0 0 0 b
#6758 SendRequest net6.0 131μs 460ns 1.78μs 0.2 0 0 14.47 KB
#6758 SendRequest netcoreapp3.1 147μs 238ns 921ns 0.22 0 0 17.27 KB
#6758 SendRequest net472 0.000835ns 0.000312ns 0.00117ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #6758

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.7 KB 41.46 KB -239 B -0.57%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 597μs 3.88μs 37.8μs 0.604 0 0 41.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 682μs 2.83μs 10.2μs 0.332 0 0 41.7 KB
master WriteAndFlushEnrichedTraces net472 851μs 4.11μs 15.9μs 8.08 2.55 0.425 53.32 KB
#6758 WriteAndFlushEnrichedTraces net6.0 595μs 3.61μs 35.6μs 0.551 0 0 41.76 KB
#6758 WriteAndFlushEnrichedTraces netcoreapp3.1 734μs 4.17μs 29.5μs 0.428 0 0 41.46 KB
#6758 WriteAndFlushEnrichedTraces net472 869μs 4.34μs 19.4μs 8.39 2.52 0.419 53.39 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.34μs 1.54ns 5.77ns 0.0142 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.79μs 1.82ns 7.06ns 0.0136 0 0 1.02 KB
master ExecuteNonQuery net472 2.06μs 2.46ns 9.52ns 0.156 0.00103 0 987 B
#6758 ExecuteNonQuery net6.0 1.29μs 1.67ns 6.26ns 0.0143 0 0 1.02 KB
#6758 ExecuteNonQuery netcoreapp3.1 1.75μs 2.84ns 11ns 0.0131 0 0 1.02 KB
#6758 ExecuteNonQuery net472 2.06μs 2.28ns 8.82ns 0.156 0.00103 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.24μs 0.25ns 0.936ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.59μs 2.22ns 8.32ns 0.0135 0 0 976 B
master CallElasticsearch net472 2.71μs 1.55ns 5.81ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.32μs 0.547ns 2.05ns 0.0132 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.63μs 0.495ns 1.92ns 0.0143 0 0 1.02 KB
master CallElasticsearchAsync net472 2.71μs 1.18ns 4.41ns 0.167 0 0 1.05 KB
#6758 CallElasticsearch net6.0 1.15μs 0.732ns 2.84ns 0.0136 0 0 976 B
#6758 CallElasticsearch netcoreapp3.1 1.57μs 1.51ns 5.64ns 0.0133 0 0 976 B
#6758 CallElasticsearch net472 2.64μs 2.23ns 8.63ns 0.158 0 0 995 B
#6758 CallElasticsearchAsync net6.0 1.32μs 1.98ns 7.69ns 0.0133 0 0 952 B
#6758 CallElasticsearchAsync netcoreapp3.1 1.62μs 0.431ns 1.55ns 0.0138 0 0 1.02 KB
#6758 CallElasticsearchAsync net472 2.74μs 1.39ns 5.39ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.32μs 0.707ns 2.64ns 0.0131 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.63μs 2.42ns 9.04ns 0.0128 0 0 952 B
master ExecuteAsync net472 1.78μs 0.353ns 1.32ns 0.145 0 0 915 B
#6758 ExecuteAsync net6.0 1.2μs 0.658ns 2.55ns 0.0132 0 0 952 B
#6758 ExecuteAsync netcoreapp3.1 1.69μs 1.72ns 6.64ns 0.0126 0 0 952 B
#6758 ExecuteAsync net472 1.83μs 0.553ns 2.07ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.43μs 1.83ns 6.86ns 0.031 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.36μs 1.44ns 5.57ns 0.0375 0 0 2.85 KB
master SendAsync net472 7.55μs 2.14ns 8ns 0.496 0 0 3.12 KB
#6758 SendAsync net6.0 4.26μs 1.14ns 4.41ns 0.0322 0 0 2.31 KB
#6758 SendAsync netcoreapp3.1 5.4μs 1.82ns 6.79ns 0.0379 0 0 2.85 KB
#6758 SendAsync net472 7.57μs 2.06ns 7.96ns 0.492 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.62μs 1.01ns 3.78ns 0.0238 0 0 1.69 KB
master EnrichedLog netcoreapp3.1 2.35μs 1.11ns 4.29ns 0.0224 0 0 1.69 KB
master EnrichedLog net472 2.57μs 1.6ns 6ns 0.257 0 0 1.62 KB
#6758 EnrichedLog net6.0 1.64μs 0.528ns 2.05ns 0.0238 0 0 1.69 KB
#6758 EnrichedLog netcoreapp3.1 2.28μs 0.761ns 2.85ns 0.022 0 0 1.69 KB
#6758 EnrichedLog net472 2.64μs 0.645ns 2.32ns 0.258 0 0 1.62 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 111μs 80.5ns 301ns 0.0557 0 0 4.3 KB
master EnrichedLog netcoreapp3.1 117μs 157ns 607ns 0.0581 0 0 4.3 KB
master EnrichedLog net472 152μs 157ns 609ns 0.685 0.228 0 4.49 KB
#6758 EnrichedLog net6.0 111μs 82.1ns 318ns 0.0555 0 0 4.3 KB
#6758 EnrichedLog netcoreapp3.1 115μs 132ns 493ns 0.0572 0 0 4.3 KB
#6758 EnrichedLog net472 152μs 192ns 745ns 0.678 0.226 0 4.49 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.96μs 1.47ns 5.51ns 0.0312 0 0 2.25 KB
master EnrichedLog netcoreapp3.1 4.17μs 4.88ns 18.9ns 0.0289 0 0 2.25 KB
master EnrichedLog net472 4.76μs 2.5ns 9.69ns 0.328 0 0 2.07 KB
#6758 EnrichedLog net6.0 3.22μs 1.34ns 5.2ns 0.0305 0 0 2.25 KB
#6758 EnrichedLog netcoreapp3.1 4.27μs 1.27ns 4.75ns 0.0298 0 0 2.25 KB
#6758 EnrichedLog net472 4.73μs 1.35ns 4.86ns 0.329 0 0 2.07 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.31μs 1.43ns 5.14ns 0.0163 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.85μs 0.713ns 2.67ns 0.0158 0 0 1.14 KB
master SendReceive net472 2.06μs 0.874ns 3.27ns 0.183 0 0 1.16 KB
#6758 SendReceive net6.0 1.27μs 0.564ns 2.11ns 0.0158 0 0 1.14 KB
#6758 SendReceive netcoreapp3.1 1.73μs 1.03ns 3.84ns 0.0155 0 0 1.14 KB
#6758 SendReceive net472 2.02μs 0.487ns 1.82ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.85μs 1.13ns 4.07ns 0.0227 0 0 1.62 KB
master EnrichedLog netcoreapp3.1 3.83μs 0.963ns 3.73ns 0.023 0 0 1.67 KB
master EnrichedLog net472 4.37μs 2.49ns 9.31ns 0.328 0 0 2.07 KB
#6758 EnrichedLog net6.0 2.9μs 5.45ns 19.7ns 0.023 0 0 1.62 KB
#6758 EnrichedLog netcoreapp3.1 3.92μs 5.85ns 22.6ns 0.0214 0 0 1.67 KB
#6758 EnrichedLog net472 4.46μs 3.66ns 14.2ns 0.327 0 0 2.07 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6758

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.159 594.61 689.40

Faster 🎉 in #6758

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.165 554.09 475.72

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 396ns 0.121ns 0.471ns 0.0081 0 0 576 B
master StartFinishSpan netcoreapp3.1 592ns 0.366ns 1.37ns 0.00774 0 0 576 B
master StartFinishSpan net472 594ns 0.319ns 1.23ns 0.0916 0 0 578 B
master StartFinishScope net6.0 554ns 0.151ns 0.523ns 0.00986 0 0 696 B
master StartFinishScope netcoreapp3.1 722ns 0.372ns 1.39ns 0.00937 0 0 696 B
master StartFinishScope net472 896ns 0.264ns 1.02ns 0.105 0 0 658 B
#6758 StartFinishSpan net6.0 431ns 0.146ns 0.564ns 0.00797 0 0 576 B
#6758 StartFinishSpan netcoreapp3.1 597ns 2.51ns 9.72ns 0.0076 0 0 576 B
#6758 StartFinishSpan net472 689ns 0.257ns 0.996ns 0.0917 0 0 578 B
#6758 StartFinishScope net6.0 476ns 0.196ns 0.758ns 0.00976 0 0 696 B
#6758 StartFinishScope netcoreapp3.1 716ns 0.257ns 0.995ns 0.00955 0 0 696 B
#6758 StartFinishScope net472 866ns 0.33ns 1.28ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6758

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.276 594.80 758.68

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 595ns 0.146ns 0.526ns 0.00989 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 938ns 0.635ns 2.46ns 0.00918 0 0 696 B
master RunOnMethodBegin net472 1.07μs 0.232ns 0.898ns 0.104 0 0 658 B
#6758 RunOnMethodBegin net6.0 759ns 0.532ns 2.06ns 0.00979 0 0 696 B
#6758 RunOnMethodBegin netcoreapp3.1 999ns 0.4ns 1.5ns 0.00902 0 0 696 B
#6758 RunOnMethodBegin net472 1.17μs 0.446ns 1.73ns 0.104 0 0 658 B

@robcarlan-datadog robcarlan-datadog marked this pull request as ready for review March 11, 2025 22:26
@robcarlan-datadog robcarlan-datadog requested review from a team as code owners March 11, 2025 22:26
Copy link
Collaborator

@bouwkast bouwkast left a comment

Choose a reason for hiding this comment

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

I don't see anything wrong just being nitpicky as it isn't obvious how we use / generate code for Tags objects without knowning

@robcarlan-datadog robcarlan-datadog requested a review from a team as a code owner March 12, 2025 20:42
Copy link
Collaborator

@bouwkast bouwkast left a comment

Choose a reason for hiding this comment

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

Looks good thanks!

Copy link
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 👍

Note to self, we should probably have snapshot tests for the Kafka tests!

@robcarlan-datadog
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Mar 18, 2025

View all feedbacks in Devflow UI.
2025-03-18 13:33:40 UTC ℹ️ Start processing command /merge


2025-03-18 13:33:50 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 0s (p90).


2025-03-18 14:16:51 UTCMergeQueue: The checks failed on this merge request

Tests failed on this commit 3706b52:

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.

@robcarlan-datadog
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Mar 18, 2025

View all feedbacks in Devflow UI.
2025-03-18 21:19:52 UTC ℹ️ Start processing command /merge


2025-03-18 21:19:59 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-03-19 01:20:05 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

@robcarlan-datadog
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Mar 19, 2025

View all feedbacks in Devflow UI.
2025-03-19 13:06:40 UTC ℹ️ Start processing command /merge


2025-03-19 13:06:46 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 0s (p90).


2025-03-19 13:40:23 UTCMergeQueue: The checks failed on this merge request

Tests failed on this commit bee5f78:

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.

@robcarlan-datadog
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Mar 19, 2025

View all feedbacks in Devflow UI.
2025-03-19 13:55:47 UTC ℹ️ Start processing command /merge


2025-03-19 13:55:54 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-03-19 15:16:16 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in master is approximately 0s (p90).


2025-03-19 15:34:26 UTC ⚠️ MergeQueue: This merge request build was cancelled

[email protected] cancelled this merge request build

@robcarlan-datadog
Copy link
Contributor Author

/remove

@dd-devflow
Copy link

dd-devflow bot commented Mar 19, 2025

View all feedbacks in Devflow UI.
2025-03-19 15:34:19 UTC ℹ️ Start processing command /remove


2025-03-19 15:34:24 UTC ℹ️ Devflow: /remove

@bouwkast bouwkast merged commit 5e0694a into master Mar 19, 2025
129 of 133 checks passed
@bouwkast bouwkast deleted the rob.carlan/add-kafka-messaging-destination-name branch March 19, 2025 16:03
@github-actions github-actions bot added this to the vNext-v3 milestone Mar 19, 2025
ddyurchenko pushed a commit that referenced this pull request Mar 31, 2025
## Summary of changes

Sets the `messaging.destination.name` tag to the Kafka topic name for
the auto-instrumented Kafka tracer. This results in the inferred service
name of a trace to be the Kafka topic, rather than the broker.

## Reason for change

For an auto instrumented tracer, the inferred service name for kafka
requests uses the precedence defined
[here](https://docs.datadoghq.com/tracing/services/inferred_services/?tab=agentv7551#precedence-of-peer-tags).
The `peer.messaging.destination` peer tag is mapped from
`messaging.destination.name`, which is the topic name for Kafka.
This then provides better fidelity for trace propagation in the service
map, as we correlate a trace with a given topic, rather than the Kafka
broker.
This has already been done for other tracers, i.e.
[python](DataDog/dd-trace-py#12593).

## Implementation details
Added the tag in Kafka auto-instrumentation on produce & consume side.
Consistent with other tracer implementations.

## Test coverage
* Updated integration tests
* Ran this version of the tracer on a local test app, and verified in
APM that we populate the new tag

## Other details
N/A
chojomok pushed a commit that referenced this pull request Jul 15, 2025
## Summary of changes

Sets the `messaging.destination.name` tag to the Kafka topic name for
the auto-instrumented Kafka tracer. This results in the inferred service
name of a trace to be the Kafka topic, rather than the broker.

## Reason for change

For an auto instrumented tracer, the inferred service name for kafka
requests uses the precedence defined
[here](https://docs.datadoghq.com/tracing/services/inferred_services/?tab=agentv7551#precedence-of-peer-tags).
The `peer.messaging.destination` peer tag is mapped from
`messaging.destination.name`, which is the topic name for Kafka.
This then provides better fidelity for trace propagation in the service
map, as we correlate a trace with a given topic, rather than the Kafka
broker.
This has already been done for other tracers, i.e.
[python](DataDog/dd-trace-py#12593).

## Implementation details
Added the tag in Kafka auto-instrumentation on produce & consume side.
Consistent with other tracer implementations.

## Test coverage
* Updated integration tests
* Ran this version of the tracer on a local test app, and verified in
APM that we populate the new tag

## Other details
N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants