OpenStack oslo.log instrumentation for OpenTelemetry
Project description
OpenTelemetry oslo.log Instrumentation
OpenStack oslo.log instrumentation for OpenTelemetry.
oslo.log builds on top of the standard library logging module, so this
instrumentor extends opentelemetry-instrumentation-logging. On instrument()
it:
- injects the OpenTelemetry attributes
otelTraceID,otelSpanID,otelTraceSampledandotelServiceNameonto every log record, so they are available to oslo.log'sContextFormatterformat strings; - resolves the service name from the (optional)
logger_providerso it matches the resource the logs are exported with; - installs a
LoggingHandleron the root logger so oslo.log records are exported through the OpenTelemetry logs pipeline (disable withenable_log_auto_instrumentation=False).
Usage
from opentelemetry.instrumentation.oslo_log import OsloLogInstrumentor
OsloLogInstrumentor().instrument(logger_provider=logger_provider)
To surface the injected trace context in oslo.log output, reference the fields
from logging_context_format_string / logging_default_format_string in your
oslo.config:
[DEFAULT]
logging_default_format_string = %(asctime)s %(levelname)s %(name)s [trace_id=%(otelTraceID)s span_id=%(otelSpanID)s] %(message)s
logging_context_format_string = %(asctime)s %(levelname)s %(name)s [%(request_id)s trace_id=%(otelTraceID)s span_id=%(otelSpanID)s] %(message)s
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_oslo_log-0.1.0.tar.gz.
File metadata
- Download URL: opentelemetry_instrumentation_oslo_log-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d6af62e418ba6bd0f70b17851d72ec6c7dcb629dda7ad128ecbfdad77de8f96
|
|
| MD5 |
f115965f9e047734c2152176209789e7
|
|
| BLAKE2b-256 |
ec06c66286a269e208abf37a1beaa19c5b3f0d39c92058f96da5f787ad4d6cbf
|
Provenance
The following attestation bundles were made for opentelemetry_instrumentation_oslo_log-0.1.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_oslo_log-0.1.0.tar.gz -
Subject digest:
2d6af62e418ba6bd0f70b17851d72ec6c7dcb629dda7ad128ecbfdad77de8f96 - Sigstore transparency entry: 2016444762
- Sigstore integration time:
-
Permalink:
daipham3213/opentelemetry-openstack@7494174861c69e46a81e61822ec5340ebeb84070 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/daipham3213
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7494174861c69e46a81e61822ec5340ebeb84070 -
Trigger Event:
release
-
Statement type:
File details
Details for the file opentelemetry_instrumentation_oslo_log-0.1.0-py3-none-any.whl.
File metadata
- Download URL: opentelemetry_instrumentation_oslo_log-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 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 |
72b63ec7a17881671a157b358d476e09b799c37beabdd240b5dd616ff5005592
|
|
| MD5 |
4a4ee1a78550f91d24bc2f9d4e3ac118
|
|
| BLAKE2b-256 |
71043cdbc19b1e6a033b49db98ab3d6e5acb6a95f5b226265cc18d233569280b
|
Provenance
The following attestation bundles were made for opentelemetry_instrumentation_oslo_log-0.1.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_oslo_log-0.1.0-py3-none-any.whl -
Subject digest:
72b63ec7a17881671a157b358d476e09b799c37beabdd240b5dd616ff5005592 - Sigstore transparency entry: 2016444855
- Sigstore integration time:
-
Permalink:
daipham3213/opentelemetry-openstack@7494174861c69e46a81e61822ec5340ebeb84070 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/daipham3213
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7494174861c69e46a81e61822ec5340ebeb84070 -
Trigger Event:
release
-
Statement type: