Commit b53c3bf
authored
[Tracer] Add Azure Event Hubs instrumentation (#7620)
## Summary of changes
New integration for Azure Event Hubs configurable by:
* `DD_TRACE_AZUREEVENTHUBS_ENABLED` (default `true`) enables/disables
the integration
* `DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED` (default `true`)
enables/disables Span Linking and `TryAdd` spans
## Integration points
* `Azure.Messaging.EventHubs.Producer.EventDataBatch.TryAdd` that adds
an `EventData` to a batch. Creates a span and stores context.
*
`Azure.Messaging.EventHubs.Producer.EventHubProducerClient.SendAsync(EventDataBatch)`
sends a batch. Creates a span extracting context for Span Links.
*
`Azure.Messaging.EventHubs.Producer.EventHubProducerClient.SendAsync(IEnumerable<EventData>)`
sends a collection of `EventData`. Creates a span.
* `Azure.Core.Shared.MessagingClientDiagnostics.InstrumentMessage` (In
the `Azure.Messaging.EventHubs` assembly) function to instrument
specific messages. Adds context to messages.
* `Azure.Messaging.EventHubs.Amqp.AmqpConsumer.ReceiveAsync` receives
all messages, single entry point for all reception. Creates span and
links.
* Added context extraction for Event Hubs triggers
## Test coverage
Integration tests
## Other details
Some refactoring has been made to the Service Bus integration to better
reuse components. I also added previously missing calls to
`IntegrationGeneratedSpan` in Service Bus. Unlike the previous Service
Bus PRs, these are all changes in a single PR.1 parent 1697b8e commit b53c3bf
File tree
81 files changed
+5473
-1430
lines changed- docker
- tracer
- build
- _build/Honeypot
- dependabot/integrations
- src
- Datadog.Trace.Trimming/build
- Datadog.Tracer.Native/Generated
- Datadog.Trace
- ClrProfiler/AutoInstrumentation/Azure
- EventHubs
- Functions
- ServiceBus
- Configuration
- Schema
- Generated
- net461/Datadog.Trace.SourceGenerators
- EnumExtensionsGenerator
- InstrumentationDefinitionsGenerator
- TagListGenerator
- TelemetryMetricGenerator
- net6.0/Datadog.Trace.SourceGenerators
- EnumExtensionsGenerator
- InstrumentationDefinitionsGenerator
- TagListGenerator
- TelemetryMetricGenerator
- netcoreapp3.1/Datadog.Trace.SourceGenerators
- EnumExtensionsGenerator
- InstrumentationDefinitionsGenerator
- TagListGenerator
- TelemetryMetricGenerator
- netstandard2.0/Datadog.Trace.SourceGenerators
- EnumExtensionsGenerator
- InstrumentationDefinitionsGenerator
- TagListGenerator
- TelemetryMetricGenerator
- Tagging
- Telemetry/Metrics
- test
- Datadog.Trace.ClrProfiler.IntegrationTests
- Azure
- Datadog.Trace.TestHelpers
- Datadog.Trace.Tests/Telemetry
- test-applications/integrations/Samples.AzureEventHubs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
81 files changed
+5473
-1430
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
388 | 390 | | |
389 | 391 | | |
390 | 392 | | |
| |||
1211 | 1213 | | |
1212 | 1214 | | |
1213 | 1215 | | |
| 1216 | + | |
1214 | 1217 | | |
1215 | 1218 | | |
1216 | 1219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| 534 | + | |
| 535 | + | |
534 | 536 | | |
535 | 537 | | |
536 | 538 | | |
| |||
1697 | 1699 | | |
1698 | 1700 | | |
1699 | 1701 | | |
| 1702 | + | |
1700 | 1703 | | |
1701 | 1704 | | |
1702 | 1705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
231 | 255 | | |
232 | 256 | | |
233 | 257 | | |
| |||
445 | 469 | | |
446 | 470 | | |
447 | 471 | | |
| 472 | + | |
448 | 473 | | |
449 | 474 | | |
450 | 475 | | |
| |||
496 | 521 | | |
497 | 522 | | |
498 | 523 | | |
| 524 | + | |
| 525 | + | |
499 | 526 | | |
500 | 527 | | |
501 | 528 | | |
| |||
678 | 705 | | |
679 | 706 | | |
680 | 707 | | |
| 708 | + | |
| 709 | + | |
681 | 710 | | |
682 | 711 | | |
683 | 712 | | |
684 | | - | |
| 713 | + | |
685 | 714 | | |
686 | 715 | | |
687 | 716 | | |
| |||
1218 | 1247 | | |
1219 | 1248 | | |
1220 | 1249 | | |
1221 | | - | |
| 1250 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
| 901 | + | |
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
907 | 918 | | |
908 | 919 | | |
909 | 920 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6299 | 6299 | | |
6300 | 6300 | | |
6301 | 6301 | | |
| 6302 | + | |
| 6303 | + | |
| 6304 | + | |
| 6305 | + | |
| 6306 | + | |
| 6307 | + | |
| 6308 | + | |
| 6309 | + | |
| 6310 | + | |
| 6311 | + | |
| 6312 | + | |
| 6313 | + | |
| 6314 | + | |
| 6315 | + | |
| 6316 | + | |
| 6317 | + | |
| 6318 | + | |
| 6319 | + | |
| 6320 | + | |
| 6321 | + | |
| 6322 | + | |
| 6323 | + | |
| 6324 | + | |
| 6325 | + | |
| 6326 | + | |
| 6327 | + | |
| 6328 | + | |
| 6329 | + | |
| 6330 | + | |
| 6331 | + | |
| 6332 | + | |
| 6333 | + | |
| 6334 | + | |
| 6335 | + | |
| 6336 | + | |
| 6337 | + | |
| 6338 | + | |
| 6339 | + | |
| 6340 | + | |
| 6341 | + | |
| 6342 | + | |
| 6343 | + | |
| 6344 | + | |
| 6345 | + | |
| 6346 | + | |
| 6347 | + | |
| 6348 | + | |
| 6349 | + | |
| 6350 | + | |
| 6351 | + | |
| 6352 | + | |
| 6353 | + | |
| 6354 | + | |
6302 | 6355 | | |
6303 | 6356 | | |
6304 | 6357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39465 | 39465 | | |
39466 | 39466 | | |
39467 | 39467 | | |
| 39468 | + | |
| 39469 | + | |
| 39470 | + | |
| 39471 | + | |
| 39472 | + | |
| 39473 | + | |
| 39474 | + | |
| 39475 | + | |
| 39476 | + | |
| 39477 | + | |
| 39478 | + | |
| 39479 | + | |
| 39480 | + | |
| 39481 | + | |
| 39482 | + | |
| 39483 | + | |
| 39484 | + | |
| 39485 | + | |
| 39486 | + | |
| 39487 | + | |
| 39488 | + | |
| 39489 | + | |
| 39490 | + | |
| 39491 | + | |
| 39492 | + | |
| 39493 | + | |
| 39494 | + | |
| 39495 | + | |
| 39496 | + | |
| 39497 | + | |
| 39498 | + | |
| 39499 | + | |
| 39500 | + | |
| 39501 | + | |
| 39502 | + | |
| 39503 | + | |
| 39504 | + | |
| 39505 | + | |
| 39506 | + | |
| 39507 | + | |
| 39508 | + | |
| 39509 | + | |
| 39510 | + | |
| 39511 | + | |
| 39512 | + | |
| 39513 | + | |
| 39514 | + | |
| 39515 | + | |
| 39516 | + | |
| 39517 | + | |
| 39518 | + | |
| 39519 | + | |
| 39520 | + | |
| 39521 | + | |
| 39522 | + | |
| 39523 | + | |
| 39524 | + | |
| 39525 | + | |
| 39526 | + | |
| 39527 | + | |
| 39528 | + | |
| 39529 | + | |
| 39530 | + | |
| 39531 | + | |
| 39532 | + | |
| 39533 | + | |
| 39534 | + | |
| 39535 | + | |
| 39536 | + | |
| 39537 | + | |
| 39538 | + | |
| 39539 | + | |
| 39540 | + | |
| 39541 | + | |
| 39542 | + | |
| 39543 | + | |
| 39544 | + | |
| 39545 | + | |
| 39546 | + | |
| 39547 | + | |
| 39548 | + | |
| 39549 | + | |
| 39550 | + | |
| 39551 | + | |
| 39552 | + | |
| 39553 | + | |
| 39554 | + | |
| 39555 | + | |
| 39556 | + | |
| 39557 | + | |
| 39558 | + | |
| 39559 | + | |
| 39560 | + | |
| 39561 | + | |
| 39562 | + | |
| 39563 | + | |
| 39564 | + | |
| 39565 | + | |
| 39566 | + | |
| 39567 | + | |
| 39568 | + | |
| 39569 | + | |
| 39570 | + | |
| 39571 | + | |
| 39572 | + | |
| 39573 | + | |
| 39574 | + | |
| 39575 | + | |
39468 | 39576 | | |
39469 | 39577 | | |
39470 | 39578 | | |
| |||
0 commit comments