Docs
Integrations
CrewAI
Troubleshooting

Troubleshooting

Native OTel

Spans appear but Input / Output panels are empty

Missing OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=span_and_event. CrewAI's exporter ships only the span structure by default; the env var unlocks message content. Set it under Environment Variables in CrewAI Enterprise and re-run the crew.

Tokens look right but cost is zero on every LLM call

The model name in gen_ai.request.model isn't in our pricing table. Open a ticket with the exact model string and we'll add it. Cost recomputes automatically on the next ingest.

User column is empty in the Tracing list

CrewAI's OTel exporter doesn't emit user identity. Attach it from the app that calls crew.kickoff() — see the end-user identity options. Baggage (Option 1) is the cheapest path.

OTEL_SEMCONV_STABILITY_OPT_IN is missing — what changes?

Without it, CrewAI emits the older gen_ai.usage.prompt_tokens / completion_tokens keys instead of the canonical input_tokens / output_tokens and skips gen_ai.input.messages / gen_ai.output.messages arrays. Traces still render, but cache-read tokens and full message bodies are lost. Set it.

"Test Connection" fails on the OTel Collector form
  • Confirm the endpoint is exactly https://api.agenticants.ai/api/public/otel/v1/traces (no trailing slash, /v1/traces is required).
  • The Authorization header value must start with Basic and contain base64(public_key:secret_key). Re-generate it from the setup snippet.
  • Make sure the key pair belongs to the project you intend traces to land in. The first failure log entry in the project's Audit page tells you which pk-ap-… was used.

SDK + EventListener

Traces not appearing in ANTS Platform
  1. Verify ANTS_PLATFORM_SECRET_KEY and ANTS_PLATFORM_PUBLIC_KEY are set in your environment.
  2. Verify ANTS_PLATFORM_HOST=https://api.agenticants.ai.
  3. Make sure ants_platform.flush() runs after the crew finishes (use try / finally).
  4. Bump timeout for slower local setups: AntsPlatform(timeout=30).
401 "Invalid credentials" errors in CrewAI deployment logs

EventListener resolved to a disabled client. CrewAI's enterprise telemetry creates its own internal Langfuse client; when multiple instances exist without an explicit public_key, the SDK disables tracing for safety.

Fix: pass public_key explicitly and initialise at module level in crew.py:

ants_platform = AntsPlatform(timeout=30)
listener = EventListener(public_key=ants_platform._public_key, agent_name="my_crew")
Traces work locally but not when deployed to CrewAI

CrewAI's deployment runner does not execute main.py. It imports your @CrewBase class directly. Move initialisation to crew.py at module level. See Deploying to CrewAI's cloud platform.

ModuleNotFoundError: Please install crewai

Install with the CrewAI extras: pip install ants-platform[crewai].

Slow startup or timeout errors

The SDK resolves the project ID via HTTP on first use. Bump the timeout:

ants_platform = AntsPlatform(timeout=30)