#Export OpenTelemetry traces somewhere else
1 messages · Page 1 of 1 (latest)
yes, by setting the standard OTel exporter env variables, you can send the data elsewhere.
But will it still send to Dagger Tracing too?
yes it will
if you add an exporter and you're logged it to Dagger Cloud or using a DAGGER_CLOUD_TOKEN, we'll send the telemetry both to our and your system
@vague cedar I wasn't able to repro this. The AI-assisted issue above is also incorrect given that the telemetry gets sent from the client and not from the engine. This is the code that takes care of propagating the env variables https://github.com/dagger/dagger/blob/7c83409eee972e0e5eacb71427f3553158d33dfa/cmd/dagger/run.go?plain=1#L136.
The way that I verified this works is by doing the following:
- Start a random dev http server:
python -m http.server 8080
- Run dagger and point the metrics endpoint to that server
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://localhost:8080/v1/metrics dagger -c 'container | from alpine | with-exec "echo, hello"
You'll see in the server access logs that Dagger effectively tries to post the metrics there:
127.0.0.1 - - [18/Feb/2026 10:05:47] code 404, message File not found
127.0.0.1 - - [18/Feb/2026 10:05:47] "GET /v1/metrics HTTP/1.1" 404 -
127.0.0.1 - - [18/Feb/2026 10:05:54] code 501, message Unsupported method ('POST')
127.0.0.1 - - [18/Feb/2026 10:05:54] "POST /v1/metrics HTTP/1.1" 501 -
127.0.0.1 - - [18/Feb/2026 10:05:55] code 501, message Unsupported method ('POST')
127.0.0.1 - - [18/Feb/2026 10:05:55] "POST /v1/metrics HTTP/1.1" 501 -
Ah I was trying to send Otel from the server. 😅
The docker container does log many spans I think so it’s aware of various metrics would be good to be able to get them. For now I’m parsing logs which works but ugly of course.
Is there anything different about running from a GitHub action? I just can't figure it out... It works from local, it works from manually sending traces via curl from CI. But when I run Dagger in CI (via GitHub action), no traces show up.
Nope. There shouldn't be any difference? Mind sharing a snippet about how you're using the action?
- name: Run Dagger CI
env:
OUR_APP_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
uses: dagger/dagger-for-github@662d9b66af7c40b8745fb3131785a53129193ffe
with:
call: ci-all ... many args ...
dagger-flags: --progress=dots
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
version: ${{ env.DAGGER_VERSION }}
summary-path: "/tmp/dagger-summary.txt"
enable-github-summary: "true"
workdir: /codebuild/output/src/foo
you're setting th OTEL var in the envblock, correct?
let me do a quick test
I am setting the OTEL vars on the runner env, which gets passed down to the action, I am pretty sure, as other values did.
In your example, in the dagger.yaml file you are not even setting the traces env, how does it work?
Or was it just an example and you already took it out? I see on the run it's set:
Also, in your examples you've set metrics endpoint. I actually got metrics to work. I am looking for traces tho.
Metrics are too basic and don't give anything beyond I can already pretty much collect from the runner host.
I am looking for spans to be able to see bottlenecks in the pipeline. I want to see which tasks and why take too long and then optimize them.
yes sorry, it was an example and I took it out already
if you've got metrics to work, then traces should also work. Are you setting the OTEL* variables correctly?
I'm setting:
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://.../v1/traces
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
Seems to be correct?