I now I can disable instrumentation for kafka events with disable_instrumentations property like this:
But this removes all related to Kafka. I would like to disable instrumentation only when producing, but keep the consumers instrumented. The reason is because we have an app that produces tons of messages per every consumed message and we would like to focus instrumentation only on the consumer processes.
I think the responsible class of this is the following:
but I can't find any configuration related or a way to disable it.