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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_keystonemiddleware-0.9.1.dev0.tar.gz
Algorithm Hash digest
SHA256 cd5c407b3b5b189ca9c402d7fdeb69c784f31dfc85af53cf1b679237c648c995
MD5 022b598fd238000db3467e1f6b409975
BLAKE2b-256 9dbacd44436e4a9ff3fd0cf1ab3ab29cc39fc2f703ac55fd1b561a008390e7d1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_keystonemiddleware-0.9.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 03a5e0412430281c6be9a45bee190fc090504db1d789bc1e97a45e730d8de4a9
MD5 6a941b28933af364595527ed594bcc26
BLAKE2b-256 d0234a638d2c5c427855efdb56e80a3b418de5ffe731d738f8f1a8ef3386d066

See more details on using hashes here.

Provenance

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