Skip to main content

OpenTelemetry oslo.service Instrumentation

OpenStack oslo.service instrumentation for OpenTelemetry.

oslo.service is OpenStack's service framework: it launches services and runs their background work (ThreadGroup, looping/periodic calls, RPC servers) on either a threading or an eventlet backend. This instrumentor emits no telemetry of its own — it makes the active trace context survive the concurrency boundaries oslo.service introduces, so spans and oslo.log records created in spawned work stay correlated with the request that spawned them.

The trace a record/span is correlated to comes from the current OpenTelemetry context, which lives in a contextvars.Context. Python does not copy that context into new threads or greenthreads, so work handed to a worker would otherwise start on a fresh, disconnected trace (or export trace_id/span_id as 0).

On instrument() it:

  • selects the oslo.service backend (threading by default) unless the host has already chosen one — set OTEL_PYTHON_OSLO_SERVICE_BACKEND=threading|eventlet or pass backend="...";
  • propagates the active context across oslo.service's concurrency primitives.

What gets propagated

Backend Primitive Wrapped
threading ThreadGroup.add_thread (a threading.Thread per task) threading.Thread.start / run
threading looping / periodic calls (a futurist pool) futurist.ThreadPoolExecutor.submit
eventlet greenthreads (ThreadGroup, hand-offs) eventlet.spawn / spawn_n / spawn_after, GreenPool.spawn / spawn_n, futurist.GreenThreadPoolExecutor.submit

Not covered:

Note: this context propagation previously lived in the oslo.messaging (eventlet spawns) and oslo.log (threads/futurist) instrumentors. It is consolidated here so it is defined once and benefits every OpenStack service, regardless of which of those instrumentors it also enables.

Usage

from opentelemetry.instrumentation.oslo_service import OsloServiceInstrumentor

OsloServiceInstrumentor().instrument()

To pair with log/trace instrumentation, enable it alongside the others (order does not matter):

OsloServiceInstrumentor().instrument()
OsloMessagingInstrumentor().instrument(tracer_provider=tracer_provider)
OsloLogInstrumentor().instrument(logger_provider=logger_provider)

Release files for opentelemetry-instrumentation-oslo-service 0.11.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opentelemetry-instrumentation-oslo-service 0.11.1
File Size Uploaded
opentelemetry_instrumentation_oslo_service-0.11.1.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opentelemetry-instrumentation-oslo-service 0.11.1
File Interpreter ABI Platform
opentelemetry_instrumentation_oslo_service-0.11.1-py3-none-any.whl Python 3 none any Details

Total release size:17.6 kB

Release files / opentelemetry_instrumentation_oslo_service-0.11.1.tar.gz

Download URL opentelemetry_instrumentation_oslo_service-0.11.1.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6268df78454b4416bc91f1c3e10ec805b475e5f18931359528a5e5f6d38bab7d
BLAKE2b-256 checksum
How to use checksums
6be0603e786e18190c6f93724fa27e22a8d0aeb05920ff4e0236a2ecafdd6ccd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / opentelemetry_instrumentation_oslo_service-0.11.1-py3-none-any.whl

Download URL opentelemetry_instrumentation_oslo_service-0.11.1-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa15d397bd874b98217da1eb1d54f624fef713316b728f03a6e0caed481a3df5
BLAKE2b-256 checksum
How to use checksums
dd3d017c2dd1aa95abab77d035e0d9eb57df79b654bdc678ed8c219488266850
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.13.0

2 release files

0.12.5

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

This release

0.11.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page