Commit Graph

2 Commits

Author SHA1 Message Date
Rory e1aa4f779b
otel: add args & flags to cli traces (#10974)
Signed-off-by: rvigus <roryvigus@gmail.com>
2023-09-07 16:04:36 -04:00
Milas Bowman e1f8603a62 otel: refactor root command span reporting
* Move all the initialization code out of `main.go`
* Ensure spans are reported when there's an error with the
  command
* Attach the Compose version & active Docker context to the
  resource instead of the span
* Name the root CLI span `cli/<cmd>` for clarity and grab
  the full subcommand path (e.g. `alpha-viz` instead of just
  `viz`)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-06-20 17:25:58 +02:00