Skip to main content

FastStream instrumentation for OpenTelemetry

Project description

FastStream instrumentation for OpenTelemetry

PyPI - Version PyPI - Python Version

This library allows tracing requests made by the FastStream library.

Installation

pip install opentelemetry-instrumentation-faststream

Usage

Middlewares

Redis

from opentelemetry.instrumentation.faststream.middlewares import RedisOtelMiddleware

broker = RedisBroker("redis://localhost:6379", middlewares=[RedisOtelMiddleware])

Kafka

from opentelemetry.instrumentation.faststream.middlewares import KafkaOtelMiddleware

broker = KafkaBroker("redis://localhost:6379", middlewares=[KafkaOtelMiddleware])

RabbitMQ

from opentelemetry.instrumentation.faststream.middlewares import RabbitOtelMiddleware

broker = RabbitBroker("redis://localhost:6379", middlewares=[RabbitOtelMiddleware])

NATS

from opentelemetry.instrumentation.faststream.middlewares import NatsOtelMiddleware

broker = NatsBroker("redis://localhost:6379", middlewares=[NatsOtelMiddleware])

Instrumentation

from opentelemetry.instrumentation.faststream import FastStreamInstrumentator

# Instrument all brokers automatically
FastStreamInstrumentator().instrument()

# Uninstrument
FastStreamInstrumentator().uninstrument()

License

opentelemetry-instrumentation-faststream is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file opentelemetry_instrumentation_faststream-0.1.3.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_faststream-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cb56d3ab3d39977a9ee43be48e24c67ee7e3db102295dd20221116bb45ae1538
MD5 b3f4eb3a9999a5e951070fcde4197ddb
BLAKE2b-256 8495a1009dec6b4980957315d4ef136b24d18c55d8d7cda4e6fab3d37b01d177

See more details on using hashes here.

File details

Details for the file opentelemetry_instrumentation_faststream-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_faststream-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bfeea723453e6553873962744a9d74c636eb590b030573844ca6b1be4fa0938a
MD5 0713ce34c59ecdc86112316e931bbc70
BLAKE2b-256 68219a69eaa366265c76a6dbf05b3069b315e355cc4cd768147d9c06d0c012ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page