Add OTEL support (carry 4556)
- carry / rebase of / closes https://github.com/docker/cli/pull/4556
- [x] depends on https://github.com/docker/cli/pull/4700
This is broken into 2 commits:
- Plumb contexts through commands
- Add otel tracing as a persistent pre-run to all CLI commands.
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
I'll move the first commit (punching-through contexts) to a separate PR
Codecov Report
Merging #4698 (d0da194) into master (efb9206) will decrease coverage by
61.32%. Report is 44 commits behind head on master. The diff coverage isn/a.
:exclamation: Current head d0da194 differs from pull request most recent head 827bead. Consider uploading reports for the commit 827bead to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #4698 +/- ##
==========================================
- Coverage 61.31% 0 -61.32%
==========================================
Files 287 0 -287
Lines 20065 0 -20065
==========================================
- Hits 12303 0 -12303
+ Misses 6869 0 -6869
+ Partials 893 0 -893
Thanks to @milas ❤️ I pushed a commit that swaps BuildKit detect with the OTEL SDK 🎉
I'll cleanup / squash commits a bit after review; just pushing the changes here first
Using my branch off your PR 🎉
(also notice I snuck in some new attributes for the CLI version metadata 👀)
Start a Jaeger instance:
docker run --rm --name jaeger \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
jaegertracing/all-in-one:1.52
(adapted from https://www.jaegertracing.io/docs/latest/getting-started/#all-in-one)
Open web UI @ http://localhost:16686/
make -f docker.Makefile build
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 ./build/docker --debug version
Thanks all! I pushed a couple of commits (to be squashed if ok)
I'll be calling it a day for now, but if someone wants to push to this branch; feel free to.
Pushing additional commits should be fine; we can cleanup / squash later (I didn't bother cleaning up commits yet while we're moving this still)
HA!
#19 53.89 === FAIL: cmd/docker TestClientDebugEnabled (0.00s)
#19 53.89 panic: cannot create context from nil parent [recovered]
#19 53.89 panic: cannot create context from nil parent