Package twirp provides tracing functions for tracing clients and servers generated by the twirp framework (https://github.com/twitchtv/twirp).
- func NewServerHooks(opts ...Option) *twirp.ServerHooks
- func WrapServer(h http.Handler, opts ...Option) http.Handler
- type HTTPClient
- type Option
func NewServerHooks ¶
NewServerHooks creates the callback hooks for a twirp server to perform tracing. It is used in conjunction with WrapServer.
type HTTPClient ¶
HTTPClient is duplicated from twirp's generated service code. It is declared in this package so that the client can be wrapped to initiate traces.
type Option func(*config)
Option represents an option that can be passed to Dial.
func WithAnalytics ¶
WithAnalytics enables Trace Analytics for all started spans.
func WithAnalyticsRate ¶
WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.