influxdata / influxdata/telegraf

outputs.opentelemetry: add metric type overrides option as in outputs.prometheus_client

Open
#19,442 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

### Use Case

Opentelemetry output should support metric type override config (as prometheus_client), to ensure custom metrics are sent with correct OTLP type.

### Expected behavior

Metric type should be set according to the configuration e.g.
```
[outputs.opentelemetry.metric_types]
counter = [ "my_custom_counter_metric" ]
gauge = []
```

### Actual behavior

No support of setting OTLP metric type on output plugin level.

### Additional info

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by comparing the outputs.opentelemetry implementation with outputs.prometheus_client, focusing on how metric_types configuration is declared, parsed, and applied. Add equivalent counter and gauge override support for custom metrics, then verify that configured metrics are emitted with the expected OTLP types.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.