docs: add telemetry.dev observability integration - #6716
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/edge/en/observability/telemetry-dev.mdx`:
- Line 79: Replace the removed CrewAI integration link in the telemetry
documentation with a currently live telemetry.dev guide URL, preserving the
existing link text and Markdown format.
- Around line 24-37: Add
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false to the
environment-variable setup in Step 2 before configuring telemetry export. Do not
document enabling message capture in this setup; keep prompt and completion
capture disabled unless explicit capture and redaction requirements are
established.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c5832d18-d5fa-4576-a3e2-f2fefa19fc97
📒 Files selected for processing (2)
docs/docs.jsondocs/edge/en/observability/telemetry-dev.mdx
| ### Step 2: Set Up Environment Variables | ||
|
|
||
| Create a telemetry.dev project API key, then configure OpenTelemetry to export to the telemetry.dev OTLP/HTTP endpoint. Keep your model provider API key configured for CrewAI as usual. | ||
|
|
||
| ```shell | ||
| export TELEMETRY_DEV_API_KEY="td_live_..." | ||
| export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.telemetry.dev" | ||
| export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer%20$TELEMETRY_DEV_API_KEY" | ||
| export OTEL_SERVICE_NAME="your-crewai-service" | ||
| export OTEL_RESOURCE_ATTRIBUTES="deployment.environment.name=production" | ||
|
|
||
| # For example, if your crew uses OpenAI: | ||
| export OPENAI_API_KEY="sk-..." | ||
| ``` |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== repository files matching telemetry/openlit/observability =="
git ls-files | rg -n '(^docs/edge/en/observability/telemetry-dev\.mdx$|telemetry|openlit|observability)' | head -200
echo
echo "== target file lines =="
if [ -f docs/edge/en/observability/telemetry-dev.mdx ]; then
nl -ba docs/edge/en/observability/telemetry-dev.mdx | sed -n '1,220p'
fi
echo
echo "== search for genai capture env vars and content references =="
rg -n "OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT|message content|capture_message_content|openlit|telemetry.dev|OTEL_EXPORTER_OTLP_ENDPOINT|OPENAI_API_KEY" docs .github 2>/dev/null | head -200 || trueRepository: crewAIInc/crewAI
Length of output: 9660
🌐 Web query:
OpenLIT generic LangChain message content capture enabled by default OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT
💡 Result:
In OpenLIT, the capture of LangChain and other GenAI message content is enabled by default [1][2][3]. The environment variable OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT, which maps to the OpenLIT configuration parameter capture_message_content, defaults to True [1][2][3]. When this setting is enabled, OpenLIT automatically includes prompts and completion content within Trace span attributes [4][3][5]. For privacy or storage optimization, you can disable this behavior by setting the environment variable to false or by configuring it programmatically via openlit.init(capture_message_content=False) [4][6][7]. It is important to note that while this variable controls the inclusion of actual prompt and completion text, OpenLIT will still continue to collect performance metrics, token counts, and span structure even when message content capture is disabled [8]. Note: While the general OpenTelemetry GenAI instrumentation utility (often used by other projects) defaults to NO_CONTENT [9][10], OpenLIT specifically maintains a default value of True for this parameter in its SDK [1][2][3].
Citations:
- 1: https://docs.openlit.io/latest/sdk/configuration
- 2: https://openlit.mintlify.app/latest/sdk/configuration
- 3: https://openlit-openlit.mintlify.app/sdk/configuration
- 4: https://docs.openlit.io/latest/sdk/features/tracing
- 5: https://openlit.mintlify.app/latest/sdk/features/tracing
- 6: https://openlit-openlit.mintlify.app/sdk/features/tracing
- 7: https://grafana.com/docs/grafana-cloud/monitor-applications/ai-observability/genai/observability/configuration/
- 8: https://oneuptime.com/blog/post/2026-02-06-openlit-opentelemetry-native-genai-observability/view
- 9: https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation-genai/util.html
- 10: https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/util/opentelemetry-util-genai/README.rst
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== target file =="
if [ -f docs/edge/en/observability/telemetry-dev.mdx ]; then
nl -ba docs/edge/en/observability/telemetry-dev.mdx | sed -n '1,180p'
else
echo "target file missing"
fi
echo
echo "== OpenLIT docs capture config mentions in repo =="
if [ -f docs/edge/en/observability/openlit.mdx ]; then
nl -ba docs/edge/en/observability/openlit.mdx | sed -n '1,220p'
else
echo "openlit docs file missing"
fi
echo
echo "== all env var references in observability/edge =="
rg -n "OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT|capture_message_content|OTEL_EXPORTER_OTLP_ENDPOINT|OTEL_EXPORTER_OTLP_HEADERS|otel\.init|openlit\.init|capture_message_content" docs/edge/en docs/edge/ar docs/edge/ko docs/edge/pt-BR --glob '*.mdx' 2>/dev/null || trueRepository: crewAIInc/crewAI
Length of output: 212
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== available text tools =="
command -v cat || true
command -v sed || true
command -v rg || true
echo
echo "== target file first 180 lines =="
if [ -f docs/edge/en/observability/telemetry-dev.mdx ]; then
count=$(wc -l < docs/edge/en/observability/telemetry-dev.mdx)
echo "lines=$count"
cat -n docs/edge/en/observability/telemetry-dev.mdx | sed -n '1,180p'
else
echo "target file missing"
fi
echo
echo "== OpenLIT docs capture config mentions in repo =="
if [ -f docs/edge/en/observability/openlit.mdx ]; then
cat -n docs/edge/en/observability/openlit.mdx | sed -n '1,220p'
else
echo "openlit docs file missing"
fi
echo
echo "== all env var references in observability/edge =="
rg -n "OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT|capture_message_content|OTEL_EXPORTER_OTLP_ENDPOINT|OTEL_EXPORTER_OTLP_HEADERS|otel\.init|openlit\.init|capture_message_content|message content|prompt|output" docs/edge/en docs/edge/ar docs/edge/ko docs/edge/pt-BR --glob '*.mdx' 2>/dev/null || trueRepository: crewAIInc/crewAI
Length of output: 50375
Disable GenAI message content capture before exporting traces.
This setup sends telemetry to https://ingest.telemetry.dev, but OpenLIT captures prompts and completions by default. Add OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false, and only document enabling it after explicit capture/redaction requirements are met.
Proposed fix
export OTEL_SERVICE_NAME="your-crewai-service"
export OTEL_RESOURCE_ATTRIBUTES="deployment.environment.name=production"
+export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### Step 2: Set Up Environment Variables | |
| Create a telemetry.dev project API key, then configure OpenTelemetry to export to the telemetry.dev OTLP/HTTP endpoint. Keep your model provider API key configured for CrewAI as usual. | |
| ```shell | |
| export TELEMETRY_DEV_API_KEY="td_live_..." | |
| export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.telemetry.dev" | |
| export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer%20$TELEMETRY_DEV_API_KEY" | |
| export OTEL_SERVICE_NAME="your-crewai-service" | |
| export OTEL_RESOURCE_ATTRIBUTES="deployment.environment.name=production" | |
| # For example, if your crew uses OpenAI: | |
| export OPENAI_API_KEY="sk-..." | |
| ``` | |
| ### Step 2: Set Up Environment Variables | |
| Create a telemetry.dev project API key, then configure OpenTelemetry to export to the telemetry.dev OTLP/HTTP endpoint. Keep your model provider API key configured for CrewAI as usual. | |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/edge/en/observability/telemetry-dev.mdx` around lines 24 - 37, Add
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false to the
environment-variable setup in Step 2 before configuring telemetry export. Do not
document enabling message capture in this setup; keep prompt and completion
capture disabled unless explicit capture and redaction requirements are
established.
|
|
||
| ## References | ||
|
|
||
| - [telemetry.dev CrewAI integration guide](https://telemetry.dev/integrations/crewai) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Replace the broken CrewAI reference.
This URL currently returns HTTP 404. Update it to a live telemetry.dev guide before publishing. ()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/edge/en/observability/telemetry-dev.mdx` at line 79, Replace the removed
CrewAI integration link in the telemetry documentation with a currently live
telemetry.dev guide URL, preserving the existing link text and Markdown format.
This adds a telemetry.dev observability guide using OpenLIT's existing CrewAI instrumentation, exporting traces over standard OTLP/HTTP, plus an entry in the Edge observability navigation. Only the Edge docs tree is touched; the page follows the structure of the existing observability guides.
Disclosure: I built telemetry.dev.