Skip to content

awsemf exporter metric_descriptors cannot be configured - config cannot be unmarshalled #17051

Closed as not planned
@rsevil-braintly

Description

Component(s)

exporter/awsemf

What happened?

Description

As the documentation says I tried to setup configure some metric_descriptors without success.

I'm getting the following error:

Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

* error decoding 'exporters': error reading exporters configuration for "awsemf": 1 error(s) decoding:

* 'metric_descriptors[0]' has invalid keys: metric_name, overwrite, unit
2022/12/15 17:08:48 application run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

* error decoding 'exporters': error reading exporters configuration for "awsemf": 1 error(s) decoding:

* 'metric_descriptors[0]' has invalid keys: metric_name, overwrite, unit

Steps to Reproduce

It can be reproduced using this config.yaml:

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

processors:
  batch/metrics:
    timeout: 30s

exporters:
  awsemf:
    metric_descriptors:
      - metric_name: "memcached_current_items"
        unit: "Count"
        overwrite: "true"

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [batch/metrics]
      exporters: [awsemf]

Expected Result

That the configuration can be marshaled and metric_descriptors work

Actual Result

Cannot setup any metric_descriptor.

Collector version

aws-otel-collector 0.24.1

Environment information

Environment

OS: macOS - running collector as container

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

processors:
  batch/metrics:
    timeout: 30s

exporters:
  awsemf:
    metric_descriptors:
      - metric_name: "memcached_current_items"
        unit: "Count"
        overwrite: "true"

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [batch/metrics]
      exporters: [awsemf]

Log output

Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

* error decoding 'exporters': error reading exporters configuration for "awsemf": 1 error(s) decoding:

* 'metric_descriptors[0]' has invalid keys: metric_name, overwrite, unit
2022/12/15 17:24:35 application run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

* error decoding 'exporters': error reading exporters configuration for "awsemf": 1 error(s) decoding:

* 'metric_descriptors[0]' has invalid keys: metric_name, overwrite, unit

Additional context

No response

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions