You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decoupled Logger Sampler (logger/sampler.go): Eliminated architectural layering breach by removing dependency on ratelimit. Defined standalone Sampler interface and an internal lock-synchronized token-bucket sampler with zero third-party dependencies.
Bounded HTTP Client Retry Buffering (httpclient/roundtripper.go): Bounded memory ingestion on retries with DefaultMaxRetryBodySize (10MB) via io.LimitReader. Oversized streaming request bodies bypass buffering and execute as a single attempt without rewind to prevent process OOM.
Interface Segregation on db.DBTX (db/context.go): Segregated core querier interface DBTX (Exec, Query, QueryRow) from bulk copy operations, introducing CopyDBTX for CopyFrom.
Raw Error Transparency (httputil/response.go): Preserved transparent err.Error() propagation in ErrorFromDomain without unrequested sanitization.
Added
logger: Decoupled Sampler interface and WithSampler functional option for custom log sampling algorithms.
httpclient: DefaultMaxRetryBodySize constant defining 10MB memory threshold for retry body buffering.
db: CopyDBTX interface extending DBTX with CopyFrom bulk ingestion.
Changed
logger: Decoupled SamplingHandler from ratelimit; instantiates an internal token-bucket sampler when no custom sampler is supplied.
httpclient: Bounded retry buffering using io.LimitReader; streams exceeding DefaultMaxRetryBodySize are executed as a single attempt without replay buffering.
db: Streamlined DBTX interface to Exec, Query, and QueryRow; batch CopyFrom moved to segregated CopyDBTX interface.
Fixed
Source Formatting: Applied canonical gofmt to circuitbreaker/consecutive_test.go and httpclient/roundtripper_test.go.
httputil: Verified raw error transparency in ErrorFromDomain returning err.Error() verbatim.