Skip to content

opentelemetry-instrumentation-confluent-kafka: TypeError on consumer close #2890

@allistergg

Description

@allistergg

Describe your environment

OS: Fedora
Python version: 3.12.4
Package version:
confluent-kafka==2.4.0
opentelemetry-distro==0.48b0
opentelemetry-instrumentation-confluent-kafka==0.48b0

What happened?

on consumer.close()
TypeError: ConfluentKafkaInstrumentor._instrument.<locals>._inner_wrap_close() takes 2 positional arguments but 4 were given

Steps to Reproduce

consumer.py:

from confluent_kafka import Consumer

topic = "topic"

consumer = Consumer({'bootstrap.servers': 'localhost:9092', 'group.id': 'test-group'})
consumer.subscribe([topic])
message = consumer.poll(timeout=5)
consumer.close()

$ opentelemetry-instrument python consumer.py

Expected Result

No TypeError

Actual Result

TypeError: ConfluentKafkaInstrumentor._instrument.<locals>._inner_wrap_close() takes 2 positional arguments but 4 were given

Additional context

No response

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions