You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.console.print(Text("Option 2: If you have otel_setup=False, manually configure OpenTelemetry:", style="gray"))
429
+
console.console.print()
430
+
431
+
syntax_manual=Syntax(
432
+
manual_setup_code,
433
+
"python",
434
+
theme="monokai",
435
+
line_numbers=True,
436
+
word_wrap=True,
437
+
background_color="default",
438
+
)
439
+
console.console.print(syntax_manual)
394
440
console.console.print()
395
441
396
442
console.console.print(
397
-
Text("💡 Copy the code above and add it to your application startup.", style="bold green")
443
+
Text("Tip: Copy the code above and add it to your application setup.", style="gray")
398
444
)
399
445
400
446
exceptException: # Fallback if rich formatting/printing fails
401
-
fallback_message= (
402
-
f"Gentrace: OpenTelemetry SDK (TracerProvider) does not appear to be configured. "
403
-
f"Gentrace tracing features (e.g., @interaction, @eval, @traced, and eval_dataset()) may not record data. "
404
-
f"Please ensure OpenTelemetry is set up as per the {otel_setup_url}."
405
-
)
447
+
fallback_message="""Gentrace: OpenTelemetry SDK does not appear to be configured. This means that Gentrace features like @interaction, @eval, @traced, and eval_dataset() will not record any data to the Gentrace UI.
448
+
449
+
You have two options:
450
+
451
+
⭐ Option 1: Use Gentrace's automatic OpenTelemetry setup (recommended):
452
+
453
+
import gentrace
454
+
455
+
gentrace.init(
456
+
api_key="your-api-key",
457
+
# otel_setup=True is the default, can be omitted
458
+
)
459
+
460
+
Option 2: If you have otel_setup=False, manually configure OpenTelemetry with the Gentrace endpoint.
461
+
462
+
See the documentation for the complete setup code.
0 commit comments