diff --git a/instrumentation/opentelemetry-instrumentation-aiokafka/src/opentelemetry/instrumentation/aiokafka/__init__.py b/instrumentation/opentelemetry-instrumentation-aiokafka/src/opentelemetry/instrumentation/aiokafka/__init__.py index 507206f4f2..4b14ace4fb 100644 --- a/instrumentation/opentelemetry-instrumentation-aiokafka/src/opentelemetry/instrumentation/aiokafka/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-aiokafka/src/opentelemetry/instrumentation/aiokafka/__init__.py @@ -18,7 +18,7 @@ Usage ----- -..code:: python +.. code:: python from opentelemetry.instrumentation.aiokafka import AIOKafkaInstrumentor from aiokafka import AIOKafkaProducer, AIOKafkaConsumer @@ -45,7 +45,8 @@ def async_produce_hook(span: Span, args, kwargs) def async_consume_hook(span: Span, record: kafka.record.ABCRecord, args, kwargs) for example: -.. code: python +.. code:: python + from opentelemetry.instrumentation.kafka import AIOKafkaInstrumentor from aiokafka import AIOKafkaProducer, AIOKafkaConsumer diff --git a/instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/__init__.py b/instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/__init__.py index aaf906d118..48b2bd2c26 100644 --- a/instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/__init__.py @@ -18,7 +18,7 @@ Usage ----- -.. code-block:: python +.. code:: python from opentelemetry.instrumentation.confluent_kafka import ConfluentKafkaInstrumentor from confluent_kafka import Producer, Consumer @@ -54,7 +54,6 @@ def basic_consume_loop(consumer, topics): consumer.close() basic_consume_loop(consumer, "my-topic") - --- The _instrument method accepts the following keyword args: tracer_provider (TracerProvider) - an optional tracer provider @@ -95,7 +94,6 @@ def instrument_consumer(consumer: Consumer, tracer_provider=None) p.produce('my-topic',b'raw_bytes') msg = c.poll() -___ """ from typing import Collection diff --git a/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py b/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py index 9b0f4895f9..1e0dbf79e1 100644 --- a/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py @@ -18,7 +18,7 @@ Usage ----- -..code:: python +.. code:: python from opentelemetry.instrumentation.kafka import KafkaInstrumentor from kafka import KafkaProducer, KafkaConsumer @@ -45,7 +45,8 @@ def produce_hook(span: Span, args, kwargs) def consume_hook(span: Span, record: kafka.record.ABCRecord, args, kwargs) for example: -.. code: python +.. code:: python + from opentelemetry.instrumentation.kafka import KafkaInstrumentor from kafka import KafkaProducer, KafkaConsumer