mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 04:34:01 +08:00
Fix openaiv2 example readme (#3276)
* Fix openaiv2 example readme * update manual as well --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
This commit is contained in:
@ -11,16 +11,14 @@ your OpenAI requests.
|
|||||||
|
|
||||||
Note: `.env <.env>`_ file configures additional environment variables:
|
Note: `.env <.env>`_ file configures additional environment variables:
|
||||||
|
|
||||||
- `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true` configures
|
- ``OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`` configures OpenAI instrumentation to capture prompt and completion contents on events.
|
||||||
OpenAI instrumentation to capture prompt and completion contents on
|
|
||||||
events.
|
|
||||||
|
|
||||||
Setup
|
Setup
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Minimally, update the `.env <.env>`_ file with your "OPENAI_API_KEY". An
|
Minimally, update the `.env <.env>`_ file with your ``OPENAI_API_KEY``. An
|
||||||
OTLP compatible endpoint should be listening for traces and logs on
|
OTLP compatible endpoint should be listening for traces and logs on
|
||||||
http://localhost:4317. If not, update "OTEL_EXPORTER_OTLP_ENDPOINT" as well.
|
http://localhost:4317. If not, update ``OTEL_EXPORTER_OTLP_ENDPOINT`` as well.
|
||||||
|
|
||||||
Next, set up a virtual environment like this:
|
Next, set up a virtual environment like this:
|
||||||
|
|
||||||
|
@ -12,19 +12,16 @@ your OpenAI requests.
|
|||||||
|
|
||||||
Note: `.env <.env>`_ file configures additional environment variables:
|
Note: `.env <.env>`_ file configures additional environment variables:
|
||||||
|
|
||||||
- `OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true` configures
|
- ``OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true`` configures OpenTelemetry SDK to export logs and events.
|
||||||
OpenTelemetry SDK to export logs and events.
|
- ``OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`` configures OpenAI instrumentation to capture prompt and completion contents on events.
|
||||||
- `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true` configures
|
- ``OTEL_LOGS_EXPORTER=otlp`` to specify exporter type.
|
||||||
OpenAI instrumentation to capture prompt and completion contents on
|
|
||||||
events.
|
|
||||||
- `OTEL_LOGS_EXPORTER=otlp` to specify exporter type.
|
|
||||||
|
|
||||||
Setup
|
Setup
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Minimally, update the `.env <.env>`_ file with your "OPENAI_API_KEY". An
|
Minimally, update the `.env <.env>`_ file with your ``OPENAI_API_KEY``. An
|
||||||
OTLP compatible endpoint should be listening for traces and logs on
|
OTLP compatible endpoint should be listening for traces and logs on
|
||||||
http://localhost:4317. If not, update "OTEL_EXPORTER_OTLP_ENDPOINT" as well.
|
http://localhost:4317. If not, update ``OTEL_EXPORTER_OTLP_ENDPOINT`` as well.
|
||||||
|
|
||||||
Next, set up a virtual environment like this:
|
Next, set up a virtual environment like this:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user