From 32888f011daaebebd87238d6fb61727b5d7ade08 Mon Sep 17 00:00:00 2001 From: Andrew Kent Date: Thu, 9 Jul 2026 14:32:19 -0600 Subject: [PATCH] emit v3 legacy ids in py+ts sdk he py+ts SDKs by default emit v4 span components. This is fine because our backend already supports v4 span components. However, pieces of the backend share code with the SDKs, so to be conservative we're setting this flag to tell the SDKs to behave as they did before. This flag will be removed once we fully switch to v4. --- braintrust/templates/api-configmap.yaml | 2 ++ braintrust/tests/api-configmap_test.yaml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/braintrust/templates/api-configmap.yaml b/braintrust/templates/api-configmap.yaml index 8063473..1bd41c2 100644 --- a/braintrust/templates/api-configmap.yaml +++ b/braintrust/templates/api-configmap.yaml @@ -27,6 +27,8 @@ metadata: data: ORG_NAME: {{ $orgName | quote }} PRIMARY_ORG_NAME: {{ $primaryOrgName | quote }} + # emit v3 spans in py+ts sdks. remove this setting when v4 migration is complete + BRAINTRUST_LEGACY_IDS: "true" {{- with $allowedOrgIds }} ALLOWED_ORG_IDS: {{ . | quote }} {{- end }} diff --git a/braintrust/tests/api-configmap_test.yaml b/braintrust/tests/api-configmap_test.yaml index 062b466..04854ef 100644 --- a/braintrust/tests/api-configmap_test.yaml +++ b/braintrust/tests/api-configmap_test.yaml @@ -19,6 +19,9 @@ tests: - equal: path: data.PRIMARY_ORG_NAME value: "" + - equal: + path: data.BRAINTRUST_LEGACY_IDS + value: "true" - equal: path: data.BRAINSTORE_ENABLED value: "true"