crewai - ✅(Solved) Fix [BUG] CrewAI is sending telemetry to crewai servers even with tracing disabled [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
crewAIInc/crewAI#4525Fetched 2026-04-08 00:41:33
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
commented ×2closed ×1cross-referenced ×1labeled ×1

I'm using the following Python package version with tracing disabled:

crewai>=0.193.0
crewai-tools>=0.73.0

The tool prints

──────────────────────────────────────── Tracing Status ────────────────────────────────────────╮
│                                                                                                │
│  Info: Tracing is disabled.                                                                    │
│                                                                                                │
│  To enable tracing, do any one of these:                                                       │
│  • Set tracing=True in your Crew/Flow code                                                     │
│  • Set CREWAI_TRACING_ENABLED=true in your project's .env file                                 │
│  • Run: crewai traces enable                                                                   │
│                                                                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────╯

When running anything I get many calls like these:

POST /v1/traces HTTP/1.1
Host: telemetry.crewai.com:4319
User-Agent: OTel-OTLP-Exporter-Python/1.39.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/x-protobuf
Content-Length: 1116

This happens even if you set OTEL_SDK_DISABLED=true.

Root Cause

I'm using the following Python package version with tracing disabled:

crewai>=0.193.0
crewai-tools>=0.73.0

The tool prints

──────────────────────────────────────── Tracing Status ────────────────────────────────────────╮
│                                                                                                │
│  Info: Tracing is disabled.                                                                    │
│                                                                                                │
│  To enable tracing, do any one of these:                                                       │
│  • Set tracing=True in your Crew/Flow code                                                     │
│  • Set CREWAI_TRACING_ENABLED=true in your project's .env file                                 │
│  • Run: crewai traces enable                                                                   │
│                                                                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────╯

When running anything I get many calls like these:

POST /v1/traces HTTP/1.1
Host: telemetry.crewai.com:4319
User-Agent: OTel-OTLP-Exporter-Python/1.39.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/x-protobuf
Content-Length: 1116

This happens even if you set OTEL_SDK_DISABLED=true.

Fix Action

Fixed

PR fix notes

PR #4527: fix: respect CREWAI_TRACING_ENABLED and user consent in telemetry

Description (problem / solution / changelog)

fix: respect CREWAI_TRACING_ENABLED and user consent in telemetry

Summary

Fixes #4525 — OTEL telemetry spans were still being sent to telemetry.crewai.com:4319 even when users disabled tracing via CREWAI_TRACING_ENABLED=false or declined tracing through the first-time prompt.

The root cause: Telemetry._is_telemetry_disabled() only checked OTEL_SDK_DISABLED, CREWAI_DISABLE_TELEMETRY, and CREWAI_DISABLE_TRACKING. It did not check CREWAI_TRACING_ENABLED or the user's stored consent preference.

Changes:

  • _is_telemetry_disabled() now additionally returns True when:
    • CREWAI_TRACING_ENABLED is explicitly "false" or "0"
    • has_user_declined_tracing() returns True
  • Existing test fixtures updated to properly save/restore CREWAI_TRACING_ENABLED to prevent env var leakage between tests

Review & Testing Checklist for Human

  • Performance of has_user_declined_tracing() on hot path — This function is now called inside _is_telemetry_disabled(), which runs on every _safe_telemetry_operation call. If it does file I/O each time (loading user_data.json), this could degrade performance. Verify it uses caching or is otherwise cheap.
  • Crew(tracing=False) does NOT disable OTEL telemetry in this PR — Only env var and user-consent paths are handled. The _tracing_enabled context variable (set by Crew(tracing=False)) is intentionally not checked in _should_execute_telemetry because doing so breaks _execution_span assignment needed by share_crew=True. Decide if this gap is acceptable or needs separate handling.
  • Test plan: Set CREWAI_TRACING_ENABLED=false and run a crew — verify no network calls to telemetry.crewai.com:4319 (e.g. via tcpdump or proxy). Repeat with the user consent file set to declined.

Notes

Changed files

  • lib/crewai/src/crewai/telemetry/telemetry.py (modified, +22/-3)
  • lib/crewai/tests/telemetry/test_execution_span_assignment.py (modified, +7/-0)
  • lib/crewai/tests/telemetry/test_flow_crew_span_integration.py (modified, +8/-1)
  • lib/crewai/tests/telemetry/test_telemetry.py (modified, +10/-1)
  • lib/crewai/tests/telemetry/test_telemetry_disable.py (modified, +130/-2)

Code Example

crewai>=0.193.0
crewai-tools>=0.73.0

---

──────────────────────────────────────── Tracing Status ────────────────────────────────────────╮
│                                                                                                │
Info: Tracing is disabled.                                                                    
│                                                                                                │
To enable tracing, do any one of these:│  • Set tracing=True in your Crew/Flow code                                                     │
│  • Set CREWAI_TRACING_ENABLED=true in your project's .env file                                 │
│  • Run: crewai traces enable                                                                   │
│                                                                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────╯

---

POST /v1/traces HTTP/1.1
Host: telemetry.crewai.com:4319
User-Agent: OTel-OTLP-Exporter-Python/1.39.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/x-protobuf
Content-Length: 1116
RAW_BUFFERClick to expand / collapse

Description

I'm using the following Python package version with tracing disabled:

crewai>=0.193.0
crewai-tools>=0.73.0

The tool prints

──────────────────────────────────────── Tracing Status ────────────────────────────────────────╮
│                                                                                                │
│  Info: Tracing is disabled.                                                                    │
│                                                                                                │
│  To enable tracing, do any one of these:                                                       │
│  • Set tracing=True in your Crew/Flow code                                                     │
│  • Set CREWAI_TRACING_ENABLED=true in your project's .env file                                 │
│  • Run: crewai traces enable                                                                   │
│                                                                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────╯

When running anything I get many calls like these:

POST /v1/traces HTTP/1.1
Host: telemetry.crewai.com:4319
User-Agent: OTel-OTLP-Exporter-Python/1.39.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/x-protobuf
Content-Length: 1116

This happens even if you set OTEL_SDK_DISABLED=true.

Steps to Reproduce

Here's a simple example: https://github.com/ishanjainn/ai-lowlands-2025

I've modified that example to remove openlit to avoid confusion.

Expected behavior

The package shouldn't be sending telemetry to crewai servers about what I'm doing with it by default without warning.

Screenshots/Code snippets

https://github.com/ishanjainn/ai-lowlands-2025

Operating System

Ubuntu 20.04

Python Version

3.10

crewAI Version

0.193.0

crewAI Tools Version

0.73.0

Virtual Environment

Venv

Evidence

I used OpenTelemetry eBPF Instrumentation and logged the requests, since it can decode SSL traffic the data printed is below:

POST /v1/traces HTTP/1.1 Host: telemetry.crewai.com:4319 User-Agent: OTel-OTLP-Exporter-Python/1.39.1 Accept-Encoding: gzip, deflate Accept: / Connection: keep-alive Content-Type: application/x-protobuf Content-Length: 1116

Possible Solution

Make exporting telemetry to your own servers optional or advertise it to end users.

Additional context

N/A

extent analysis

Fix Plan

To prevent the package from sending telemetry to crewai servers by default, you can try the following steps:

  • Set the OTEL_SDK_DISABLED environment variable to true before running your Python application:

export OTEL_SDK_DISABLED=true

* Alternatively, you can set `tracing=False` in your Crew/Flow code:
  ```python
import crewai

# Set tracing to False
crewai.tracing = False
  • If you are using a .env file, add the following line to disable tracing:

CREWAI_TRACING_ENABLED=false

* To completely disable the OpenTelemetry exporter, you can also try setting the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to an empty string:
  ```bash
export OTEL_EXPORTER_OTLP_ENDPOINT=""
  • In your Python code, you can also disable the OpenTelemetry exporter by setting the OTEL_EXPORTER_OTLP_ENDPOINT environment variable before importing the crewai package:

import os os.environ['OTEL_EXPORTER_OTLP_ENDPOINT'] = ""

import crewai


### Verification
To verify that the fix worked, you can run your application and check the network traffic to see if the telemetry requests are still being sent. You can use tools like `tcpdump` or `Wireshark` to capture and inspect the network traffic.

### Extra Tips
* Make sure to check the documentation for the `crewai` package to see if there are any other ways to disable telemetry.
* If you are using a virtual environment, make sure to set the environment variables in the correct environment.
* If you are still experiencing issues, try printing out the environment variables in your Python code to ensure that they are being set correctly:
  ```python
import os
print(os.environ.get('OTEL_SDK_DISABLED'))
print(os.environ.get('OTEL_EXPORTER_OTLP_ENDPOINT'))

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The package shouldn't be sending telemetry to crewai servers about what I'm doing with it by default without warning.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING