Documentation ¶
Overview ¶
Package telemetry contains metrics and tracing constructs
Index ¶
- func HTTPStatsHandler(getInstallationID func() string, service string) func(next http.Handler) http.Handler
- func HTTPStatsRoundTripper(getInstallationID func() string, service string) func(next http.RoundTripper) http.RoundTripper
- func NewGRPCServerStatsHandler(service string) grpcstats.Handler
- func ServiceName(service string) string
- type GRPCClientStatsHandler
- type GRPCServerStatsHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPStatsHandler ¶
func HTTPStatsHandler(getInstallationID func() string, service string) func(next http.Handler) http.Handler
HTTPStatsHandler creates tracing and metrics Handler for a pomerium service
func HTTPStatsRoundTripper ¶
func HTTPStatsRoundTripper(getInstallationID func() string, service string) func(next http.RoundTripper) http.RoundTripper
HTTPStatsRoundTripper creates tracing and metrics RoundTripper for a pomerium service
func NewGRPCServerStatsHandler ¶
NewGRPCServerStatsHandler creates a new GRPCServerStatsHandler for a pomerium service
func ServiceName ¶
ServiceName turns a pomerium service option into the appropriate external label for telemetry purposes
Ex: service 'all' -> 'pomerium' service 'proxy' -> 'pomerium-proxy'
Types ¶
type GRPCClientStatsHandler ¶ added in v0.10.0
type GRPCClientStatsHandler struct { UnaryInterceptor grpc.UnaryClientInterceptor // TODO: we should have a streaming interceptor too grpcstats.Handler }
GRPCClientStatsHandler provides DialOptions for grpc clients to instrument network calls with both metrics and tracing
func NewGRPCClientStatsHandler ¶ added in v0.10.0
func NewGRPCClientStatsHandler(service string) *GRPCClientStatsHandler
NewGRPCClientStatsHandler returns a new GRPCClientStatsHandler used to create telemetry related client DialOptions
type GRPCServerStatsHandler ¶
GRPCServerStatsHandler provides a grpc stats.Handler for metrics and tracing for a pomerium service
func (*GRPCServerStatsHandler) TagRPC ¶
func (h *GRPCServerStatsHandler) TagRPC(ctx context.Context, tagInfo *grpcstats.RPCTagInfo) context.Context
TagRPC implements grpc.stats.Handler and adds metrics and tracing metadata to the context of a given RPC
Directories ¶
Path | Synopsis |
---|---|
Package metrics contains support for OpenCensus distributed metrics.
|
Package metrics contains support for OpenCensus distributed metrics. |
Package requestid has functions for working with x-request-id in http/gRPC requests.
|
Package requestid has functions for working with x-request-id in http/gRPC requests. |
Package trace contains support for OpenCensus distributed tracing.
|
Package trace contains support for OpenCensus distributed tracing. |