From f7abd958466c5f610915dde4f46264b0b76ffe2a Mon Sep 17 00:00:00 2001
From: Jyotirmay Chakraborty <93432859+UltimatePlutoC@users.noreply.github.com>
Date: Sun, 28 Sep 2025 18:11:52 +0000
Subject: [PATCH 1/3] docs(fastapi): add section on environment variables,
trace propagation, websockets, logging, and package links
---
.../README.rst | 32 ++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/README.rst b/instrumentation/opentelemetry-instrumentation-fastapi/README.rst
index ac4419f0ab..96e8db4449 100644
--- a/instrumentation/opentelemetry-instrumentation-fastapi/README.rst
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/README.rst
@@ -20,7 +20,37 @@ Installation
pip install opentelemetry-instrumentation-fastapi
References
-----------
* `OpenTelemetry Project `_
* `OpenTelemetry Python 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 `_ 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 `_.
+
+ **Related Packages**
+
+ - `opentelemetry-instrumentation `_
+ - `opentelemetry-instrumentation-fastapi `_
From 450fa7e3e73578bbb134544584a6004250292b3a Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 30 Sep 2025 08:55:24 +0000
Subject: [PATCH 2/3] Initial plan
From 469457e018d57b7b164d66c00ca56b83ff32d05c Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 30 Sep 2025 09:00:15 +0000
Subject: [PATCH 3/3] Fix CHANGELOG.md formatting for PR #3766 reference
Co-authored-by: UltimatePlutoC <93432859+UltimatePlutoC@users.noreply.github.com>
---
CHANGELOG.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8349f4b942..cf6bd9b94e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)