Skip to content

Commit 8569bee

Browse files
chore: rename cloud-sdk-specific telemetry attributes
1 parent 8f3a6f4 commit 8569bee

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/sap_cloud_sdk/core/telemetry/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ def create_resource_attributes_from_env() -> dict:
8080
- cloud.region (from APPFND_CONHOS_REGION, defaults to "unknown")
8181
- sap.cld.subaccount_id (from APPFND_CONHOS_SUBACCOUNTID, defaults to "unknown")
8282
- sap.cld.system_role (from APPFND_CONHOS_SYSTEM_ROLE, defaults to "ZAFT")
83-
- sap.telemetry.sdk.name (constant: "SAP Cloud SDK for Python")
84-
- sap.telemetry.sdk.language (constant: "python")
85-
- sap.telemetry.sdk.version (from package version)
83+
- sap.cloud_sdk.name (constant: "SAP Cloud SDK for Python")
84+
- sap.cloud_sdk.language (constant: "python")
85+
- sap.cloud_sdk.version (from package version)
8686
"""
8787

8888
attributes = {

src/sap_cloud_sdk/core/telemetry/constants.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
ATTR_SAP_SUBACCOUNT_ID = "sap.cld.subaccount_id"
2020
ATTR_SAP_TENANT_ID = "sap.tenancy.tenant_id"
2121
ATTR_SAP_SYSTEM_ROLE = "sap.cld.system_role"
22-
ATTR_SAP_SDK_NAME = "sap.telemetry.sdk.name"
23-
ATTR_SAP_SDK_LANGUAGE = "sap.telemetry.sdk.language"
24-
ATTR_SAP_SDK_VERSION = "sap.telemetry.sdk.version"
22+
ATTR_SAP_SDK_NAME = "sap.cloud_sdk.name"
23+
ATTR_SAP_SDK_LANGUAGE = "sap.cloud_sdk.language"
24+
ATTR_SAP_SDK_VERSION = "sap.cloud_sdk.version"
2525

2626
# Attribute keys - SAP App Foundation specific
2727
ATTR_CAPABILITY = "sap.cloud_sdk.capability"

tests/core/unit/telemetry/test_auto_instrument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_auto_instrument_creates_resource_with_attributes(self, mock_traceloop_c
8181
mock_traceloop_components['get_app_name'].return_value = 'test-app'
8282
mock_traceloop_components['create_resource'].return_value = {
8383
'service.name': 'test-app',
84-
'sap.telemetry.sdk.language': 'python'
84+
'sap.cloud_sdk.language': 'python'
8585
}
8686

8787
with patch.dict('os.environ', {

0 commit comments

Comments
 (0)