elastic / elastic/integrations

[OTLP input otel]: resourcedetection processor overwrites host.name and resource.attributes.host.name

Open
#19,728 1 comment 0 reactions 0 assignees View on GitHub
Integration:otlp_input_otel needs:triage Team:Ecosystem
Dominant language
Handlebars
Stars
333
Forks
647
Avg merge
2d 17h
Merged PRs (30d)
225

Description

### Integration Name

OTLP Receiver OpenTelemetry Input Package [packages/otlp_input_otel]

### Dataset Name

_No response_

### Integration Version

0.2.0

### Agent Version

9.4.2

### Agent Output Type

elasticsearch

### Elasticsearch Version

9.4.2

### OS Version and Architecture

Red Hat Enterprise Linux release 9.8

### Software/API Version

_No response_

### Error Message

_No response_

### Event Original

_No response_

### What did you do?

Configuring EDOT to collect hostmetrics and sending them through a gateway collector to Elasticsearch.

### What did you see?

Working as expected
- When using EDOT to collect hostmetrics coupled with a `resourcedetection` processor, sending them through a EDOT gateway with elasticsearch exporter, `host.name` and `resource.attributes.host.name` is set correctly.

Not working as expected
- When using EDOT to collect hostmetrics coupled with a `resourcedetection` processor, sending them through a Elastic Agent with `OTLP Receiver OpenTelemetry Input` integration as gateway, `host.name` and `resource.attributes.host.name` is set to the Elastic Agents host name.

From what I can tell the `resourcedetection` processor is hard coded and there is no way to "opt-out" or configure the behavior, making the integration not suitable to use as a gateway receiver.

### What did you expect to see?

Expected the gateway to not use a `resourcedetection` processor which will override any existing values for the `host.name` and `os.type` attributes. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/internal/system/documentation.md

Override is the default value; https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor#configuration

This is not desired when using the `OTLP Receiver OpenTelemetry Input` integration to act as a gateway receiving telemetry from multiple hosts.

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in packages/otlp_input_otel and reproduce the reported hostmetrics flow through the OTLP gateway, comparing it with the EDOT gateway behavior. Read the linked resourcedetection processor documentation to understand the override setting; done means existing host.name and os.type values are preserved or the integration provides a way to disable the override.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch
Domain
backend, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.