--- id: opentelemetry-instrumentation-click version: "0.65b0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opentelemetry-instrumentation-click — Click instrumentation for OpenTelemetry License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does This package integrates OpenTelemetry tracing into click-based command-line applications. It automatically wraps click command execution to emit spans, allowing you to observe CLI tool behavior within distributed tracing systems. The instrumentation works by hooking into click's execution layer through wrapt, capturing command invocations as trace events that flow into your OpenTelemetry collector. It's designed for developers building CLI tools who want observability alongside their backend services. You install it alongside click and the core OpenTelemetry libraries, and it activates automatically when your CLI runs, requiring no changes to your click command definitions. The package is in beta status and supports Python 3.10 through 3.14. Use it for: - Trace CLI tool execution in microservice environments to correlate command runs with backend operations - Monitor long-running batch jobs triggered by click commands for performance analysis - Debug click command failures by examining trace spans and context propagation - Observe CLI tool usage patterns and execution times across distributed systems ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds distributed tracing instrumentation to the click CLI library, automatically capturing command execution as spans in OpenTelemetry traces. Yes, if you use click for CLI tools and already run OpenTelemetry in your infrastructure. The package is actively maintained, has no known vulnerabilities, and low install friction. The beta status (0.65b0) is typical for OpenTelemetry instrumentation packages and should not deter adoption if your observability setup is already in place. ## Install pip install opentelemetry-instrumentation-click uv add opentelemetry-instrumentation-click poetry add opentelemetry-instrumentation-click ## Installing opentelemetry-instrumentation-click Before you install: Low friction install with four stable runtime dependencies. Actively maintained as of 29 days ago with recent commit activity. License in practice: Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions. Quickstart: pip install opentelemetry-instrumentation-click from opentelemetry.instrumentation.click import ClickInstrumentor ClickInstrumentor().instrument() Requires Python 3.10 or later; click library must be installed separately Verify before relying: - Whether this package works with click versions prior to the package's first release date (2024-12-11) - Specific click version compatibility range not stated in fact sheet ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags click CLI tracing, opentelemetry click instrumentation, distributed tracing CLI commands, click command observability, opentelemetry instrumentation, CLI span capture, observability, cli-instrumentation, tracing [View on SkillFed](https://skillfed.io/packages/opentelemetry-instrumentation-click) · [View on PyPI](https://pypi.org/project/opentelemetry-instrumentation-click/)