File tree Expand file tree Collapse file tree
embeddings/python/litellm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ Options:
4343 --sentry-javascript <path> Use local Sentry JavaScript SDK (link)
4444 --sentry-php <path> Use local Sentry PHP SDK (core sentry/sentry-php)
4545 --sentry-laravel <path> Use local Sentry Laravel SDK (composer path repository)
46- --stream-gen-ai-spans Enable streamGenAiSpans in JS Sentry.init() (default: on)
47- --not-stream-gen-ai-spans Disable streamGenAiSpans in JS Sentry.init()
46+ --stream-gen-ai-spans Enable streamGenAiSpans / stream_gen_ai_spans in Sentry.init() (default: on)
47+ --not-stream-gen-ai-spans Disable streamGenAiSpans / stream_gen_ai_spans in Sentry.init()
4848 --help, -h Show this help message
4949
5050Examples:
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ export class Runner {
271271 ...( testDefinition . agent && { agent : testDefinition . agent } ) ,
272272 ...( testDefinition . mcpServer && { mcpServer : testDefinition . mcpServer } ) ,
273273 inputs : processedInputs ,
274- streamGenAiSpans : context . streamGenAiSpans !== false , // JS Sentry.init() flag, default true
274+ streamGenAiSpans : context . streamGenAiSpans !== false , // Sentry.init() flag (JS + Python) , default true
275275 } ;
276276
277277 // PHP/Laravel: add computed class names and command signature for templates
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ sentry_sdk.init(
2323 dsn = os .environ .get ("SENTRY_DSN" ),
2424 traces_sample_rate = 1.0 ,
2525 send_default_pii = True ,
26+ stream_gen_ai_spans = {{ "True" if streamGenAiSpans else "False" }},
2627)
2728{% endblock % }
2829
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ sentry_sdk.init(
1212 dsn=os.environ.get("SENTRY_DSN"),
1313 traces_sample_rate=1.0,
1414 send_default_pii=True,
15+ stream_gen_ai_spans={{ " True" if streamGenAiSpans else " False" }} ,
1516 integrations=[LiteLLMIntegration(include_prompts=True)],
1617 disabled_integrations=[OpenAIIntegration()],
1718)
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ sentry_sdk.init(
8686 dsn=os.environ.get("SENTRY_DSN"),
8787 traces_sample_rate=1.0,
8888 send_default_pii=True,
89+ stream_gen_ai_spans={{ " True" if streamGenAiSpans else " False" }} ,
8990 integrations=[LiteLLMIntegration(include_prompts=True)],
9091 disabled_integrations=[OpenAIIntegration()],
9192)
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ sentry_sdk.init(
4848 dsn=os.environ.get("SENTRY_DSN"),
4949 traces_sample_rate=1.0,
5050 send_default_pii=True,
51+ stream_gen_ai_spans={{ " True" if streamGenAiSpans else " False" }} ,
5152 integrations=[MCPIntegration()],
5253)
5354{% endblock %}
Original file line number Diff line number Diff line change @@ -152,8 +152,9 @@ export class SpanCollector {
152152
153153 // v2 span envelope: application/vnd.sentry.items.span.v2+json
154154 // Body shape: { version: 2, items: [<v2span>, ...] }
155- // Used by Sentry JS SDK 10.53.0+ when streamGenAiSpans is enabled —
156- // gen_ai spans are stripped from the transaction and shipped here.
155+ // Used by Sentry JS SDK 10.53.0+ and Python SDK 2.60.0+ when
156+ // streamGenAiSpans / stream_gen_ai_spans is enabled — gen_ai spans
157+ // are stripped from the transaction and shipped here.
157158 // Spec: https://develop.sentry.dev/sdk/telemetry/spans/span-protocol
158159 if (
159160 itemHeader . type === 'span' &&
Original file line number Diff line number Diff line change @@ -311,6 +311,6 @@ export interface RunnerContext {
311311 timeoutMs : number ;
312312 // Controls whether to print verbose console output (default: true)
313313 verbose ?: boolean ;
314- // JS only: value to pass for `streamGenAiSpans` in Sentry.init() (default: true)
314+ // Value to pass for `streamGenAiSpans` (JS) / `stream_gen_ai_spans` (Python) in Sentry.init() (default: true)
315315 streamGenAiSpans ?: boolean ;
316316}
You can’t perform that action at this time.
0 commit comments