Skip to content

Commit c42a09a

Browse files
committed
stringify
1 parent 44f4862 commit c42a09a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

sentry_sdk/traces.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,19 +585,21 @@ def _set_segment_attributes(self) -> None:
585585
and SPANDATA.SENTRY_RELEASE not in self._attributes
586586
):
587587
self.set_attribute(
588-
SPANDATA.SENTRY_RELEASE, client.options["release"].strip()
588+
SPANDATA.SENTRY_RELEASE, str(client.options["release"]).strip()
589589
)
590590

591591
if (
592592
client.options.get("environment")
593593
and SPANDATA.SENTRY_ENVIRONMENT not in self._attributes
594594
):
595595
self.set_attribute(
596-
SPANDATA.SENTRY_ENVIRONMENT, client.options["environment"].strip()
596+
SPANDATA.SENTRY_ENVIRONMENT, str(client.options["environment"]).strip()
597597
)
598598

599599
if client.options.get("dist") and SPANDATA.SENTRY_DIST not in self._attributes:
600-
self.set_attribute(SPANDATA.SENTRY_DIST, client.options["dist"].strip())
600+
self.set_attribute(
601+
SPANDATA.SENTRY_DIST, str(client.options["dist"]).strip()
602+
)
601603

602604
def _to_json(self) -> "SpanJSON":
603605
res: "SpanJSON" = {

0 commit comments

Comments
 (0)