Skip to content

Commit 435d2c1

Browse files
committed
update specification
1 parent ab06524 commit 435d2c1

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

cmd/opampsupervisor/specification/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ telemetry:
223223
resource:
224224
service.namespace: otel-demo
225225

226+
# Supervisor-side extensions. See "Supervisor Extensions" below.
227+
# Requires the `opampsupervisor.Extensions` feature gate (alpha).
228+
extensions:
229+
# Single instance of an extension with default settings.
230+
nop:
231+
# Named instance with custom settings.
232+
extension_a/primary:
233+
option_a: value
226234
```
227235
228236
#### Notes on `agent::config_files`, `agent::args`, and `agent::env`
@@ -292,6 +300,50 @@ This results in the following Collector process invocation:
292300
./otel-binary --config /var/lib/otelcol/supervisor/effective.yaml --feature-gates service.AllowNoPipelines
293301
```
294302

303+
### Supervisor Extensions
304+
305+
Note: this capability is experimental and must be manually enabled via the
306+
`opampsupervisor.Extensions` feature gate (alpha, introduced in v0.151.0).
307+
If `extensions` are configured but the gate is disabled, the Supervisor
308+
will not start and the error message names the gate to enable.
309+
310+
These are instances of extensions specific to the Supervisor and are
311+
distinct from extensions configured inside the managed Collector's
312+
configuration. Supervisor extensions are loaded and managed by the
313+
Supervisor process itself.
314+
315+
Supervisor extensions are configured under a top-level `extensions:` key
316+
using the same `type` or `type/name` component ID form used by the
317+
Collector:
318+
319+
```yaml
320+
extensions:
321+
# Single instance, default settings.
322+
nop:
323+
# Named instance with custom settings.
324+
some_extension/primary:
325+
option_a: value
326+
```
327+
328+
Only extensions present in the Supervisor's factory allowlist are
329+
supported. The allowlist is intentionally narrow and extensions are
330+
added on a case-by-case basis as their functionality is integrated.
331+
Referencing an unknown extension type, or providing invalid configuration
332+
for a known one, produces a startup error.
333+
334+
#### Lifecycle
335+
336+
1. On startup, each configured extension is parsed and validated
337+
against its factory's config schema. Validation errors are reported
338+
before any extension instance is created.
339+
2. Extensions are started in a deterministic order based on the
340+
lexicographic ordering of their component IDs. If any extension
341+
fails to start, previously started extensions are shut down in
342+
reverse order before the failure is reported.
343+
3. On Supervisor shutdown, extensions are stopped in reverse start
344+
order. Shutdown errors from individual extensions are aggregated
345+
and reported together rather than aborting the shutdown sequence.
346+
295347
### Operation When OpAMP Server is Unavailable
296348

297349
When the supervisor cannot connect to the OpAMP server, the collector will

0 commit comments

Comments
 (0)