rpctracing

package
v2.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package rpctracing contains rpc middlewares to add opentracing support.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ClientComponentTag is added to each client span.
	ClientComponentTag = ot.Tag{
		Key:   string(otext.Component),
		Value: "nprpc.client",
	}
	// ServerComponentTag is added to each server span.
	ServerComponentTag = ot.Tag{
		Key:   string(otext.Component),
		Value: "nprpc.server",
	}
)
View Source
var (
	// ClientOpName is used to generate operation name of a client span.
	ClientOpName = func(spec RPCSpec) string {
		return fmt.Sprintf("RPC Client %s:%s", spec.SvcName(), spec.MethodName())
	}
	// ServerOpName is used to generate operation name of a server span.
	ServerOpName = func(spec RPCSpec) string {
		return fmt.Sprintf("RPC Server %s:%s", spec.SvcName(), spec.MethodName())
	}
)

Functions

func WrapRPCClient

func WrapRPCClient(tracer ot.Tracer) RPCMiddleware

WrapRPCClient adds opentracing support for RPCClient.

func WrapRPCServer

func WrapRPCServer(tracer ot.Tracer) RPCMiddleware

WrapRPCServer adds opentracing support for RPCServer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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