diff --git a/README.md b/README.md index 5f702f1..0e0c622 100644 --- a/README.md +++ b/README.md @@ -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] = {} diff --git a/microbootstrap/instruments/sentry_instrument.py b/microbootstrap/instruments/sentry_instrument.py index 26b1ead..964cc1e 100644 --- a/microbootstrap/instruments/sentry_instrument.py +++ b/microbootstrap/instruments/sentry_instrument.py @@ -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) @@ -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,