From 6c92f387aa6f2ea606728077aad47791b0eb33b5 Mon Sep 17 00:00:00 2001 From: Leonid Bugaev Date: Thu, 5 Dec 2024 15:53:21 +0300 Subject: [PATCH] Fix doc formatting issues (#3062) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/aiokafka/__init__.py | 5 +++-- .../instrumentation/confluent_kafka/__init__.py | 4 +--- .../src/opentelemetry/instrumentation/kafka/__init__.py | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) 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