Skip to main content

OpenStack oslo.messaging instrumentation for OpenTelemetry

Project description

OpenTelemetry oslo.messaging Instrumentation

OpenStack oslo.messaging instrumentation for OpenTelemetry.

It patches two thin layers to produce end-to-end producer → consumer traces.

Producer — context injection. Transport._send and Transport._send_notification inject the current W3C trace context into the message's on-the-wire context dictionary:

  • This runs after the serializer, so it is serializer-agnostic — it works with any Serializer (including production's RequestContextSerializer, whose to_dict() would otherwise drop unknown keys).
  • It is a single chokepoint covering every send path: RPC calls, casts, fanout, replies, and notifications.
  • No producer span is created; the trace linkage rides on whatever span is already active in the caller (e.g. the WSGI request span).

Consumer — spans. The dispatchers open CONSUMER spans parented to the producer, extracting context from the incoming message:

  • RPCDispatcher.dispatch → a CONSUMER span oslo.messaging.rpc.process
  • NotificationDispatcher.dispatch → a CONSUMER span oslo.messaging.notification.process

The span is scoped to the dispatch call, so the remote context is never attached beyond message handling. Message payloads are never recorded as span attributes. The batch notification dispatcher is not instrumented.

Usage

from opentelemetry.instrumentation.oslo_messaging import (
    OsloMessagingInstrumentor,
)

OsloMessagingInstrumentor().instrument()

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_oslo_messaging-0.9.1.dev0.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_oslo_messaging-0.9.1.dev0.tar.gz
Algorithm Hash digest
SHA256 62501f63b62201fb0c28d68b7276cfc994ab42efb986ba5ba9580c6a388cf017
MD5 a6237cec9841d8d4b441b74f1ad82a85
BLAKE2b-256 5b690a20f32b759cd7466e1508e70d4dc64facfabcb75061a72694aabf5437ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_oslo_messaging-0.9.1.dev0.tar.gz:

Publisher: publish-pypi.yml on daipham3213/opentelemetry-openstack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentelemetry_instrumentation_oslo_messaging-0.9.1.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_oslo_messaging-0.9.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 e219b866b756055cfc9f0498c65aa70e9f5650bf7e1e65d7d0fd50ff4a28b767
MD5 85df79bb98e298ec7f4768953612fefd
BLAKE2b-256 6a25085ec9e4efaeba4ef894ab3952dd8df1f42c318935e0b9738c2f3675467d

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_oslo_messaging-0.9.1.dev0-py3-none-any.whl:

Publisher: publish-pypi.yml on daipham3213/opentelemetry-openstack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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