grpc

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 9 Imported by: 31

Documentation

Overview

Package grpc contains several gRPC handlers which can be used for instrumenting calls with Zipkin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientHandler

func NewClientHandler(tracer *zipkin.Tracer, options ...ClientOption) stats.Handler

NewClientHandler returns a stats.Handler which can be used with grpc.WithStatsHandler to add tracing to a gRPC client. The gRPC method name is used as the span name and by default the only tags are the gRPC status code if the call fails. Use WithRPCHandler to add additional tags.

Types

type ClientOption

type ClientOption func(*clientHandler)

A ClientOption can be passed to NewClientHandler to customize the returned handler.

func WithRPCHandler

func WithRPCHandler(handler RPCHandler) ClientOption

WithRPCHandler allows one to add custom logic for handling a stats.RPCStats, e.g., to add additional tags.

type RPCHandler

type RPCHandler func(span zipkin.Span, rpcStats stats.RPCStats)

A RPCHandler can be registered using WithRPCHandler to intercept calls to HandleRPC of a handler for additional span customization.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL