Skip to content

Commit 5fd648e

Browse files
authored
Remove unnecessary configuration of logs exporter in Gen AI samples (#3141)
It is no longer necessary since we now set up the logging pipeline by default with OTLP exporter.
1 parent b03bf00 commit 5fd648e

File tree

2 files changed

+10
-8
lines changed
  • instrumentation-genai
    • opentelemetry-instrumentation-openai-v2/examples/zero-code
    • opentelemetry-instrumentation-vertexai/examples/zero-code

2 files changed

+10
-8
lines changed

instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/zero-code/.env

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ OPENAI_API_KEY=sk-YOUR_API_KEY
1212

1313
OTEL_SERVICE_NAME=opentelemetry-python-openai
1414

15-
# Change to 'false' to disable logging
15+
# Change to 'false' to disable collection of python logging logs
1616
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
17-
# Change to 'console' if your OTLP endpoint doesn't support logs
18-
# TODO: this should not be necessary once https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3042 is released
19-
OTEL_LOGS_EXPORTER=otlp
17+
18+
# Uncomment if your OTLP endpoint doesn't support logs
19+
# OTEL_LOGS_EXPORTER=console
20+
2021
# Change to 'false' to hide prompt and completion content
2122
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true

instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/zero-code/.env

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
OTEL_SERVICE_NAME=opentelemetry-python-vertexai
66

7-
# Change to 'false' to disable logging
7+
# Change to 'false' to disable collection of python logging logs
88
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
9-
# Change to 'console' if your OTLP endpoint doesn't support logs
10-
# TODO: this should not be necessary once https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3042 is released
11-
OTEL_LOGS_EXPORTER=otlp
9+
10+
# Uncomment if your OTLP endpoint doesn't support logs
11+
# OTEL_LOGS_EXPORTER=console
12+
1213
# Change to 'false' to hide prompt and completion content
1314
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true

0 commit comments

Comments
 (0)