Skip to content
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

awsemfexporter is producing dimensions with null value instead of empty dimension #14531

Closed
rapphil opened this issue Sep 27, 2022 · 2 comments · Fixed by #14532
Closed

awsemfexporter is producing dimensions with null value instead of empty dimension #14531

rapphil opened this issue Sep 27, 2022 · 2 comments · Fixed by #14532
Labels
bug Something isn't working comp:aws AWS components comp:aws-cw AWS CW related issues exporter/awsemf awsemf exporter priority:p1 High release:blocker The issue must be resolved before cutting the next release

Comments

@rapphil
Copy link
Contributor

rapphil commented Sep 27, 2022

What happened?

Description

It seems that this PR #13764 caused a regression in the awsemfexporter.

When the dimension rollup feature is used, it is producing dimensions with a null value instead of empty dimension.

Steps to Reproduce

Use the collector https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.60.0

Use the following configuration:

receivers:
  statsd:
    endpoint: 0.0.0.0:8765
    aggregation_interval: 20s
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318
exporters:
  logging:
    loglevel: debug
  awsemf:
    region: 'us-west-2'
    output_destination: stdout

service:
  pipelines:
    metrics:
      receivers: [otlp,statsd]
      exporters: [awsemf]

Run:

echo "test.metric:42|c|#myKey:myVal,otherkey:val" | nc -w 1 -u localhost 8765

Expected Result

{
    "_aws": {
        "CloudWatchMetrics": [
            {
                "Namespace": "default",
                "Dimensions": [
                    [
                        "myKey",
                        "otherkey"
                    ],
                    [],
                    [
                        "myKey"
                    ],
                    [
                        "otherkey"
                    ]
                ],
                "Metrics": [
                    {
                        "Name": "test.metric"
                    }
                ]
            }
        ],
        "Timestamp": 1664239034041
    },
    "myKey": "myVal",
    "otherkey": "val",
    "test.metric": 168
}

Actual Result

{
    "_aws": {
        "CloudWatchMetrics": [
            {
                "Namespace": "default",
                "Dimensions": [
                    [
                        "myKey",
                        "otherkey"
                    ],
                    null,
                    [
                        "myKey"
                    ],
                    [
                        "otherkey"
                    ]
                ],
                "Metrics": [
                    {
                        "Name": "test.metric"
                    }
                ]
            }
        ],
        "Timestamp": 1664239034041
    },
    "myKey": "myVal",
    "otherkey": "val",
    "test.metric": 168
}

Null dimension is ignored by the awsemf backend and hence the regression.

Collector version

v0.60.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

receivers:
  statsd:
    endpoint: 0.0.0.0:8765
    aggregation_interval: 20s
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318
exporters:
  logging:
    loglevel: debug
  awsemf:
    region: 'us-west-2'
    output_destination: stdout

service:
  pipelines:
    metrics:
      receivers: [otlp,statsd]
      exporters: [awsemf]

Log output

No response

Additional context

No response

@rapphil rapphil added bug Something isn't working needs triage New item requiring triage labels Sep 27, 2022
@Aneurysm9 Aneurysm9 added priority:p1 High comp:aws AWS components comp:aws-cw AWS CW related issues release:blocker The issue must be resolved before cutting the next release exporter/awsemf awsemf exporter and removed needs triage New item requiring triage labels Sep 27, 2022
@rapphil
Copy link
Contributor Author

rapphil commented Sep 27, 2022

Added details about how this regression might impact production. null dimension != empty dimension. The awsemf backend will ignore null dimension and hence we have the regression in behavior.

@bogdandrutu
Copy link
Member

@rapphil

Interesting backend decision to distinguish between empty and null, but good that this is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comp:aws AWS components comp:aws-cw AWS CW related issues exporter/awsemf awsemf exporter priority:p1 High release:blocker The issue must be resolved before cutting the next release
Projects
None yet
3 participants