Skip to main content

Tracability for Python applications

Convienience Flask extension for retrieving trace IDs from incoming requests.

This package depends on:

  • Flask (Version 2.2.2 or higher)
  • Python 3.9 or higher

Usage

Instantiate it like a normal flask extension:

from landregistry.trace_id import TraceID
from <somewhere> import app

# ...

trace_id_extn = TraceID()
trace_id_extn.init_app(app)

# retrieve the current trace ID
trace_id = trace_id_extn.current_trace_id

Properties

TraceID.current_trace_id

If the application is serving a request, and the value in the request header X-Trace-ID is present and is a valid trace ID, then returns the header value.

If the application is serving a request, and the request header X-Trace-ID is absent or contains an invalid trace ID, returns a new trace ID. A new trace ID generated this way will be the same for all calls to current_trace_id for a given request.

If the application is not serving a request, returns N/A.

Metadata

Release files for landregistry-trace-id 0.9.9

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

Source distribution (sdist)

Source distribution for landregistry-trace-id 0.9.9
File Size Uploaded
landregistry_trace_id-0.9.9.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for landregistry-trace-id 0.9.9
File Interpreter ABI Platform
landregistry_trace_id-0.9.9-py3-none-any.whl Python 3 none any Details

Total release size: 5.4 kB

Release files / landregistry_trace_id-0.9.9.tar.gz

Download URL landregistry_trace_id-0.9.9.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bdd68f792d824c9fe8e914e7cf3ee8f5a435db0ad871124624a69b6eea6c276d
BLAKE2b-256 checksum
How to use checksums
229812249383d4092f3d5e3ba120bb53a36ed5ea63a1d1dc1582e251327fc134
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / landregistry_trace_id-0.9.9-py3-none-any.whl

Download URL landregistry_trace_id-0.9.9-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84960f02886594af9fe2e3b5a097abd1df78506d79c83c77a13ec9216350789f
BLAKE2b-256 checksum
How to use checksums
bdaf9603268f1190da89f83b753caad3df2a35ec7c4dc51263ac4d23c857cd6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.9.9 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