elastic / elastic/fleet-server

[OpAMP] Support offering own-telemetry destinations (`ReportsOwnMetrics` / `ReportsOwnTraces` / `ReportsOwnLogs`)

Open
#6,817 0 comments 0 reactions 0 assignees View on GitHub
enhancement Team:Elastic-Agent-Control-Plane
Dominant language
Go
Stars
113
Forks
117
Avg merge
1d 16h
Merged PRs (30d)
112

Description

**Describe the enhancement:**

Add support to Fleet Server for offering destinations where an OpAMP client should send telemetry *about itself* (the agent's own traces, metrics, and logs for self-observability). This corresponds to the `own_metrics`, `own_traces`, and `own_logs` fields of `ConnectionSettingsOffers` in `ServerToAgent`, each carrying a `TelemetryConnectionSettings` message with endpoint, headers, and TLS material.

**Capability advertisement vs. offering:**

Per the OpAMP spec, Fleet Server MUST advertise `OffersConnectionSettings` in the [`capabilities` field](https://opentelemetry.io/docs/specs/opamp/#servertoagentcapabilities) of the first `ServerToAgent` message unconditionally. However, Fleet Server may only actually populate:
- `own_metrics` for clients that advertise [`ReportsOwnMetrics`](https://opentelemetry.io/docs/specs/opamp/#agenttoservercapabilities)
- `own_traces` for clients that advertise `ReportsOwnTraces`
- `own_logs` for clients that advertise `ReportsOwnLogs`

…in their most recent `AgentToServer` message. Advertisement is unconditional; offering is gated on the relevant client capability per signal. See the [Connection Settings Management section](https://opentelemetry.io/docs/specs/opamp/#connection-settings-management) of the spec.

**Testing:**

This feature should be tested against an upstream OTel Collector (contrib distribution) managed by the OpAMP Supervisor. Supervisor defaults: `capabilities.reports_own_metrics` is `true`, but `capabilities.reports_own_logs` and `capabilities.reports_own_traces` are `false` — enable them in the supervisor config to test the full trio. See the [OpAMP Supervisor README](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor) for instructions on running the supervisor, and the [OTel Collector contrib releases](https://github.com/open-telemetry/opentelemetry-collector-releases/releases) page for the collector binary.

**Describe a specific use case for the enhancement or feature:**

Fleet centrally directs managed agents to report their own health and performance telemetry to a designated OTLP backend, enabling centralized observability of the managed agent fleet without per-agent configuration.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.