Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `rstcheck` to pre-commit to stop introducing invalid RST
([#3777](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3777))

- `opentelemetry-exporter-credential-provider-gcp`: create this package which provides support for supplying your machine's Application Default Credentials (https://cloud.google.com/docs/authentication/application-default-credentials) to the OTLP Exporters created automatically by OpenTelemetry Python's auto instrumentation. These credentials authorize OTLP traces to be sent to `telemetry.googleapis.com`.
[#3766](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3766).
- `opentelemetry-exporter-credential-provider-gcp`: create this package which provides support for supplying your machine's Application Default Credentials (https://cloud.google.com/docs/authentication/application-default-credentials) to the OTLP Exporters created automatically by OpenTelemetry Python's auto instrumentation. These credentials authorize OTLP traces to be sent to `telemetry.googleapis.com`
([#3766](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3766)).

## Version 1.37.0/0.58b0 (2025-09-11)

Expand Down
32 changes: 31 additions & 1 deletion instrumentation/opentelemetry-instrumentation-fastapi/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,37 @@ 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>`_

Configuration & Usage Notes
--------------------------

**Environment Variables**

OpenTelemetry Python supports standard environment variables for configuration, including:

- ``OTEL_EXPORTER_OTLP_ENDPOINT``
- ``OTEL_EXPORTER_OTLP_PROTOCOL``
- ``OTEL_SERVICE_NAME``
- ``OTEL_TRACES_EXPORTER``, ``OTEL_METRICS_EXPORTER``

These can be set to configure exporters, service name, and other options. See the `OpenTelemetry Python documentation <https://opentelemetry-python.readthedocs.io/en/latest/getting-started.html#environment-variables>`_ for a full list.

**Trace Propagation**

Trace context propagation works automatically for HTTP requests. The instrumentation uses W3C Trace Context and Baggage headers for distributed tracing. No manual intervention is required for standard HTTP requests.

**WebSocket Support**

Automatic trace propagation for WebSocket connections is limited. You may need to manually create and propagate spans for WebSocket handlers in FastAPI applications.

**Logging Integration**

To integrate logs as events in traces, use the ``opentelemetry-instrumentation-logging`` package and configure your logger with OpenTelemetry's logging handler. This allows logs to be attached to traces as events. See the `OpenTelemetry Python logging documentation <https://opentelemetry-python.readthedocs.io/en/latest/instrumentation/logging/logging.html>`_.

**Related Packages**

- `opentelemetry-instrumentation <https://pypi.org/project/opentelemetry-instrumentation/>`_
- `opentelemetry-instrumentation-fastapi <https://pypi.org/project/opentelemetry-instrumentation-fastapi/>`_