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

[serverless] Create EventBridge Instrumentation and Inject Trace Context #6096

Merged
merged 24 commits into from
Oct 15, 2024

Conversation

nhulston
Copy link
Contributor

@nhulston nhulston commented Sep 27, 2024

Summary of changes

This creates a new instrumentation for EventBridge and intercepts PutEvents and PutEventsAsync to inject trace context. This allows the agent to combine spans from a distributed (serverless) architecture into a single trace.

This PR only injects trace context. I'm working on PR 1 and PR 2 to update the Lambda extension to use this trace context to create EventBridge spans.

I am also working on a similar PR in dd-trace-java and dd-trace-go.

Reason for change

SNS and SQS are already supported, and the tracer currently injects trace context into message attributes fields for them. However, EventBridge wasn't supported, and this PR aims to fix this problem.

Implementation details

I followed the documentation to create an instrumentation. Much of the logic was mirrored from the existing implementation of SNS, since EventBridge and SNS are extremely similar.

Overall, AWS's EventBridge API is lacking some features, so we have to do some hacky solutions.

  • SNS and SQS call their custom input field messageAttributes, and EventBridge calls it detail
  • Unlike SNS and SQS, the detail field is given as a raw string. Therefore, we have to manually modify the detail string using StringBuilder.
  • The agent has no reliable way of getting the start time of the EventBridge span, so the tracer has to put the current time into detail[_datadog] under the header x-datadog-start-time
  • The EventBridge API has no way of getting the EventBridge bus name, so the tracer has to put the bus name (which is used to create the span resource name) into detail[_datadog] under the header x-datadog-resource-name

Test coverage

I added system tests for SNS/SQS: DataDog/system-tests#3204

I added unit tests and integration tests.

Unit tests can be ran with:

cd tracer
dotnet test ./test/Datadog.Trace.ClrProfiler.Managed.Tests

Integration tests can be ran with these commands:

cd tracer

# Start docker localstock
docker run --rm -it -p 4566:4566 -p 4571:4571 -e SERVICES=events localstack/localstack

# Run integation tests
./build.sh BuildAndRunOSxIntegrationTests -buildConfiguration Debug -framework net6.0 -Filter AwsEventBridgeTests -SampleName Samples.AWS.EventBridge

I also did manual testing:
Screenshot 2024-09-30 at 11 00 47 AM

Other details

There are lots of diffs and files changed. I recommend reviewers to review the PR commit by commit. All the autogenerated files were added in a single commit, which should make the review process less overwhelming.

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Sep 27, 2024

Datadog Report

Branch report: nicholas.hulston/eventbridge-inject-trace-context
Commit report: c01b3a5
Test service: dd-trace-dotnet

✅ 0 Failed, 362288 Passed, 2084 Skipped, 15h 32m 8.13s Total Time
❄️ 1 New Flaky
⌛ 1 Performance Regression

New Flaky Tests (1)

  • NoExceptions - Datadog.Trace.ClrProfiler.IntegrationTests.SmokeTests.RuntimeMetricsShutdownSmokeTest - Last Failure

    Expand for error
     Expected exit code: 0, actual exit code: 134. Message: Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
        at System.Diagnostics.Tracing.EventPipePayloadDecoder.DecodePayload(EventMetadata ByRef, System.ReadOnlySpan\`1<Byte>)
        at System.Diagnostics.Tracing.EventPipeEventDispatcher.DispatchEventsToEventListeners()
        at System.Threading.Tasks.Task.InnerInvoke()
        at System.Threading.Tasks.Task+<>c.<.cctor>b__277_0(System.Object)
        at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
        at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
        at System.Threading.Tasks.Task.ExecuteEntryUnsafe(System.Threading.Thread)
        at System.Threading.Tasks.ThreadPoolTaskScheduler+<>c.<.cctor>b__10_0(System.Object)
        at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
     ...
    

⌛ Performance Regressions vs Default Branch (1)

  • Baseline - Samples.FakeDbCommand.windows.netcoreapp31.json.scenarios 112.69ms (+3.81ms, +4%) - Details

@andrewlock
Copy link
Member

andrewlock commented Sep 27, 2024

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 (6096) - mean (71ms)  : 68, 73
     .   : milestone, 71,
    master - mean (70ms)  : 68, 72
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (6096) - mean (1,140ms)  : 1115, 1164
     .   : milestone, 1140,
    master - mean (1,111ms)  : 1087, 1135
     .   : milestone, 1111,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6096) - mean (113ms)  : 109, 116
     .   : milestone, 113,
    master - mean (109ms)  : 106, 111
     .   : milestone, 109,

    section CallTarget+Inlining+NGEN
    This PR (6096) - mean (791ms)  : 765, 817
     .   : milestone, 791,
    master - mean (772ms)  : 756, 789
     .   : milestone, 772,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6096) - mean (93ms)  : 89, 97
     .   : milestone, 93,
    master - mean (92ms)  : 89, 95
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (6096) - mean (729ms)  : 715, 743
     .   : milestone, 729,
    master - mean (730ms)  : 714, 745
     .   : milestone, 730,

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

    section CallTarget+Inlining+NGEN
    This PR (6096) - mean (1,215ms)  : 1141, 1288
     .   : milestone, 1215,
    master - mean (1,197ms)  : 1170, 1224
     .   : milestone, 1197,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6096) - mean (275ms)  : 270, 280
     .   : milestone, 275,
    master - mean (273ms)  : 269, 278
     .   : milestone, 273,

    section CallTarget+Inlining+NGEN
    This PR (6096) - mean (948ms)  : 903, 994
     .   : milestone, 948,
    master - mean (939ms)  : 919, 958
     .   : milestone, 939,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6096) - mean (264ms)  : 259, 270
     .   : milestone, 264,
    master - mean (263ms)  : 259, 266
     .   : milestone, 263,

    section CallTarget+Inlining+NGEN
    This PR (6096) - mean (925ms)  : 904, 947
     .   : milestone, 925,
    master - mean (926ms)  : 906, 947
     .   : milestone, 926,

Loading

@andrewlock
Copy link
Member

andrewlock commented Sep 27, 2024

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6096) (11.009M)   : 0, 11008821
    master (11.168M)   : 0, 11168199
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (6096) (7.414M)   : 0, 7413507
    master (7.377M)   : 0, 7377465
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.726M)   : 0, 7725756

    section Manual
    master (11.062M)   : 0, 11062026

    section Manual + Automatic
    This PR (6096) (6.784M)   : 0, 6783817
    master (6.902M)   : 0, 6901659

    section DD_TRACE_ENABLED=0
    master (10.195M)   : 0, 10194503

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6096) (9.623M)   : 0, 9623498
    master (9.584M)   : 0, 9583681
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (6096) (6.414M)   : 0, 6413888
    master (6.629M)   : 0, 6629382

    section Trace stats
    master (6.851M)   : 0, 6850733

    section Manual
    master (9.454M)   : 0, 9454208

    section Manual + Automatic
    This PR (6096) (6.040M)   : 0, 6040346
    master (6.166M)   : 0, 6165611

    section DD_TRACE_ENABLED=0
    master (8.858M)   : 0, 8858385

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6096) (9.988M)   : 0, 9988253
    master (10.308M)   : 0, 10307557
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (6096) (6.708M)   : 0, 6708195
    master (6.544M)   : 0, 6543815
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.344M)   : 0, 7343919

    section Manual
    master (10.030M)   : 0, 10029915

    section Manual + Automatic
    This PR (6096) (6.106M)   : 0, 6106327
    master (6.179M)   : 0, 6178568

    section DD_TRACE_ENABLED=0
    master (9.389M)   : 0, 9389459

Loading

@andrewlock
Copy link
Member

andrewlock commented Sep 27, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6096 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.183
  • All benchmarks have the same 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 8.09μs 45.8ns 327ns 0.0152 0.0038 0 5.42 KB
master StartStopWithChild netcoreapp3.1 10.2μs 55.5ns 328ns 0.015 0.00499 0 5.62 KB
master StartStopWithChild net472 17.4μs 86ns 365ns 1.03 0.327 0.106 6.06 KB
#6096 StartStopWithChild net6.0 8.01μs 46ns 350ns 0.0169 0.00843 0 5.43 KB
#6096 StartStopWithChild netcoreapp3.1 10.2μs 54ns 281ns 0.0195 0.00488 0 5.62 KB
#6096 StartStopWithChild net472 16.6μs 74.6ns 289ns 1.02 0.298 0.0967 6.07 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 473μs 298ns 1.15μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 649μs 510ns 1.91μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 845μs 365ns 1.41μs 0.422 0 0 3.3 KB
#6096 WriteAndFlushEnrichedTraces net6.0 482μs 281ns 1.05μs 0 0 0 2.7 KB
#6096 WriteAndFlushEnrichedTraces netcoreapp3.1 636μs 493ns 1.91μs 0 0 0 2.7 KB
#6096 WriteAndFlushEnrichedTraces net472 851μs 687ns 2.66μs 0.425 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 190μs 976ns 4.68μs 0.193 0 0 18.45 KB
master SendRequest netcoreapp3.1 217μs 1.25μs 10.1μs 0.214 0 0 20.61 KB
master SendRequest net472 0.000988ns 0.000396ns 0.00143ns 0 0 0 0 b
#6096 SendRequest net6.0 197μs 1.06μs 7.91μs 0.192 0 0 18.45 KB
#6096 SendRequest netcoreapp3.1 221μs 1.29μs 12.1μs 0.219 0 0 20.61 KB
#6096 SendRequest net472 0.00419ns 0.00105ns 0.00408ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 586μs 2.98μs 13.3μs 0.573 0 0 41.78 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 682μs 2.58μs 9.99μs 0.342 0 0 41.95 KB
master WriteAndFlushEnrichedTraces net472 862μs 4.29μs 18.2μs 8.74 2.62 0.437 53.28 KB
#6096 WriteAndFlushEnrichedTraces net6.0 552μs 2.82μs 13.5μs 0.543 0 0 41.69 KB
#6096 WriteAndFlushEnrichedTraces netcoreapp3.1 691μs 3.87μs 24.5μs 0.327 0 0 41.86 KB
#6096 WriteAndFlushEnrichedTraces net472 887μs 4.11μs 15.9μs 8.5 2.55 0.425 53.29 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.3μs 0.876ns 3.39ns 0.0143 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.79μs 1.47ns 5.67ns 0.0134 0 0 1.02 KB
master ExecuteNonQuery net472 2.15μs 2.21ns 8.56ns 0.156 0 0 987 B
#6096 ExecuteNonQuery net6.0 1.31μs 1.68ns 6.51ns 0.0145 0 0 1.02 KB
#6096 ExecuteNonQuery netcoreapp3.1 1.79μs 1.37ns 5.12ns 0.0137 0 0 1.02 KB
#6096 ExecuteNonQuery net472 2.12μs 1.9ns 7.37ns 0.156 0 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.13μs 0.805ns 3.12ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.47μs 0.643ns 2.49ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.46μs 2ns 7.74ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.25μs 1.25ns 4.83ns 0.0131 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.67μs 1.42ns 5.49ns 0.0134 0 0 1.02 KB
master CallElasticsearchAsync net472 2.57μs 1.81ns 7.03ns 0.166 0 0 1.05 KB
#6096 CallElasticsearch net6.0 1.14μs 0.692ns 2.59ns 0.0136 0 0 976 B
#6096 CallElasticsearch netcoreapp3.1 1.6μs 0.515ns 2ns 0.0129 0 0 976 B
#6096 CallElasticsearch net472 2.53μs 2.06ns 7.42ns 0.158 0 0 995 B
#6096 CallElasticsearchAsync net6.0 1.3μs 0.793ns 2.97ns 0.013 0 0 952 B
#6096 CallElasticsearchAsync netcoreapp3.1 1.61μs 0.944ns 3.4ns 0.0137 0 0 1.02 KB
#6096 CallElasticsearchAsync net472 2.66μs 2.43ns 9.41ns 0.167 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.2μs 0.688ns 2.66ns 0.0133 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.61μs 0.942ns 3.65ns 0.0128 0 0 952 B
master ExecuteAsync net472 1.83μs 0.903ns 3.5ns 0.145 0 0 915 B
#6096 ExecuteAsync net6.0 1.25μs 0.851ns 3.3ns 0.0132 0 0 952 B
#6096 ExecuteAsync netcoreapp3.1 1.54μs 3.4ns 12.7ns 0.0125 0 0 952 B
#6096 ExecuteAsync net472 1.75μs 0.854ns 3.31ns 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.14μs 3.83ns 14.8ns 0.0311 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.01μs 3.45ns 13.4ns 0.0375 0 0 2.76 KB
master SendAsync net472 7.69μs 3.95ns 15.3ns 0.5 0 0 3.15 KB
#6096 SendAsync net6.0 4.26μs 1.34ns 5.03ns 0.0299 0 0 2.22 KB
#6096 SendAsync netcoreapp3.1 5.14μs 2.4ns 8.97ns 0.036 0 0 2.76 KB
#6096 SendAsync net472 7.83μs 3.98ns 15.4ns 0.498 0 0 3.15 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 7.34ns 28.4ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.07μs 1.32ns 5.12ns 0.0218 0 0 1.64 KB
master EnrichedLog net472 2.59μs 1.73ns 6.7ns 0.249 0 0 1.57 KB
#6096 EnrichedLog net6.0 1.44μs 1.05ns 4.06ns 0.0232 0 0 1.64 KB
#6096 EnrichedLog netcoreapp3.1 2.24μs 2.2ns 8.52ns 0.0215 0 0 1.64 KB
#6096 EnrichedLog net472 2.6μs 1.75ns 6.78ns 0.249 0 0 1.57 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 116μs 171ns 664ns 0.0576 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 122μs 225ns 871ns 0 0 0 4.28 KB
master EnrichedLog net472 151μs 107ns 372ns 0.681 0.227 0 4.46 KB
#6096 EnrichedLog net6.0 117μs 138ns 535ns 0.0586 0 0 4.28 KB
#6096 EnrichedLog netcoreapp3.1 122μs 169ns 653ns 0 0 0 4.28 KB
#6096 EnrichedLog net472 151μs 322ns 1.25μs 0.677 0.226 0 4.46 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 3.08μs 1.08ns 4.06ns 0.0307 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.21μs 1.2ns 4.63ns 0.0295 0 0 2.2 KB
master EnrichedLog net472 4.72μs 1.6ns 6.18ns 0.319 0 0 2.02 KB
#6096 EnrichedLog net6.0 3.06μs 0.941ns 3.65ns 0.0307 0 0 2.2 KB
#6096 EnrichedLog netcoreapp3.1 4.2μs 1.8ns 6.96ns 0.0293 0 0 2.2 KB
#6096 EnrichedLog net472 4.84μs 1.44ns 5.38ns 0.321 0 0 2.02 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.34μs 0.703ns 2.54ns 0.0161 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.75μs 1.2ns 4.63ns 0.0148 0 0 1.14 KB
master SendReceive net472 2.16μs 0.969ns 3.75ns 0.183 0.00107 0 1.16 KB
#6096 SendReceive net6.0 1.32μs 0.624ns 2.42ns 0.0158 0 0 1.14 KB
#6096 SendReceive netcoreapp3.1 1.82μs 0.534ns 2ns 0.0154 0 0 1.14 KB
#6096 SendReceive net472 2.12μs 1.59ns 6.17ns 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.77μs 2.83ns 11ns 0.0221 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.96μs 1.69ns 6.08ns 0.0203 0 0 1.65 KB
master EnrichedLog net472 4.34μs 2.95ns 11.4ns 0.323 0 0 2.04 KB
#6096 EnrichedLog net6.0 2.82μs 1ns 3.76ns 0.0226 0 0 1.6 KB
#6096 EnrichedLog netcoreapp3.1 3.84μs 1.61ns 6.25ns 0.0211 0 0 1.65 KB
#6096 EnrichedLog net472 4.47μs 2.35ns 9.11ns 0.324 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6096

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.183 477.21 403.35

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 477ns 0.236ns 0.913ns 0.00816 0 0 576 B
master StartFinishSpan netcoreapp3.1 615ns 0.275ns 1.07ns 0.00776 0 0 576 B
master StartFinishSpan net472 710ns 0.75ns 2.91ns 0.0917 0 0 578 B
master StartFinishScope net6.0 483ns 0.286ns 1.11ns 0.00972 0 0 696 B
master StartFinishScope netcoreapp3.1 780ns 1.52ns 5.89ns 0.00934 0 0 696 B
master StartFinishScope net472 927ns 1.44ns 5.59ns 0.104 0 0 658 B
#6096 StartFinishSpan net6.0 403ns 0.568ns 2.2ns 0.00803 0 0 576 B
#6096 StartFinishSpan netcoreapp3.1 595ns 0.45ns 1.74ns 0.00774 0 0 576 B
#6096 StartFinishSpan net472 728ns 0.465ns 1.74ns 0.0916 0 0 578 B
#6096 StartFinishScope net6.0 480ns 0.27ns 1.05ns 0.00982 0 0 696 B
#6096 StartFinishScope netcoreapp3.1 762ns 0.819ns 3.17ns 0.00945 0 0 696 B
#6096 StartFinishScope net472 934ns 2.53ns 9.48ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 616ns 0.426ns 1.59ns 0.0096 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.01μs 0.453ns 1.75ns 0.00922 0 0 696 B
master RunOnMethodBegin net472 1.14μs 1.32ns 4.76ns 0.105 0 0 658 B
#6096 RunOnMethodBegin net6.0 642ns 0.341ns 1.27ns 0.00976 0 0 696 B
#6096 RunOnMethodBegin netcoreapp3.1 993ns 0.436ns 1.69ns 0.00943 0 0 696 B
#6096 RunOnMethodBegin net472 1.13μs 0.791ns 3.06ns 0.105 0 0 658 B

@nhulston nhulston marked this pull request as ready for review September 30, 2024 15:08
@nhulston nhulston requested review from a team as code owners September 30, 2024 15:08
Copy link
Contributor

@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 haven't gone through much yet but it is looking really good.

There are some test failures where CI can't find the sample application.

@bouwkast
Copy link
Contributor

bouwkast commented Oct 1, 2024

And thanks for the PR description! Very helpful :)

.nuke/build.schema.json Outdated Show resolved Hide resolved
@nhulston nhulston requested a review from bouwkast October 1, 2024 15:05
Copy link
Contributor

@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.

Nice work!

Left some comments, but looks good to me overall

…ect-trace-context' into nicholas.hulston/eventbridge-inject-trace-context
@bouwkast

This comment was marked as resolved.

nhulston and others added 2 commits October 7, 2024 10:36
* Use the standard logger instead of `Console.WriteLine()`
* Don't pass in redundant parameter.
* Remove unused imports
Copy link
Contributor

@duncanista duncanista left a comment

Choose a reason for hiding this comment

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

Left some comments – :shipit:

…ect-trace-context' into nicholas.hulston/eventbridge-inject-trace-context
@nhulston nhulston merged commit 8dc8808 into master Oct 15, 2024
76 checks passed
@nhulston nhulston deleted the nicholas.hulston/eventbridge-inject-trace-context branch October 15, 2024 15:40
@github-actions github-actions bot added this to the vNext-v3 milestone Oct 15, 2024
@lucaspimentel
Copy link
Member

Oops

image

@andrewlock andrewlock added type:new-feature area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) area:serverless type:new-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants