Skip to main content

OpenTelemetry aiohttp client instrumentation

Project description


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


pip install opentelemetry-instrumentation-aiohttp-client


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(

_TRACE_PROVIDER = TracerProvider()


async def span_emitter():
   async with aiohttp.ClientSession() as session:
      async with session.get("") as resp:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for opentelemetry-instrumentation-aiohttp-client, version 0.24b0
Filename, size File type Python version Upload date Hashes
Filename, size opentelemetry_instrumentation_aiohttp_client-0.24b0-py3-none-any.whl (11.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size opentelemetry-instrumentation-aiohttp-client-0.24b0.tar.gz (13.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page