skillfed

opentelemetry-instrumentation-confluent-kafka

OpenTelemetry Confluent Kafka instrumentation

opentelemetry-instrumentation-confluent-kafka v0.65b0 3.7M downloads/30d#2,508 on PyPI1,086
Permissive license Apache-2.0 Active released

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 on this page — 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

opentelemetry-instrumentation-confluent-kafka on PyPI

pip

pip install opentelemetry-instrumentation-confluent-kafka

uv

uv add opentelemetry-instrumentation-confluent-kafka

poetry

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 the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, wrapt
Maintenance actively maintained — 29 days since the last release
Last repo commit
First released
Downloads 3,742,389/month — #2,508 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: opentelemetry_instrumentation_confluent_kafka-0.65b0-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

kafka tracing instrumentationopentelemetry kafka monitoringconfluent-kafka distributed tracingkafka span collectionmessage broker observabilitykafka producer consumer tracing
observabilitydistributed-tracingkafka

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-aiokafka

Adds distributed tracing instrumentation to…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-kafka-python

Adds distributed tracing instrumentation to…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-cassandra

Adds distributed tracing instrumentation to…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-boto

Adds distributed tracing to AWS SDK (Boto)…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-remoulade

Adds distributed tracing instrumentation for…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-celery

Adds distributed tracing and observability to…

permissive · top 5,000 on PyPI

kafka-schema-registry

Integrates Kafka with Confluent Schema Registry…

permissive · top 15,000 on PyPI

kafka-python-ng

A Python client library for Apache Kafka that…

permissive · top 5,000 on PyPI

py-zipkin

py_zipkin provides context managers and…

permissive · top 15,000 on PyPI

confluent-kafka-stubs

Provides type hints and stubs for the…

permissive · top 5,000 on PyPI