Hello everyone, i am running into an issue when trying to run a CrewAI application due to telemetry data being sent out.
It works when using a mobile hotspot, but my company network firewall seems to be blocking the outgoing traffic.
I already tried setting OTEL_SDK_DISABLED = “true” in the .env
Did anyone face a similar issue and was able to solve it?
I dont want to use any workaround with a vpn i simply dont want to send out any telemetry data.
That’s quite strange. Look at the first few lines of the Telemetry
class definition:
class Telemetry:
"""A class to handle anonymous telemetry for the crewai package.
The data being collected is for development purpose, all data is anonymous.
There is NO data being collected on the prompts, tasks descriptions
agents backstories or goals nor responses or any data that is being
processed by the agents, nor any secrets and env vars.
Users can opt-in to sharing more complete data using the `share_crew`
attribute in the Crew class.
"""
def __init__(self):
self.ready = False
self.trace_set = False
if os.getenv("OTEL_SDK_DISABLED", "false").lower() == "true":
return
So clearly telemetry should be disabled if you do:
os.environ["OTEL_SDK_DISABLED"] = "true"
Are you using this setting because i am using in main where start fast api and it is not working.
What crewai version are you using?
Following the documentation, I suggest that you set both CREWAI_DISABLE_TELEMETRY
and OTEL_SDK_DISABLED
in your .env
file:
# Disable only CrewAI telemetry
CREWAI_DISABLE_TELEMETRY="true"
# Disable all OpenTelemetry features (including CrewAI)
OTEL_SDK_DISABLED="true"
I had faced a similar issue.
Setting up a .env with these flags and reading them was not enough.
I had to read them and then set them to the environment.
I’d need to dig through the code like Max_Moura did to understand how these checks are executed.
I settled on
os.environment[“OTEL_SDK_DISABLED”] = True
os.environment[“CREWAI_DISABLE_TELEMETRY”] = True
1 Like