Skip to content

Commit

Permalink
Merge pull request #22 from community-of-python/vrslev-patch-3
Browse files Browse the repository at this point in the history
Set larger default value of `max_value_length` for sentry-sdk
  • Loading branch information
xfenix authored Oct 10, 2024
2 parents a921dd6 + b3686af commit b969235
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ class YourSettings(BaseServiceSettings):
sentry_traces_sample_rate: float | None = None
sentry_sample_rate: float = pydantic.Field(default=1.0, le=1.0, ge=0.0)
sentry_max_breadcrumbs: int = 15
sentry_max_value_length: int = 16384
sentry_attach_stacktrace: bool = True
sentry_integrations: list[Integration] = []
sentry_additional_params: dict[str, typing.Any] = {}
Expand Down
2 changes: 2 additions & 0 deletions microbootstrap/instruments/sentry_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class SentryConfig(BaseInstrumentConfig):
sentry_traces_sample_rate: float | None = None
sentry_sample_rate: float = pydantic.Field(default=1.0, le=1.0, ge=0.0)
sentry_max_breadcrumbs: int = 15
sentry_max_value_length: int = 16384
sentry_attach_stacktrace: bool = True
sentry_integrations: list[Integration] = pydantic.Field(default_factory=list)
sentry_additional_params: dict[str, typing.Any] = pydantic.Field(default_factory=dict)
Expand All @@ -34,6 +35,7 @@ def bootstrap(self) -> None:
traces_sample_rate=self.instrument_config.sentry_traces_sample_rate,
environment=self.instrument_config.service_environment,
max_breadcrumbs=self.instrument_config.sentry_max_breadcrumbs,
max_value_length=self.instrument_config.sentry_max_value_length,
attach_stacktrace=self.instrument_config.sentry_attach_stacktrace,
integrations=self.instrument_config.sentry_integrations,
**self.instrument_config.sentry_additional_params,
Expand Down

0 comments on commit b969235

Please sign in to comment.