diff --git a/dagfactory/constants.py b/dagfactory/constants.py index 291a738..5881383 100644 --- a/dagfactory/constants.py +++ b/dagfactory/constants.py @@ -1,3 +1,3 @@ -TELEMETRY_URL = "https://astro.gateway.scarf.sh/{telemetry_version}/{dagfactory_version}/{airflow_version}/{python_version}/{platform_system}/{platform_machine}/{event_type}/{status}/{dag_hash}/{task_count}" +TELEMETRY_URL = "https://astronomer.gateway.scarf.sh/{telemetry_version}/{dagfactory_version}/{airflow_version}/{python_version}/{platform_system}/{platform_machine}/{event_type}/{status}/{dag_hash}/{task_count}" TELEMETRY_VERSION = "v1" TELEMETRY_TIMEOUT = 5.0 diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py index df06af3..6977c2e 100644 --- a/tests/test_telemetry.py +++ b/tests/test_telemetry.py @@ -58,11 +58,12 @@ def test_emit_usage_metrics_fails(mock_httpx_get, caplog): } is_success = telemetry.emit_usage_metrics(sample_metrics) mock_httpx_get.assert_called_once_with( - "https://astro.gateway.scarf.sh/v1/0.2.0a1/2.10.1/3.11/darwin/amd64/dag_run/success/d151d1fa2f03270ea116cc7494f2c591/3", + "https://astronomer.gateway.scarf.sh/v1/0.2.0a1/2.10.1/3.11/darwin/amd64/dag_run/success/d151d1fa2f03270ea116cc7494f2c591/3", timeout=5.0, + follow_redirects=True, ) assert not is_success - log_msg = "Unable to emit usage metrics to https://astro.gateway.scarf.sh/v1/0.2.0a1/2.10.1/3.11/darwin/amd64/dag_run/success/d151d1fa2f03270ea116cc7494f2c591/3. Status code: 404. Message: Non existent URL" + log_msg = "Unable to emit usage metrics to https://astronomer.gateway.scarf.sh/v1/0.2.0a1/2.10.1/3.11/darwin/amd64/dag_run/success/d151d1fa2f03270ea116cc7494f2c591/3. Status code: 404. Message: Non existent URL" assert caplog.text.startswith("WARNING") assert log_msg in caplog.text