Skip to content

influx2otel: Improve handling of unknown metric type #2

@jacobmarble

Description

@jacobmarble

Reported by @codeboten influxdata/telegraf#9228 (comment)

2021-05-12T21:12:35Z W! [outputs.opentelemetry] failed to add point: gauge field not found
2021-05-12T21:12:35Z W! [outputs.opentelemetry] failed to add point: gauge field not found
2021-05-12T21:12:35Z W! [outputs.opentelemetry] failed to add point: gauge field not found
2021-05-12T21:12:35Z W! [outputs.opentelemetry] failed to add point: gauge field not found
2021-05-12T21:12:35Z W! [outputs.opentelemetry] failed to add point: gauge field not found
2021-05-12T21:12:35Z W! [outputs.opentelemetry] failed to add point: gauge field not found
2021-05-12T21:12:35Z W! [outputs.opentelemetry] failed to add point: gauge field not found

The gauge logic anticipates field gauge exists, but it does not. It looks like the fallback metric type logic was triggered, which means the line was interpreted as a gauge, but the schema requirements are too strict to do anything useful with the data.

In the fallback case, if exactly one field exists, then it should be used as the gauge value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions