Commit 07d9d0d
authored
Fix EMF exporter to generate EMF metrics with dimension empty (#434)
*Description of changes:*
* Populate the correct `CloudWatchMetrics` in EMF when metrics has empty
dimension list
*Test*
```
{
"_aws": {
"Timestamp": 1753139679038,
"CloudWatchMetrics": [
{
"Namespace": "MyApplication1",
"Metrics": [
{
"Name": "system_cpu_usage_percent",
"Unit": "Percent"
},
{
"Name": "http_request_duration_seconds",
"Unit": "Seconds"
}
]
}
]
},
"Version": "1",
"otel.resource.telemetry.sdk.language": "python",
"otel.resource.telemetry.sdk.name": "opentelemetry",
"otel.resource.telemetry.sdk.version": "1.33.1",
"otel.resource.service.name": "my-service",
"otel.resource.service.version": "0.1.0",
"otel.resource.deployment.environment": "production",
"system_cpu_usage_percent": 0.2,
"http_request_duration_seconds": {
"Values": [
0.39614037455626866,
0.4866507397084614
],
"Counts": [
1,
1
],
"Count": 2,
"Sum": 0.8848342305738114,
"Max": 0.4877384525234254,
"Min": 0.397095778050386
}
}
```
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 16a0a25 commit 07d9d0d
File tree
2 files changed
+36
-5
lines changed- aws-opentelemetry-distro
- src/amazon/opentelemetry/distro/exporter/aws/metrics
- tests/amazon/opentelemetry/distro/exporter/aws/metrics
2 files changed
+36
-5
lines changedLines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
517 | 519 | | |
518 | 520 | | |
519 | 521 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
397 | 426 | | |
398 | 427 | | |
399 | 428 | | |
| |||
0 commit comments