Introducing OTel Tracing in the Pulumi CLI
Blog post from Pulumi
Tracing is a crucial component of observability in the command-line interface (CLI), and a recent update has transitioned from the deprecated OpenTracing to OpenTelemetry (OTel) for more robust and future-proof tracing capabilities. Originally, tracing was implemented with OpenTracing in 2017, but with its deprecation and the emergence of OTel as a more modern and actively maintained tool, the decision was made to adopt OTel to enhance performance and ease of use. The implementation involved creating an OTel collector within the CLI to facilitate trace collection across multiple plugins, ensuring compatibility with both OTel and legacy OpenTracing plugins by translating traces internally. This setup allows traces to be exported via gRPC to a collector or saved as JSON-encoded files for later analysis in various trace viewers such as Jaeger or OTel Desktop Viewer. Users can try out this new tracing feature using the `--otel-traces` flag in pulumi version v3.226 or newer, and feedback is encouraged through community channels.