Skip to content
Merged
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
4 changes: 3 additions & 1 deletion autoblocks/_impl/config/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from autoblocks._impl.util import AutoblocksEnvVar

API_ENDPOINT = "https://api.autoblocks.ai"
API_ENDPOINT_V2 = "https://api-v2.autoblocks.ai"
API_ENDPOINT_V2 = AutoblocksEnvVar.V2_API_ENDPOINT_V2.get() or "https://api-v2.autoblocks.ai"
INGESTION_ENDPOINT = "https://ingest-event.autoblocks.ai"
REVISION_LATEST = "latest"
REVISION_UNDEPLOYED = "undeployed"
2 changes: 1 addition & 1 deletion autoblocks/_impl/tracer/auto_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
def init_auto_tracer(
*,
api_key: Optional[str] = None,
api_endpoint: Optional[str] = f"{API_ENDPOINT_V2}/otel/v1/traces",
is_batch_disabled: Optional[bool] = False,
) -> None:
"""
Expand All @@ -33,6 +32,7 @@ def init_auto_tracer(
if is_auto_tracer_initialized():
log.debug("Skipping auto tracer initialization because it is already initialized")
return
api_endpoint = f"{API_ENDPOINT_V2}/otel/v1/traces"
log.debug(f"Initializing Autoblocks auto tracer with api_endpoint={api_endpoint}")
set_global_textmap(
CompositePropagator(
Expand Down
1 change: 1 addition & 0 deletions autoblocks/_impl/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class AutoblocksEnvVar(StrEnum):
ALIGN_TEST_EXTERNAL_ID = "AUTOBLOCKS_ALIGN_TEST_EXTERNAL_ID"
API_KEY = "AUTOBLOCKS_API_KEY"
V2_API_KEY = "AUTOBLOCKS_V2_API_KEY"
V2_API_ENDPOINT_V2 = "AUTOBLOCKS_V2_API_ENDPOINT"
CLI_SERVER_ADDRESS = "AUTOBLOCKS_CLI_SERVER_ADDRESS"
INGESTION_KEY = "AUTOBLOCKS_INGESTION_KEY"
FILTERS_TEST_SUITES = "AUTOBLOCKS_FILTERS_TEST_SUITES"
Expand Down