From 17a57bf6d35e96ca539a987c3790be5cf46491a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Em=C3=ADdio=20Neto?= <9735060+emdneto@users.noreply.github.com> Date: Fri, 21 Feb 2025 05:46:28 -0300 Subject: [PATCH] Fix openaiv2 example readme (#3276) * Fix openaiv2 example readme * update manual as well --------- Co-authored-by: Riccardo Magliocchetti --- .../examples/manual/README.rst | 8 +++----- .../examples/zero-code/README.rst | 13 +++++-------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/manual/README.rst b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/manual/README.rst index 73e4d1bb0..61e4c4ae8 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/manual/README.rst +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/manual/README.rst @@ -11,16 +11,14 @@ your OpenAI requests. Note: `.env <.env>`_ file configures additional environment variables: -- `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 OpenAI instrumentation to capture prompt and completion contents on events. 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 -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: diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/zero-code/README.rst b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/zero-code/README.rst index 441c6a612..4332c0b7c 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/zero-code/README.rst +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/zero-code/README.rst @@ -12,19 +12,16 @@ your OpenAI requests. Note: `.env <.env>`_ file configures additional environment variables: -- `OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true` configures -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_LOGS_EXPORTER=otlp` to specify exporter type. +- ``OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true`` configures 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_LOGS_EXPORTER=otlp`` to specify exporter type. 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 -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: