Skip to content

Commit e5f721a

Browse files
committed
Set larger default value of max_value_length for sentry-sdk
1 parent 8444866 commit e5f721a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ class YourSettings(BaseServiceSettings):
210210
sentry_traces_sample_rate: float | None = None
211211
sentry_sample_rate: float = pydantic.Field(default=1.0, le=1.0, ge=0.0)
212212
sentry_max_breadcrumbs: int = 15
213+
sentry_max_value_length: int = 16384
213214
sentry_attach_stacktrace: bool = True
214215
sentry_integrations: list[Integration] = []
215216
sentry_additional_params: dict[str, typing.Any] = {}

microbootstrap/instruments/sentry_instrument.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class SentryConfig(BaseInstrumentConfig):
1515
sentry_traces_sample_rate: float | None = None
1616
sentry_sample_rate: float = pydantic.Field(default=1.0, le=1.0, ge=0.0)
1717
sentry_max_breadcrumbs: int = 15
18+
sentry_max_value_length: int = 16384
1819
sentry_attach_stacktrace: bool = True
1920
sentry_integrations: list[Integration] = pydantic.Field(default_factory=list)
2021
sentry_additional_params: dict[str, typing.Any] = pydantic.Field(default_factory=dict)
@@ -34,6 +35,7 @@ def bootstrap(self) -> None:
3435
traces_sample_rate=self.instrument_config.sentry_traces_sample_rate,
3536
environment=self.instrument_config.service_environment,
3637
max_breadcrumbs=self.instrument_config.sentry_max_breadcrumbs,
38+
max_value_length=self.instrument_config.sentry_max_value_length,
3739
attach_stacktrace=self.instrument_config.sentry_attach_stacktrace,
3840
integrations=self.instrument_config.sentry_integrations,
3941
**self.instrument_config.sentry_additional_params,

0 commit comments

Comments
 (0)