From ddbc40f90741b61f054a4482d750e261095b85c5 Mon Sep 17 00:00:00 2001 From: Nimrod Shlagman Date: Tue, 27 Dec 2022 09:09:49 +0200 Subject: [PATCH] add pika to docs (#1540) --- docs-requirements.txt | 1 + docs/instrumentation/pika/pika.rst | 7 +++++++ .../src/opentelemetry/instrumentation/pika/__init__.py | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 docs/instrumentation/pika/pika.rst diff --git a/docs-requirements.txt b/docs-requirements.txt index e745057a7..a1b55877a 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -29,6 +29,7 @@ falcon~=2.0 grpcio~=1.27 mysql-connector-python~=8.0 psutil>=5 +pika>=0.12.0 pymongo~=3.1 PyMySQL~=0.9.3 pyramid>=1.7 diff --git a/docs/instrumentation/pika/pika.rst b/docs/instrumentation/pika/pika.rst new file mode 100644 index 000000000..a6cd2ee92 --- /dev/null +++ b/docs/instrumentation/pika/pika.rst @@ -0,0 +1,7 @@ +OpenTelemetry Pika Instrumentation +===================================== + +.. automodule:: opentelemetry.instrumentation.pika + :members: + :undoc-members: + :show-inheritance: diff --git a/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py b/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py index 5f428eadd..c745462cf 100644 --- a/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ -Instrument `pika` to trace RabbitMQ applications. +Instrument pika to trace RabbitMQ applications. Usage ----- @@ -63,7 +63,7 @@ Usage PikaInstrumentor.instrument_channel(channel, tracer_provider=tracer_provider) * PikaInstrumentor also supports instrumenting with hooks that will be called when producing or consuming a message. - The hooks should be of type `Callable[[Span, bytes, BasicProperties], None]` + The hooks should be of type "Callable[[Span, bytes, BasicProperties], None]" where the first parameter is the span, the second parameter is the message body and the third parameter is the message properties