Skip to content

Fix EMF exporter to generate EMF metrics with dimension empty #434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

mxiamxia
Copy link
Member

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.

@mxiamxia mxiamxia requested review from wangzlei and jj22ee July 21, 2025 23:19
@mxiamxia mxiamxia marked this pull request as ready for review July 21, 2025 23:25
@mxiamxia mxiamxia requested a review from a team as a code owner July 21, 2025 23:25
@mxiamxia mxiamxia merged commit 07d9d0d into aws-observability:main Jul 22, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants