influxdata / influxdata/telegraf
[outputs.opentelemetry] Unsupported Type Error for Span Fields (span.name, span.kind, attributes)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Relevant telegraf.conf
```toml
[[outputs.opentelemetry]]
service_address = "opentelemetry-collector.server:4317"
[[inputs.opentelemetry]]
service_address = "0.0.0.0:4317"
```
### Logs from Telegraf
```text
[outputs.opentelemetry] field has unsupported type measurement="spans" field="span.name" type="string"
[outputs.opentelemetry] field has unsupported type measurement="spans" field="span.kind" type="string"
[outputs.opentelemetry] field has unsupported type measurement="spans" field="attributes" type="string"
```
### System info
Telegraf 1.32.1 , GKE kubernetes 1.31
### Docker
_No response_
### Steps to reproduce
1. Start Telegraf with the following configuration:
```toml
[[outputs.opentelemetry]]
service_address = "opentelemetry-collector.server:4317"
[[inputs.opentelemetry]]
service_address = "0.0.0.0:4317"
```
2. Run a Go application that sends traces via OTLP GRPC (4317).
3. See the following error messages:
```
[outputs.opentelemetry] field has unsupported type measurement="spans" field="span.name" type="string"
[outputs.opentelemetry] field has unsupported type measurement="spans" field="span.kind" type="string"
[outputs.opentelemetry] field has unsupported type measurement="spans" field="attributes" type="string"
```
### Expected behavior
Telegraf should correctly process span fields (span.name, span.kind, attributes) and forward traces to the OpenTelemetry Collector without type conversion issues.
### Actual behavior
Traces do not reach the OpenTelemetry Collector when sent through Telegraf. Instead, Telegraf logs unsupported type errors, and no traces appear in the OpenTelemetry system.
Logs from Telegraf:
[outputs.opentelemetry] field has unsupported type measurement="spans" field="span.name" type="string"
[outputs.opentelemetry] field has unsupported type measurement="spans" field="span.kind" type="string"
[outputs.opentelemetry] field has unsupported type measurement="spans" field="attributes" type="string"
### Additional info
When sending traces directly from the Go application to the OpenTelemetry Collector (without Telegraf), they are processed successfully without any issues.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the shown inputs.opentelemetry and outputs.opentelemetry configurations, then trace how the outputs.opentelemetry plugin handles the span.name, span.kind, and attributes fields. Done means traces containing these fields reach the OpenTelemetry Collector without unsupported-type errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100