--- id: opentelemetry-instrumentation-confluent-kafka version: "0.65b0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opentelemetry-instrumentation-confluent-kafka — OpenTelemetry Confluent Kafka instrumentation License: permissive · Maintenance: active · Downloads: 3.7M/mo ## What it is and what it does This package is an OpenTelemetry instrumentation plugin that automatically captures Kafka operations from the confluent-kafka library and exports them as distributed traces. It wraps confluent-kafka calls to emit span data compatible with OpenTelemetry collectors, allowing you to observe message flow, latency, and errors across your Kafka infrastructure without modifying application code. The package integrates with opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, and wrapt for transparent function wrapping. It targets Python 3.10 and later and is actively maintained, though marked as beta, indicating the API may evolve. Use it for: - Monitor Kafka producer and consumer latency and throughput in microservice architectures using distributed tracing backends. - Correlate Kafka message operations with upstream and downstream service calls in end-to-end trace visualization. - Debug message delivery failures and consumer lag by inspecting span attributes and error telemetry. - Collect Kafka operation metrics for SLO tracking and alerting in observability platforms. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds distributed tracing to confluent-kafka library calls, capturing Kafka producer and consumer operations as OpenTelemetry spans for observability. Yes, if you are already using OpenTelemetry and confluent-kafka together. Low install friction, active maintenance, no security issues, and permissive licensing make it a straightforward addition to tracing-enabled systems. The beta status is not a blocker for production use in established observability setups, but verify confluent-kafka version compatibility for your deployment. ## Install pip install opentelemetry-instrumentation-confluent-kafka uv add opentelemetry-instrumentation-confluent-kafka poetry add opentelemetry-instrumentation-confluent-kafka ## Installing opentelemetry-instrumentation-confluent-kafka Before you install: Low friction installation with a small, stable dependency tree (4 runtime deps). Active maintenance with recent release; beta status indicates ongoing development but no known security issues. License in practice: Apache-2.0 permissive license allows use in most commercial and open-source projects without significant restrictions. Quickstart: pip install opentelemetry-instrumentation-confluent-kafka import opentelemetry.instrumentation.confluent_kafka from opentelemetry.instrumentation.confluent_kafka import ConfluentKafkaInstrumentor ConfluentKafkaInstrumentor().instrument() Requires Python 3.10 or later; confluent-kafka library must be installed separately. Verify before relying: - Whether this instrumentation works with all confluent-kafka versions or has specific version constraints. - Performance overhead of tracing on high-throughput Kafka workloads. - Specific span attributes and semantic conventions used for Kafka operations. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags kafka tracing instrumentation, opentelemetry kafka monitoring, confluent-kafka distributed tracing, kafka span collection, message broker observability, kafka producer consumer tracing, observability, distributed-tracing, kafka [View on SkillFed](https://skillfed.io/packages/opentelemetry-instrumentation-confluent-kafka) · [View on PyPI](https://pypi.org/project/opentelemetry-instrumentation-confluent-kafka/)