Releases: reddit/baseplate.go
Releases · reddit/baseplate.go
Beta release including metrics compatibility with bp.go v2
v0.9.11-beta.1 Add a global registry that forces a baseplate_go="v0" constant label …
v0.9.10
Changes
runtimebp
:GOMAXPROCS
andGOMAXPROCSwithFormula
are deprecated.InitFromConfig
is changed to setGOMAXPROCS
with the new Reddit guideline.baseplate
: AddedStopDelay
toConfig
, with default to 1 second, to mitigate against a race condition during kubernetes graceful shutdown causing client requests being dropped.
v0.9.9
What's Changed
- runtimebp: Honor GOMAXPROCS environment variable if set by @fishy in #543
- upgrade log to panic by @migleeson in #542
- redisbp: Change stale connections metrics to counter by @fishy in #545
New Contributors
- @migleeson made their first contribution in #542
Full Changelog: v0.9.8...v0.9.9
v0.9.8
Bug fixes
thrifttest
: Fix bug where Server.Close hangspromtest
: Fix float comparison in CheckDeltathriftbp
: Fix bug that client middlewares don't get the error in IDL (for example,baseplate.Error
) correctly
Other improvements
runtimebp
: Support cgroup v2promtest
: Support non-vec counters/gauges/histogramsconfigbp
: AddInt64String
to work around helm precision loss issue in yaml filesinternalv2compat
: A new compat library v2 interpolate
v0.9.7
Minimal go version
- Minimal go version is raised to 1.18
Deprecations
runtimebp.numProcesses
yaml config is deprecated.thriftbp.AbadonCanceledRequests
server middleware is now deprecated. Services should handlecontext.Canceled
error in their own handler function instead. See 9e6206e for more details.
Prometheus related changes
- The go library is updated to latest version.
- Important error counters are "registered" to make sure they always emit 0 even when errors never happen.
- Added missing prometheus metrics for
redispipebp
,redisbp
,kafkabp
packages. thriftbp
: If a deadline is propagated from client to the, we report the deadline viathriftbp_server_extracted_deadline_budget_seconds
histogram.- Some minor label changes to add prefixes.
Other changes
thriftbp
:baseplate.Error
reported inInjectServerSpan
is now wrapped so the error reported to sentry is more readable.log
: When no version is stamped during building, it now auto fallback to vcs info generated by go compiler, if available. See Go 1.18 release notes for more details.redispipebp
: You can now specify the replica policy when constructing the client.filewatcher
: The default file size limit is raised from 1 MiB to 10 MiB.redisx
:ZPOPMAX
andZPOPMIN
commands are now supported.runtimebp
: When a pod is running with cpu request but no cpu limit, we now use physical cpus instead of cpu request to setGOMAXPROCS
.
v0.9.6
thriftbp
: The performance ofReportPayloadSizeMetrics
has been hugely improved.thriftbp
:ClientPoolConfig.InitialConnectionsFallback
has been deprecated, it's alwaystrue
now. To get the old,false
behavior, useClientPoolConfig.RequiredInitialConnections
.filewatcher
: Change to pull+push mode to fix a bug that it won't work for some ConfigMap configurations.log
: AddCounterWrapper
.- all: Eliminate all explicit
log.ErrorWithSentry(-Wrapper)
calls. Those calls now uselog.DefaultWrapper
plus a prometheus counter. thriftbp
: Workaround an envoy bug.
v0.9.5
Prometheus related fixes/improvements:
- Across Baseplate.go libraries, we are also emitting prometheus metrics for all the statsd metrics we are currently emitting, except the ones from spans, and the one from experiment thriftbp config.
- For http server metrics, we are also emitting with correct
http_endpoint
label set. - Fix a bug that in thrift server metrics, recovered panics are not treated as errors in prometheus metrics.
- Fix a bug that in thrift server metrics, the reported
thrift_exception_type
label could be wrong/too generic. - Fix a bug that in thrift server metrics, if the service is using a very old version of baseplate.thrift,
baseplate.Error
exceptions will not be recognized correctly in metrics. - Add
prometheusbp.BoolString
andmetricsbp.BoolString
to help services emitting more consistent value for boolean labels/tags.
Other fixes/improvements:
- thrift dependency has been upgraded to v0.16.0.
redisx
: Add support to*string
and*int64
types.- Add new
thriftbp.ServeAdmin
andhttpbp.ServeAdmin
functions. runtimebp
: More clear logging from GOMAXPROCS.
v0.9.4
Bug fixes
This release contains 2 fixes:
- A fix for the gauge reported by
thriftbp.ServerConfig.ReportConnectionCount
that's added inv0.9.3
. - A fix for connection leak in thrift client pool. This fix has the same effect as the fix in upcoming thrift
v0.16.0
release, but having both fixes is harmless. See upstream bug for more details.
v0.9.3
We retracted v0.9.2
with this release, so this release note includes changes from both versions:
Prometheus
The biggest change in this release is the addition of Prometheus support.
The following client and server middlewares are added to the packages to emit Prometheus metrics that's comply to Baseplate spec:
thriftbp
:PrometheusClientMiddleware
&PrometheusServerMiddleware
httpbp
:PrometheusClientMetrics
&PrometheusServerMetrics
grpcbp
:PrometheusUnaryClientInterceptor
&InjectPrometheusUnaryServerInterceptor
Those middlewares are also added to the default client/server middlewares.
Other Changes
- A new
detach
package is added to create a detached context to be used in goroutines and other cases, and we added support to it inlog
andtracing
packages from Baseplate.go. httpbp
: Some default server middleware tweaks:InjectServerSpan
will treat non-5xx errors as successes.- Add panic recovery middleware.
- The order of
SupportedMethods
in the middleware chain is tweaked so we can see unsupported method errors in monitoring middlewares. - Add middleware to emit metrics about status codes.
httpbp
: The default client middlewares now reports both -with-retry and raw metrics, similar to howthriftbp
's default client middlewares work.thriftbp
: Panics are no longer sent to sentry (only logged).thriftbp
: There's a newthriftbp.ServerConfig.ReportConnectionCount
to report a gauge of the number of connected clients.