Commit 9b42048
authored
feat(trace-export): map DD span resource to OTLP resource.name attribute (#1811)
# What does this PR do?
Adds `resource.name` as a per-span OTLP attribute when mapping Datadog spans to OTLP. The Datadog span resource field now maps to two places:
- OtlpSpan.name (existing — the OTLP span name)
- span.attributes["resource.name"] (new)
This follows the same conditional pattern as operation.name and span.type: the attribute is only emitted when the field is non-empty.
# Motivation
Spec update to the OTLP trace export RFC: the Datadog resource field should be preserved as a resource.name attribute so downstream consumers can reconstruct the original Datadog resource name independently of the OTLP span name.
# Additional Notes
This builds on top of feat(otel): add support for OTLP trace export (#1641). The dropped_attributes_count accounting in map_attributes is updated to include the new resource.name slot.
# How to test the change?
Describe here in detail how the change can be validated.
Co-authored-by: rachel.yang <rachel.yang@datadoghq.com>1 parent 7824b52 commit 9b42048
1 file changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
302 | 310 | | |
303 | 311 | | |
304 | 312 | | |
| |||
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
| 345 | + | |
337 | 346 | | |
338 | 347 | | |
339 | 348 | | |
| |||
574 | 583 | | |
575 | 584 | | |
576 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
577 | 639 | | |
578 | 640 | | |
579 | 641 | | |
| |||
0 commit comments