Skip to content

Conversation

@gregkalapos
Copy link
Contributor

@gregkalapos gregkalapos commented Sep 10, 2025

agent.name is a required field in Kibana - without that the APM UI throws an exception.

Via the elasticapmintake receiver these fields are set and we get the values out of the box (elastic APM Agents send those values) - and the processor just disabled these 2 fields: https://github.com/gregkalapos/opentelemetry-collector-components/blob/main/processor/elasticapmprocessor/processor.go#L69-L70

For OTel SDKs via the OTLP receiver, we just called the s.setAgentName and s.setAgentVersion functions to calculate those - because the lines below for disabling the fields are only active for ecs mode.

This breaks when OTel SDKs are used in ecs mode ("internal linked" to internal issue below for more details).

The idea:

This way, we handle it like this:

  • Elastic APM Agents via elasticapmintake receiver: values are present, just take them as is
  • OTLP receiver with otel mode: value not present, we calculate it
  • OTLP receiver with ecs mode: same as above
Copy link

@girodav girodav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gregkalapos gregkalapos merged commit 787b34b into elastic:main Sep 12, 2025
3 checks passed
@gregkalapos gregkalapos deleted the agentname_handling branch September 12, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants