We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4d0ba8 commit 76c1b9eCopy full SHA for 76c1b9e
sentry_sdk/client.py
@@ -1006,6 +1006,13 @@ def _capture_metric(self, metric):
1006
metric["attributes"]["sentry.sdk.name"] = SDK_INFO["name"]
1007
metric["attributes"]["sentry.sdk.version"] = SDK_INFO["version"]
1008
1009
+ server_name = self.options.get("server_name")
1010
+ if (
1011
+ server_name is not None
1012
+ and SPANDATA.SERVER_ADDRESS not in metric["attributes"]
1013
+ ):
1014
+ metric["attributes"][SPANDATA.SERVER_ADDRESS] = server_name
1015
+
1016
environment = self.options.get("environment")
1017
if environment is not None and "sentry.environment" not in metric["attributes"]:
1018
metric["attributes"]["sentry.environment"] = environment
0 commit comments