[Bug] DISABLE_CDP_ERROR_REPORTING and DISABLE_CDP_USAGE_TRACKING require both env vars set to disable analytics
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Start in python/cdp/cdp_client.py at the analytics enable condition shown in the issue, and inspect how the two environment variables are evaluated. Done means each disable variable works independently and both together prevent analytics setup; verify the combinations described in the issue.
Written by the indexing model from the issue text.
Description
Summary
In python/cdp/cdp_client.py, the analytics enable condition uses or instead of and, meaning you must set both env vars to disable analytics. Setting only one has no effect.
Affected Code
# python/cdp/cdp_client.py
if api_key_id and (
os.getenv("DISABLE_CDP_ERROR_REPORTING") != "true"
or os.getenv("DISABLE_CDP_USAGE_TRACKING") != "true" # ← should be `and`
):
Analytics["identifier"] = api_key_id
Current (broken) behavior
DISABLE_CDP_ERROR_REPORTING=truealone → analytics still active (orshort-circuits toTrue)- Both env vars must be
"true"to disable analytics
Expected behavior
Setting either env var to "true" should disable that feature; setting both should disable both.
Fix
if api_key_id and (
os.getenv("DISABLE_CDP_ERROR_REPORTING") != "true"
and os.getenv("DISABLE_CDP_USAGE_TRACKING") != "true"
):
Analytics["identifier"] = api_key_id
- Dominant language
- Python
- Stars
- 200
- Forks
- 191
- Avg merge
- 3h 52m
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coinbase/cdp-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in coinbase/cdp-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100