OpenStack SDK (openstacksdk) instrumentation for OpenTelemetry
Project description
OpenTelemetry OpenStack SDK Instrumentation
OpenStack SDK (openstacksdk) instrumentation for OpenTelemetry.
The OpenStack SDK reaches every service through an
openstack.connection.Connection whose service proxies (conn.compute,
conn.network, ...) subclass openstack.proxy.Proxy. Every REST call the SDK
makes funnels through a single method, Proxy.request, no matter which
resource method the application called.
This instrumentor wraps Proxy.request so each SDK REST call becomes a
CLIENT span. On instrument() it:
- records one span per request, named
{service_type} {HTTP method}(for examplecompute GET), falling back to the bare HTTP method when the proxy has no service type; - sets the standard HTTP client attributes
http.request.method,http.response.status_code,url.full,server.addressandserver.port(the fully resolved URL is read back from the response once keystoneauth has looked up the endpoint); - adds
openstack.service_typeandopenstack.region_namedescribing the proxy that issued the call; - injects the active W3C trace context into the outgoing request headers, so a trace started in the SDK continues on the OpenStack service that handles the request (when that service is instrumented too).
Proxy.request defaults to raise_exc=False, so HTTP error statuses come back
as ordinary responses rather than exceptions; the span status is set to
ERROR for any status code >= 400, and transport-level failures are recorded
as exceptions on the span.
Note: the span is created at the proxy layer, so keystoneauth's own token and version-discovery requests — which go straight through the session rather than a proxy — are not traced. Only genuine SDK service calls produce spans.
Usage
from opentelemetry.instrumentation.openstacksdk import (
OpenStackSDKInstrumentor,
)
OpenStackSDKInstrumentor().instrument()
import openstack
conn = openstack.connect(cloud="mycloud")
list(conn.compute.servers()) # emits a "compute GET" client span
Pass a tracer_provider to instrument() to use a provider other than the
global default.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opentelemetry_instrumentation_openstacksdk-0.9.0.tar.gz.
File metadata
- Download URL: opentelemetry_instrumentation_openstacksdk-0.9.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f616f46bdbe5c9c8f4e0fe2883abb565018e135b8732bc4799c3cf38d61a708e
|
|
| MD5 |
a56c181a64e796a93f237edc0adcb07c
|
|
| BLAKE2b-256 |
8fd78c3e9b03629f123bfd0b810f5accc2316a7ebb833ecff639eb55f7b730dc
|
Provenance
The following attestation bundles were made for opentelemetry_instrumentation_openstacksdk-0.9.0.tar.gz:
Publisher:
publish-pypi.yml on daipham3213/opentelemetry-openstack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opentelemetry_instrumentation_openstacksdk-0.9.0.tar.gz -
Subject digest:
f616f46bdbe5c9c8f4e0fe2883abb565018e135b8732bc4799c3cf38d61a708e - Sigstore transparency entry: 2054783209
- Sigstore integration time:
-
Permalink:
daipham3213/opentelemetry-openstack@744e4979f4f250a7a0bf0999489342de8f24909e -
Branch / Tag:
refs/tags/0.9.0 - Owner: https://github.com/daipham3213
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@744e4979f4f250a7a0bf0999489342de8f24909e -
Trigger Event:
release
-
Statement type:
File details
Details for the file opentelemetry_instrumentation_openstacksdk-0.9.0-py3-none-any.whl.
File metadata
- Download URL: opentelemetry_instrumentation_openstacksdk-0.9.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32f195b12c4bf2af991863fdb3ad987834d7fa3db0128a57a24be288f116b1e3
|
|
| MD5 |
c3057dc1b4861bdff50bb467d3b3c8a0
|
|
| BLAKE2b-256 |
71ef0289c0c1ff5b11f7d32032bb645b3cdf19f27180b70bd6ab6f37b343c34f
|
Provenance
The following attestation bundles were made for opentelemetry_instrumentation_openstacksdk-0.9.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on daipham3213/opentelemetry-openstack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opentelemetry_instrumentation_openstacksdk-0.9.0-py3-none-any.whl -
Subject digest:
32f195b12c4bf2af991863fdb3ad987834d7fa3db0128a57a24be288f116b1e3 - Sigstore transparency entry: 2054783848
- Sigstore integration time:
-
Permalink:
daipham3213/opentelemetry-openstack@744e4979f4f250a7a0bf0999489342de8f24909e -
Branch / Tag:
refs/tags/0.9.0 - Owner: https://github.com/daipham3213
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@744e4979f4f250a7a0bf0999489342de8f24909e -
Trigger Event:
release
-
Statement type: