MCPcopy
hub / github.com/crewAIInc/crewAI / traces_status

Function traces_status

lib/cli/src/crewai_cli/cli.py:1058–1098  ·  view source on GitHub ↗

Show current trace collection status.

()

Source from the content-addressed store, hash-verified

1056
1057@traces.command("status")
1058def traces_status() -> None:
1059 """Show current trace collection status."""
1060
1061 from rich.console import Console
1062 from rich.panel import Panel
1063 from rich.table import Table
1064
1065 console = Console()
1066 user_data = _load_user_data()
1067
1068 table = Table(show_header=False, box=None)
1069 table.add_column("Setting", style="cyan")
1070 table.add_column("Value", style="white")
1071
1072 env_enabled = os.getenv("CREWAI_TRACING_ENABLED", "false")
1073 table.add_row("CREWAI_TRACING_ENABLED", env_enabled)
1074
1075 trace_consent = user_data.get("trace_consent")
1076 if trace_consent is True:
1077 consent_status = "✅ Enabled (user consented)"
1078 elif trace_consent is False:
1079 consent_status = "❌ Disabled (user declined)"
1080 else:
1081 consent_status = "⚪ Not set (first-time user)"
1082 table.add_row("User Consent", consent_status)
1083
1084 if is_tracing_enabled():
1085 overall_status = "✅ ENABLED"
1086 border_style = "green"
1087 else:
1088 overall_status = "❌ DISABLED"
1089 border_style = "red"
1090 table.add_row("Overall Status", overall_status)
1091
1092 panel = Panel(
1093 table,
1094 title="Trace Collection Status",
1095 border_style=border_style,
1096 padding=(1, 2),
1097 )
1098 console.print(panel)
1099
1100
1101@crewai.group(invoke_without_command=True)

Callers

nothing calls this directly

Calls 4

_load_user_dataFunction · 0.90
is_tracing_enabledFunction · 0.90
getMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…