Skip to content

Commit

Permalink
Add comments mentioned in an issue #1919
Browse files Browse the repository at this point in the history
  • Loading branch information
bourbonkk committed Sep 16, 2023
1 parent 5e8b7ab commit 61f2c85
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion instrumentation/opentelemetry-instrumentation-asyncio/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,42 @@ OpenTelemetry asyncio Instrumentation
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-asyncio.svg
:target: https://pypi.org/project/opentelemetry-instrumentation-asyncio/

This library allows tracing requests made by the asyncio library.
AsyncioInstrumentor: Tracing Requests Made by the Asyncio Library

Primary Use Case:
-----------------
1. Performance and Error Monitoring:
The AsyncioInstrumentor tool offers significant advantages for developers and system administrators. It's designed to monitor real-time performance bottlenecks and catch exceptions within specific asynchronous tasks.

When It's Not Ideal to Use AsyncioInstrumentor:
------------------------------------------------
1. Frameworks with Built-in Instrumentation:
If you're utilizing a framework like aiohttp that already includes built-in instrumentation, you might not need this library. In such cases, leveraging the built-in tools of the framework is generally more beneficial than using external ones like AsyncioInstrumentor.

2. Libraries Lacking Instrumentation:
Should you employ a library that isn't inherently instrumented, AsyncioInstrumentor can step in to fill that gap.

3. Concerns about Overhead:
Tracing each task and future consistently can lead to added overhead. As a best practice, it's wise to enable tracing only when crucial, especially during the development stage.

Example
-------
.. code:: python
from opentelemetry.instrumentation.asyncio import AsyncioInstrumentor
AsyncioInstrumentor().instrument()
import asyncio
async def main():
await asyncio.sleep(0.1)
asyncio.run(main())
API
---



Installation
------------
Expand Down

0 comments on commit 61f2c85

Please sign in to comment.