Skip to main content

OpenStack keystonemiddleware module instrumentation for OpenTelemetry

Project description

OpenTelemetry keystonemiddleware instrumentation

Instruments the keystonemiddleware auth_token WSGI middleware that OpenStack services mount in front of their request pipeline.

It wraps keystonemiddleware.auth_token.BaseAuthProtocol.process_request -- the single method through which the stock AuthProtocol and any subclass validate the request's bearer token(s) -- so every authentication produces a span:

  • the outcome: whether a user and/or service token was present and accepted;
  • for accepted user tokens, the resolved identity (user.id, user.name, user.roles) and OpenStack scope (openstack.project_id, openstack.project_name, openstack.domain_id).

Because auth_token is usually the first middleware to see an inbound request, it also continues a distributed trace: when no span is already active the instrumentor extracts the W3C trace context from the incoming headers and opens a SERVER span, so a trace started by an instrumented client (for example the OpenStack SDK) carries on into the service. When a span is already active the authentication span is nested under it as INTERNAL.

Installation

pip install opentelemetry-instrumentation-keystonemiddleware

Usage

from opentelemetry.instrumentation.keystonemiddleware import (
    KeystoneMiddlewareInstrumentor,
)

KeystoneMiddlewareInstrumentor().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_keystonemiddleware-0.11.0.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_keystonemiddleware-0.11.0.tar.gz
Algorithm Hash digest
SHA256 90b51eb2eb96857d352c2f629ad3b9373a30cb9375baaf363a0330dc6f660305
MD5 a5f5cbdc0087e67be8d8dd93f3687b74
BLAKE2b-256 2e247917d60317f8cef1624ad97330f669cc4cb97835ce86362202d90a81c474

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_keystonemiddleware-0.11.0.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_keystonemiddleware-0.11.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_keystonemiddleware-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3c7845bcbe4888ff96eeea96e037ee2fd599c7aff6f74606ccd31a4773ac709
MD5 ab5acb7677afb0833ba55c18d67f0658
BLAKE2b-256 aaa4fd337c1fa2a92c8f925a2a94e4ac8805da20691a02b5ef55c54a3983645d

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_keystonemiddleware-0.11.0-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