Commit 164952a
authored
Fix EMF exporter to generate EMF metrics when dimensions are empty due to no attributes (#228)
*Description of changes:*
Populate the correct `CloudWatchMetrics` in EMF when metrics has empty
dimension list due to no attributes.
*Testing:*
```json
{
"_aws": {
"Timestamp": 1753213216039,
"CloudWatchMetrics": [
{
"Namespace": "default",
"Metrics": [
{
"Name": "histogram.counter",
"Unit": "Milliseconds"
}
]
}
]
},
"Version": "1",
"otel.resource.service.name": "unknown_service:node",
"otel.resource.telemetry.sdk.language": "nodejs",
"otel.resource.telemetry.sdk.name": "opentelemetry",
"otel.resource.telemetry.sdk.version": "1.30.1",
"otel.resource.telemetry.auto.version": "0.6.0-dev0-aws",
"otel.resource.aws.service.type": "gen_ai_agent",
"histogram.counter": {
"Values": [
0.9946140065969877,
1.9892280131939772,
3.002072155884692,
3.978456026387959,
0
],
"Counts": [
1,
1,
2,
3,
2
],
"Count": 9,
"Sum": 21,
"Max": 4,
"Min": 0
}
}
```
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.1 parent 62d0c23 commit 164952a
File tree
2 files changed
+51
-10
lines changed- aws-distro-opentelemetry-node-autoinstrumentation
- src/exporter/aws/metrics
- test/exporter/aws/metrics
2 files changed
+51
-10
lines changedLines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
456 | | - | |
457 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
458 | 460 | | |
459 | | - | |
460 | 461 | | |
461 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
462 | 469 | | |
463 | 470 | | |
464 | 471 | | |
| |||
Lines changed: 39 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
| 675 | + | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
| 678 | + | |
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | | - | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
752 | 786 | | |
753 | 787 | | |
754 | 788 | | |
| |||
0 commit comments