Skip to content

Commit

Permalink
thriftbp: Deprecate ServerConfig.ReportPayloadSizeMetricsSampleRate
Browse files Browse the repository at this point in the history
We marked
DefaultProcessorMiddlewaresArgs.ReportPayloadSizeMetricsSampleRate as
deprecated in a previous PR, but forgot to also mark
ServerConfig.ReportPayloadSizeMetricsSampleRate as deprecated.
  • Loading branch information
fishy committed May 9, 2024
1 parent 25e0999 commit f1ad2b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions thriftbp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ type ServerConfig struct {
//
// Report the payload size metrics with this sample rate.
// If not set none of the requests will be sampled.
//
// Deprecated: Server side payload size reporting is always 100% enabled when
// using NewBaseplateServer.
ReportPayloadSizeMetricsSampleRate float64

// Optional, used by NewBaseplateServer and NewServer.
Expand Down Expand Up @@ -139,9 +142,8 @@ func NewBaseplateServer(
) (baseplate.Server, error) {
middlewares := BaseplateDefaultProcessorMiddlewares(
DefaultProcessorMiddlewaresArgs{
EdgeContextImpl: bp.EdgeContextImpl(),
ErrorSpanSuppressor: cfg.ErrorSpanSuppressor,
ReportPayloadSizeMetricsSampleRate: cfg.ReportPayloadSizeMetricsSampleRate,
EdgeContextImpl: bp.EdgeContextImpl(),
ErrorSpanSuppressor: cfg.ErrorSpanSuppressor,
},
)
middlewares = append(middlewares, cfg.Middlewares...)
Expand Down

0 comments on commit f1ad2b4

Please sign in to comment.