Skip to main content

Instrument asyncio Python for AWS X-Ray.

Project description

xraysink (aka xray-asyncio)

Extra AWS X-Ray instrumentation for asyncio Python libraries that are not (yet) supported by the official aws_xray_sdk library.

Integrations Supported

  • Generic ASGI-compatible tracing middleware for any ASGI-compliant web framework. This has been tested with:

Installation

xraysink is distributed as a standard python package through pypi, so you can install it with your favourite Python package manager. For example:

pip install xraysink 

How to use

FastAPI

Instrument incoming requests in your FastAPI web server by adding the xray_middleware. For example:

# Basic asyncio X-Ray configuration
xray_recorder.configure(context=AsyncContext(), service="my-cute-little-service")

# Create a FastAPI app with various middleware
app = FastAPI()
app.add_middleware(MyTracingDependentMiddleware)  # Any middleware that is added earlier will have the X-Ray tracing context available to it
app.add_middleware(BaseHTTPMiddleware, dispatch=xray_middleware)

Licence

This project uses the Apache 2.0 licence, to make it compatible with aws_xray_sdk, the primary library for integrating with AWS X-Ray.

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

xraysink-1.0.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xraysink-1.0.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file xraysink-1.0.0.tar.gz.

File metadata

  • Download URL: xraysink-1.0.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.7.3 Linux/4.4.0-18362-Microsoft

File hashes

Hashes for xraysink-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ffb441fd96a3225be4090abd2b1d53d997f91fcddb921575350b9bf448c15be6
MD5 2adc52ef553920c4db61f63dc4e3f8e9
BLAKE2b-256 56f74af1dc1011af04f7505df61a8e6a181d69b864d0ba7a165d23ffab1c9c52

See more details on using hashes here.

File details

Details for the file xraysink-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: xraysink-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.7.3 Linux/4.4.0-18362-Microsoft

File hashes

Hashes for xraysink-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59e2be955d422d77710d88087c5700d8807d4140e57ebf00415951d6451902ef
MD5 7f6515a88047300e22f3054000111ea3
BLAKE2b-256 a04e78645eb5a10d59f60790b2f862f5f4f0cf69ca81f1759293bbad07c01b6d

See more details on using hashes here.

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