Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions label_studio/core/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ def collect_versions_dummy(**kwargs):

# Whether to send analytics telemetry data. Fall back to old lowercase name for legacy compatibility.
COLLECT_ANALYTICS = get_bool_env('COLLECT_ANALYTICS', get_bool_env('collect_analytics', True))
COLLECT_ANALYTICS_URL = get_env('COLLECT_ANALYTICS_URL', 'https://tele.labelstud.io')

# Strip harmful content from SVG files by default
SVG_SECURITY_CLEANUP = get_bool_env('SVG_SECURITY_CLEANUP', False)
Expand Down
5 changes: 2 additions & 3 deletions label_studio/core/utils/contextlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def create_payload(self, request, response, body):
'language': request.LANGUAGE_CODE,
'content_type': content_type,
'content_length': (
int(request.environ.get('CONTENT_LENGTH')) if request.environ.get('CONTENT_LENGTH') else None
int(request.META.get('CONTENT_LENGTH')) if request.META.get('CONTENT_LENGTH') else None
),
'status_code': status_code,
'response': response_content,
Expand Down Expand Up @@ -329,7 +329,6 @@ def send_job(self, request, response, body):
pass
else:
try:
url = 'https://tele.labelstud.io'
requests.post(url=url, json=payload, timeout=3.0)
requests.post(url=settings.COLLECT_ANALYTICS_URL, json=payload, timeout=3.0)
except: # noqa: E722
pass
Loading