# opentelemetry-instrumentation-fastapi

> OpenTelemetry FastAPI Instrumentation

- **URL**: https://www.freshcrate.ai/projects/opentelemetry-instrumentation-fastapi
- **Author**: pypi
- **Category**: Frameworks
- **Latest version**: `v0.63b1` (2026-05-21)
- **License**: Unknown
- **Source**: https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-fastapi
- **Homepage**: https://pypi.org/project/opentelemetry-instrumentation-fastapi/
- **Language**: Python
- **GitHub**: 1,031 stars, 932 forks
- **Registry**: pypi (`opentelemetry-instrumentation-fastapi`)
- **Tags**: `pypi`

## Description

OpenTelemetry FastAPI Instrumentation
=======================================

|pypi|

.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-fastapi.svg
   :target: https://pypi.org/project/opentelemetry-instrumentation-fastapi/


This library provides automatic and manual instrumentation of FastAPI web frameworks,
instrumenting http requests served by applications utilizing the framework.

auto-instrumentation using the opentelemetry-instrumentation package is also supported.

Installation
------------

::

    pip install opentelemetry-instrumentation-fastapi

References
----------

* `OpenTelemetry Project <https://opentelemetry.io/>`_
* `OpenTelemetry Python Examples <https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples>`_

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v0.63b1` | 2026-05-21 | High | This is a patch release on the previous 1.42.0/0.63b0 release, fixing the issue(s) below. |
| `opentelemetry-instrumentation-google-genai==0.7b1` | 2026-05-19 | High | This is a patch release on the previous 0.7b0 release, fixing the issue(s) below. |
| `opentelemetry-instrumentation-openai-v2==2.4b0` | 2026-05-01 | High | - Migrate experimental path from deprecated `LLMInvocation` to `InferenceInvocation`, using `handler.start_inference()` and `invocation.stop()`/`invocation.fail()` directly ([#4502](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4502)) - Use `create_duration_histogram` and `create_token_histogram` from `opentelemetry-util-genai` instead of defining bucket boundaries locally ([#4501](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4501)) - Import `OTEL_I |
| `v0.62b1` | 2026-04-24 | High | This is a patch release on the previous 1.41.0/0.62b0 release, fixing the issue(s) below.   ### Fixed  - `opentelemetry-instrumentation-pika` Use `ObjectProxy` instead of `BaseObjectProxy` for `ReadyMessagesDequeProxy` to restore iterability with wrapt 2.x ([#4461](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4461)) - `opentelemetry-instrumentation-dbapi` Use `ObjectProxy` instead of `BaseObjectProxy` for `TracedCursorProxy` to restore iterability with wrapt 2.x ([#4427](h |
| `0.62b0` | 2026-04-21 | Low | Imported from PyPI (0.62b0) |
| `v0.62b0` | 2026-04-09 | Medium | ### Added  - `opentelemetry-instrumentation-asgi`: Respect `suppress_http_instrumentation` context in ASGI middleware to skip server span creation when HTTP instrumentation is suppressed ([#4375](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4375)) - `opentelemetry-instrumentation-confluent-kafka`: Loosen confluent-kafka upper bound to <3.0.0 ([#4289](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4289)) - `opentelemetry-instrumentation`: Add support |
| `v0.62b0` | 2026-04-09 | Medium | ### Added  - `opentelemetry-instrumentation-asgi`: Respect `suppress_http_instrumentation` context in ASGI middleware to skip server span creation when HTTP instrumentation is suppressed ([#4375](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4375)) - `opentelemetry-instrumentation-confluent-kafka`: Loosen confluent-kafka upper bound to <3.0.0 ([#4289](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4289)) - `opentelemetry-instrumentation`: Add support |
| `opentelemetry-opamp-client==0.2b0` | 2026-04-01 | Medium | - Breaking change: callback class `Callbacks` renamed to `OpAMPCallbacks` ([#4355](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4355)) |
| `opentelemetry-opamp-client==0.1b0` | 2026-03-23 | Medium | - Initial implementation ([#3635](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3635)) - Update client to have additional callback methods ([#4322](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4322)) |
| `v0.61b0` | 2026-03-04 | Low | ### Added  - Add Python 3.14 support ([#4193](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4193)) - `opentelemetry-instrumentation-asgi`: Add exemplars for `http.server.request.duration` and `http.server.duration` metrics ([#3739](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3739)) - `opentelemetry-instrumentation-wsgi`: Add exemplars for `http.server.request.duration` and `http.server.duration` metrics ([#3739](https://github.com/open-telemetry/ope |

## Citation

- HTML: https://www.freshcrate.ai/projects/opentelemetry-instrumentation-fastapi
- Markdown: https://www.freshcrate.ai/projects/opentelemetry-instrumentation-fastapi.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/opentelemetry-instrumentation-fastapi/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
