Fix EMF exporter to generate EMF metrics when dimensions are empty due to no attributes #228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
Populate the correct
CloudWatchMetricsin EMF when metrics has empty dimension list due to no attributes.Testing:
{ "_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.