Skip to content

Commit 7af93f1

Browse files
committed
Add example for disable-host-otel-tracing
1 parent 868d27b commit 7af93f1

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/examples.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ steps:
7979

8080
If you want to use environment variables in the `volumes` element, you will need to activate the (unsafe) option `expand-volume-vars` (and most likely escape it using `$$VARIABLE_NAME` to ensure they are not interpolated when the pipeline is uploaded).
8181

82+
### Disabling Host-Side OTEL Tracing
83+
84+
If you have OpenTelemetry (OTEL) tracing enabled in your environment and want to prevent noise from host-side docker-compose command traces while preserving container-level tracing, you can use the `disable-host-otel-tracing` option:
85+
86+
```yml
87+
steps:
88+
- command: test.sh
89+
plugins:
90+
- docker-compose#v5.11.1:
91+
run: app
92+
disable-host-otel-tracing: true
93+
```
94+
95+
This sets `OTEL_SDK_DISABLED=true` for the docker-compose commands executed by the plugin, which prevents the creation of spans for operations like `docker-compose up`, `docker-compose run`, and `docker-compose push`. Containers will continue to generate traces.
96+
8297
### Environment
8398

8499
By default, docker-compose makes whatever environment variables it gets available for

0 commit comments

Comments
 (0)