From 26126a119bce6fd70431a16ae742c08505f0c78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Em=C3=ADdio=20Neto?= <9735060+emdneto@users.noreply.github.com> Date: Wed, 19 Feb 2025 20:50:08 -0300 Subject: [PATCH 1/2] Fix openaiv2 example readme --- .../examples/zero-code/README.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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 441c6a612e..4332c0b7c0 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: From b6766ce83a918949a4fcd765e494d6972a74e9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Em=C3=ADdio=20Neto?= <9735060+emdneto@users.noreply.github.com> Date: Wed, 19 Feb 2025 20:53:48 -0300 Subject: [PATCH 2/2] update manual as well --- .../examples/manual/README.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 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 73e4d1bb0c..61e4c4ae8e 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: