Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Add provisional OpAMP support for reporting Python agent status and settings

## 2.12.0 - 2026-07-13
- Upgrade Otel dependencies to [1.44.0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.44.0) / [0.65b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.65b0)

Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ exporter. See [docs/secureapp.md](docs/secureapp.md) for setup details and
[docs/examples/secureapp-collector-config.yaml](docs/examples/secureapp-collector-config.yaml)
for a collector example.

## Fleet Management with OpAMP

Splunk OTel Python provides OpAMP support. When enabled, the OpAMP client
connects to the configured endpoint and reports the Python agent's status and
settings. Agents connected to Splunk Observability Cloud appear on the Fleet
Management page.

The default OpAMP endpoint is a local Splunk OpenTelemetry Collector. Set
`SPLUNK_OPAMP_ENDPOINT` to use another OpAMP endpoint. See
[OpAMP](docs/opamp.md) for setup and limits.

# License

Expand Down
45 changes: 45 additions & 0 deletions docs/opamp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# OpAMP

Splunk OTel Python provides OpAMP support. When enabled, the OpAMP client
connects to the configured endpoint and reports the Python agent's status and
settings. Agents connected to Splunk Observability Cloud appear on the Fleet
Management page.

OpAMP support is provisional. Remote configuration is not supported yet.

## Default connection

```text
Python process -> Splunk OpenTelemetry Collector -> Splunk Observability Cloud
```

The Python process sends OpAMP messages to
`http://localhost:4320/v1/opamp` by default. The collector must listen on that
address and forward the messages to Splunk Observability Cloud.

## Enable OpAMP

```sh
SPLUNK_OPAMP_ENABLED=true \
opentelemetry-instrument python app.py
```

## Settings

| Environment variable | Default | Description |
|------------------------------------|------------------------------------|--------------------------------|
| `SPLUNK_OPAMP_ENABLED` | `false` | Set to `true` to enable OpAMP. |
| `SPLUNK_OPAMP_ENDPOINT` | `http://localhost:4320/v1/opamp` | OpAMP endpoint. |
| `SPLUNK_OPAMP_POLLING_INTERVAL` | `30000` | Report interval, in milliseconds. |


## Troubleshooting

Open **Data Management > Fleet Management > Instrumentation** in Splunk
Observability Cloud. If OpAMP is enabled, the Python agent should show `Connected`.

If it does not:

- When using the default endpoint, check that the collector listens on port `4320`.
- Check the collector endpoint and access token.
- Check the application logs for `Connection to OpAMP server failed`.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies = [
"opentelemetry-instrumentation-logging==0.65b0",
"opentelemetry-instrumentation-system-metrics==0.65b0",
"opentelemetry-semantic-conventions==0.65b0",
"opentelemetry-opamp-client==0.3b0",
Comment thread
pmcollins marked this conversation as resolved.
"protobuf>=6.33.5", # not our direct dep, prevents installing vulnerable proto versions (CVE‑2025‑4565, CVE-2026-0994)
"wrapt>=2.2.2",
]
Expand All @@ -52,6 +53,9 @@ configurator = "splunk_otel.configurator:SplunkConfigurator"
[project.entry-points.opentelemetry_distro]
splunk_distro = "splunk_otel.distro:SplunkDistro"

[project.entry-points._opentelemetry_opamp]
post_sdk_init_function = "splunk_otel.opamp:start_opamp"

[tool.hatch.version]
path = "src/splunk_otel/__about__.py"

Expand Down
3 changes: 3 additions & 0 deletions src/splunk_otel/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
SPLUNK_OTEL_SYSTEM_METRICS_ENABLED = "SPLUNK_OTEL_SYSTEM_METRICS_ENABLED"
SPLUNK_ACCESS_TOKEN = "SPLUNK_ACCESS_TOKEN" # noqa: S105
SPLUNK_TRACE_RESPONSE_HEADER_ENABLED = "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED"
SPLUNK_OPAMP_ENABLED = "SPLUNK_OPAMP_ENABLED"
SPLUNK_OPAMP_ENDPOINT = "SPLUNK_OPAMP_ENDPOINT"
SPLUNK_OPAMP_POLLING_INTERVAL = "SPLUNK_OPAMP_POLLING_INTERVAL"
SPLUNK_PROFILER_ENABLED = "SPLUNK_PROFILER_ENABLED"
SPLUNK_PROFILER_CALL_STACK_INTERVAL = "SPLUNK_PROFILER_CALL_STACK_INTERVAL"
SPLUNK_PROFILER_LOGS_ENDPOINT = "SPLUNK_PROFILER_LOGS_ENDPOINT"
Expand Down
Loading
Loading