elastic / elastic/fleet-server

[OpAMP] Support `AcceptsOtherConnectionSettings`

Open
#6,816 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 connection settings for arbitrary non-OpAMP, non-own-telemetry destinations to OpAMP clients. These are named endpoints (with associated headers and TLS material) that the managed agent needs to connect to for purposes other than OpAMP itself or the agent's self-observability — e.g., downstream backends, databases, or other external services specific to the agent.

This corresponds to the `other_connections` field of `ConnectionSettingsOffers` and is gated by the client's `AcceptsOtherConnectionSettings` capability. Note that destinations for the agent's *own* telemetry (traces/metrics/logs *about* the agent itself) are a separate concern covered by `TelemetryConnectionSettings` and the client's `ReportsOwn{Metrics,Traces,Logs}` capabilities, which are not in scope for this issue.

**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 `other_connections` for clients that have advertised [`AcceptsOtherConnectionSettings`](https://opentelemetry.io/docs/specs/opamp/#agenttoservercapabilities) in their most recent `AgentToServer` message. Advertisement is unconditional; offering is gated on client capability. See the [Connection Settings Management section](https://opentelemetry.io/docs/specs/opamp/#connection-settings-management) of the spec.

**Testing:**

:warning: This feature **cannot currently be tested end-to-end with the upstream OTel Collector supervisor**. Although the supervisor's README and specification both describe `AcceptsOtherConnectionSettings` as implemented (for populating exporter connection settings from the `other_connections` named map), inspection of the supervisor source confirms the capability is **not** actually wired up: there is no config key, no capability bit set in `SupportedCapabilities()`, and no code handling `other_connections` from incoming messages. This gap is tracked upstream in [opentelemetry-collector-contrib#44294](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/44294). Testing will require upstream implementation. See the [OpAMP Supervisor README](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor) and the [OTel Collector contrib releases](https://github.com/open-telemetry/opentelemetry-collector-releases/releases) page.

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

Fleet centrally configures where a managed agent connects for non-OpAMP, non-self-telemetry purposes — for example, directing a managed collector's pipeline exporters to specific backend endpoints without per-agent manual 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.