Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/platforms/python/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,14 @@ A number between `0` and `1`, controlling the percentage chance a given session

</SdkOption>

<SdkOption name="stream_gen_ai_spans" type='bool' defaultValue='False' availableSince='2.60.0'>

When set to `True`, `gen_ai` spans are sent as standalone envelope items instead of being bundled in the transaction payload. This prevents AI spans with large inputs and outputs from being dropped due to transaction payload size limits.

Enable this option if you are using AI Agent Monitoring or the Conversations feature.

</SdkOption>

## Logs Options

<SdkOption name="enable_logs" type='bool' defaultValue='False'>
Expand Down
1 change: 1 addition & 0 deletions docs/platforms/python/integrations/anthropic/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
AnthropicIntegration(
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/google-genai/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sentry_sdk.init(
traces_sample_rate=1.0,
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
GoogleGenAIIntegration(),
Expand Down Expand Up @@ -91,6 +92,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
GoogleGenAIIntegration(
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/huggingface_hub/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ sentry_sdk.init(
dsn="___PUBLIC_DSN___",
environment="local",
traces_sample_rate=1.0,
stream_gen_ai_spans=True,
send_default_pii=True,
)
```
Expand Down Expand Up @@ -111,6 +112,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
HuggingfaceHubIntegration(
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/python/integrations/langchain/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ sentry_sdk.init(
dsn="___PUBLIC_DSN___",
environment="local",
traces_sample_rate=1.0,
stream_gen_ai_spans=True,
send_default_pii=True,
debug=True,
integrations=[
Expand All @@ -49,6 +50,7 @@ sentry_sdk.init(
dsn="___PUBLIC_DSN___",
environment="local",
traces_sample_rate=1.0,
stream_gen_ai_spans=True,
send_default_pii=True,
debug=True,
integrations=[
Expand Down Expand Up @@ -173,6 +175,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
LangchainIntegration(
Expand Down
1 change: 1 addition & 0 deletions docs/platforms/python/integrations/langgraph/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
LanggraphIntegration(
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/python/integrations/litellm/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sentry_sdk.init(
traces_sample_rate=1.0,
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
LiteLLMIntegration(),
Expand All @@ -55,6 +56,7 @@ import litellm
sentry_sdk.init(
dsn="___PUBLIC_DSN___",
traces_sample_rate=1.0,
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
LiteLLMIntegration(),
Expand Down Expand Up @@ -95,6 +97,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
LiteLLMIntegration(
Expand Down
4 changes: 4 additions & 0 deletions docs/platforms/python/integrations/mcp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ sentry_sdk.init(
traces_sample_rate=1.0,
# Add data like tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
MCPIntegration(),
Expand Down Expand Up @@ -76,6 +77,7 @@ sentry_sdk.init(
traces_sample_rate=1.0,
# Add data like tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
MCPIntegration(),
Expand Down Expand Up @@ -131,6 +133,7 @@ from mcp.types import Tool, TextContent, GetPromptResult, PromptMessage
sentry_sdk.init(
dsn="___PUBLIC_DSN___",
traces_sample_rate=1.0,
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
MCPIntegration(),
Expand Down Expand Up @@ -234,6 +237,7 @@ sentry_sdk.init(
# ...
# Add data like tool inputs and outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
MCPIntegration(
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/openai-agents/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ async def main() -> None:
traces_sample_rate=1.0,
# Add data like LLM and tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
)

Expand Down Expand Up @@ -106,6 +107,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
OpenAIAgentsIntegration(
Expand Down
1 change: 1 addition & 0 deletions docs/platforms/python/integrations/openai/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
OpenAIIntegration(
Expand Down
5 changes: 5 additions & 0 deletions docs/platforms/python/integrations/pydantic-ai/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ sentry_sdk.init(
traces_sample_rate=1.0,
# Add data like LLM and tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
PydanticAIIntegration(),
Expand All @@ -58,6 +59,7 @@ sentry_sdk.init(
traces_sample_rate=1.0,
# Add data like LLM and tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
PydanticAIIntegration(),
Expand Down Expand Up @@ -119,6 +121,7 @@ async def main() -> None:
traces_sample_rate=1.0,
# Add data like LLM and tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
PydanticAIIntegration(),
Expand Down Expand Up @@ -183,6 +186,7 @@ async def main() -> None:
traces_sample_rate=1.0,
# Add data like LLM and tool inputs/outputs;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
PydanticAIIntegration(),
Expand Down Expand Up @@ -224,6 +228,7 @@ sentry_sdk.init(
# ...
# Add data like inputs and responses;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
stream_gen_ai_spans=True,
send_default_pii=True,
integrations=[
PydanticAIIntegration(
Expand Down
Loading