influxdata / influxdata/telegraf

[outputs.opentelemetry] Unsupported Type Error for Span Fields (span.name, span.kind, attributes)

Open
#16,634 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.