Skip to content

[confluent-kafka] Avoid empty recv spans #3590

@ElfoLiNk

Description

@ElfoLiNk

Describe your environment

Kubernetes python application with autoinstrumentation:

ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.55b1

What happened?

I have a lot of empty recv span generated by the confluent-kafka python instrumentation

Steps to Reproduce

Instrument a consumer with the confluent-kafka instrumentation

Expected Result

Avoid creating a span when there are no fetched records like the java instrumentation:

https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/src/main/java/io/opentelemetry/instrumentation/kafkaclients/v2_6/KafkaTelemetry.java#L270-L272

Actual Result

not usefull traces are generated with only a recv span

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions