Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OpenTelemetry aiohttp client Integration

pypi

This library allows tracing HTTP requests made by the aiohttp client library.

Installation

pip install opentelemetry-instrumentation-aiohttp-client

Example

import asyncio

import aiohttp

from opentelemetry.instrumentation.aiohttp_client import AioHttpClientInstrumentor
from opentelemetry import trace
from opentelemetry.exporter.jaeger.thrift import JaegerExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor


_JAEGER_EXPORTER = JaegerExporter(
   service_name="example-xxx",
   agent_host_name="localhost",
   agent_port=6831,
)

_TRACE_PROVIDER = TracerProvider()
_TRACE_PROVIDER.add_span_processor(BatchSpanProcessor(_JAEGER_EXPORTER))
trace.set_tracer_provider(_TRACE_PROVIDER)

AioHttpClientInstrumentor().instrument()


async def span_emitter():
   async with aiohttp.ClientSession() as session:
      async with session.get("https://example.com") as resp:
            print(resp.status)


asyncio.run(span_emitter())

References

Metadata

Release files for opentelemetry-instrumentation-aiohttp-client 0.24b0

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

Source distribution (sdist)

Source distribution for opentelemetry-instrumentation-aiohttp-client 0.24b0
File Size Uploaded Provenance Actions
opentelemetry-instrumentation-aiohttp-client-0.24b0.tar.gz 13.7 kB Without provenance Details for opentelemetry-instrumentation-aiohttp-client-0.24b0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opentelemetry-instrumentation-aiohttp-client 0.24b0
File Interpreter ABI Platform Actions
opentelemetry_instrumentation_aiohttp_client-0.24b0-py3-none-any.whl Python 3 none any Details for opentelemetry_instrumentation_aiohttp_client-0.24b0-py3-none-any.whl

Total release size: 25.3 kB

Release files / opentelemetry-instrumentation-aiohttp-client-0.24b0.tar.gz

Download URL opentelemetry-instrumentation-aiohttp-client-0.24b0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bab057cc62a3f1fed5bea9b4899485585df48cc76c74ae4e63495827560a6320
BLAKE2b-256 checksum
How to use checksums
260296f7aa3f6533db4597a2806554107f41c095de81a503fd6b506ff787049d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.7.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.11

Release files / opentelemetry_instrumentation_aiohttp_client-0.24b0-py3-none-any.whl

Download URL opentelemetry_instrumentation_aiohttp_client-0.24b0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8c0ea4086729ef390f13663efc82fddf3dcf7506d74de07e0c803c1fe3a326e
BLAKE2b-256 checksum
How to use checksums
f237da8628be4c3218e181b137a6cce917268b96fc94906721c65a64bb624231
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.7.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.11

Security for opentelemetry-instrumentation-aiohttp-client 0.24b0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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