Skip to content

Fix ConfluentKafkaInstrumentor usage #1392

@jltvieira

Description

@jltvieira

Describe your environment
Docker image running python:3.10.7-slim-bullseye as base

Steps to reproduce

from opentelemetry.instrumentation.confluentkafka import ConfluentKafkaInstrumentor

# Instrument kafka
ConfluentKafkaInstrumentor().instrument()

What is the expected behavior?
Instrumentation to work just by adding the lines above.

What is the actual behavior?

ModuleNotFoundError: No module named 'opentelemetry.instrumentation.confluentkafka'

Additional context
The solution is to actually make the import like this:

from opentelemetry.instrumentation.confluent_kafka import ConfluentKafkaInstrumentor

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions