opentrace

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tracing_Type_name = map[int32]string{
		0: "urber_jaeger",
		1: "zipkin",
	}
	Tracing_Type_value = map[string]int32{
		"urber_jaeger": 0,
		"zipkin":       1,
	}
)

Enum value maps for Tracing_Type.

View Source
var (
	Tracing_Jaeger_Sampler_Type_name = map[int32]string{
		0: "const",
		1: "probabilistic",
		2: "rateLimiting",
		3: "remote",
	}
	Tracing_Jaeger_Sampler_Type_value = map[string]int32{
		"const":         0,
		"probabilistic": 1,
		"rateLimiting":  2,
		"remote":        3,
	}
)

Enum value maps for Tracing_Jaeger_Sampler_Type.

View Source
var File_opentrace_proto protoreflect.FileDescriptor

Functions

func GinHttpTrace

func GinHttpTrace(notTrace ...string) gin.HandlerFunc

Types

type CompletedConfig

type CompletedConfig struct {
	// contains filtered or unexported fields
}

func (CompletedConfig) Apply

func (c CompletedConfig) Apply() (io.Closer, error)

type Config

type Config struct {
	GetViper func() *viper.Viper // If set, overrides params below
	Tracing
}

func NewConfig

func NewConfig() *Config

NewConfig returns a Config struct with the default values

func NewViperConfig added in v0.0.17

func NewViperConfig(getViper func() *viper.Viper) *Config

NewViperConfig returns a Config struct with the global viper instance key representing a sub tree of this instance. NewViperConfig is case-insensitive for a key.

func (*Config) Complete

func (c *Config) Complete() CompletedConfig

Complete fills in any fields not set that are required to have valid data and can be derived from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver.

func (*Config) Validate

func (c *Config) Validate() []error

Validate checks Config and return a slice of found errs.

type Tracing added in v0.0.17

type Tracing struct {
	Enable      bool            `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
	Type        Tracing_Type    `protobuf:"varint,2,opt,name=type,proto3,enum=sole.api.v1.viper.opentrace.Tracing_Type" json:"type,omitempty"`
	Jaeger      *Tracing_Jaeger `protobuf:"bytes,3,opt,name=jaeger,proto3" json:"jaeger,omitempty"`
	ServiceName string          `protobuf:"bytes,4,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// contains filtered or unexported fields
}

func (*Tracing) Descriptor deprecated added in v0.0.17

func (*Tracing) Descriptor() ([]byte, []int)

Deprecated: Use Tracing.ProtoReflect.Descriptor instead.

func (*Tracing) GetEnable added in v0.0.17

func (x *Tracing) GetEnable() bool

func (*Tracing) GetJaeger added in v0.0.17

func (x *Tracing) GetJaeger() *Tracing_Jaeger

func (*Tracing) GetServiceName added in v0.0.17

func (x *Tracing) GetServiceName() string

func (*Tracing) GetType added in v0.0.17

func (x *Tracing) GetType() Tracing_Type

func (*Tracing) ProtoMessage added in v0.0.17

func (*Tracing) ProtoMessage()

func (*Tracing) ProtoReflect added in v0.0.17

func (x *Tracing) ProtoReflect() protoreflect.Message

func (*Tracing) Reset added in v0.0.17

func (x *Tracing) Reset()

func (*Tracing) String added in v0.0.17

func (x *Tracing) String() string

type Tracing_Jaeger added in v0.0.17

type Tracing_Jaeger struct {
	Reporter *Tracing_Jaeger_Reporter `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"`
	Sampler  *Tracing_Jaeger_Sampler  `protobuf:"bytes,2,opt,name=sampler,proto3" json:"sampler,omitempty"`
	// contains filtered or unexported fields
}

func (*Tracing_Jaeger) Descriptor deprecated added in v0.0.17

func (*Tracing_Jaeger) Descriptor() ([]byte, []int)

Deprecated: Use Tracing_Jaeger.ProtoReflect.Descriptor instead.

func (*Tracing_Jaeger) GetReporter added in v0.0.17

func (x *Tracing_Jaeger) GetReporter() *Tracing_Jaeger_Reporter

func (*Tracing_Jaeger) GetSampler added in v0.0.17

func (x *Tracing_Jaeger) GetSampler() *Tracing_Jaeger_Sampler

func (*Tracing_Jaeger) ProtoMessage added in v0.0.17

func (*Tracing_Jaeger) ProtoMessage()

func (*Tracing_Jaeger) ProtoReflect added in v0.0.17

func (x *Tracing_Jaeger) ProtoReflect() protoreflect.Message

func (*Tracing_Jaeger) Reset added in v0.0.17

func (x *Tracing_Jaeger) Reset()

func (*Tracing_Jaeger) String added in v0.0.17

func (x *Tracing_Jaeger) String() string

type Tracing_Jaeger_Reporter added in v0.0.17

type Tracing_Jaeger_Reporter struct {

	// LocalAgentHostPort instructs reporter to send spans to jaeger-agent at this address
	LocalAgentHostPort string `protobuf:"bytes,1,opt,name=local_agent_host_port,json=localAgentHostPort,proto3" json:"local_agent_host_port,omitempty"`
	// contains filtered or unexported fields
}

Reporter configures the reporter. All fields are optional.

func (*Tracing_Jaeger_Reporter) Descriptor deprecated added in v0.0.17

func (*Tracing_Jaeger_Reporter) Descriptor() ([]byte, []int)

Deprecated: Use Tracing_Jaeger_Reporter.ProtoReflect.Descriptor instead.

func (*Tracing_Jaeger_Reporter) GetLocalAgentHostPort added in v0.0.17

func (x *Tracing_Jaeger_Reporter) GetLocalAgentHostPort() string

func (*Tracing_Jaeger_Reporter) ProtoMessage added in v0.0.17

func (*Tracing_Jaeger_Reporter) ProtoMessage()

func (*Tracing_Jaeger_Reporter) ProtoReflect added in v0.0.17

func (x *Tracing_Jaeger_Reporter) ProtoReflect() protoreflect.Message

func (*Tracing_Jaeger_Reporter) Reset added in v0.0.17

func (x *Tracing_Jaeger_Reporter) Reset()

func (*Tracing_Jaeger_Reporter) String added in v0.0.17

func (x *Tracing_Jaeger_Reporter) String() string

type Tracing_Jaeger_Sampler added in v0.0.17

type Tracing_Jaeger_Sampler struct {

	// server_url is the address of jaeger-agent's HTTP sampling server
	ServerUrl string                      `protobuf:"bytes,1,opt,name=server_url,json=serverUrl,proto3" json:"server_url,omitempty"`
	Type      Tracing_Jaeger_Sampler_Type `protobuf:"varint,2,opt,name=type,proto3,enum=sole.api.v1.viper.opentrace.Tracing_Jaeger_Sampler_Type" json:"type,omitempty"`
	// Param is a value passed to the sampler.
	// Valid values for Param field are:
	// - for "const" sampler, 0 or 1 for always false/true respectively
	// - for "probabilistic" sampler, a probability between 0 and 1
	// - for "rateLimiting" sampler, the number of spans per second
	// - for "remote" sampler, param is the same as for "probabilistic"
	//   and indicates the initial sampling rate before the actual one
	//   is received from the mothership.
	Param float32 `protobuf:"fixed32,3,opt,name=param,proto3" json:"param,omitempty"`
	// contains filtered or unexported fields
}

Sampler allows initializing a non-default sampler. All fields are optional.

func (*Tracing_Jaeger_Sampler) Descriptor deprecated added in v0.0.17

func (*Tracing_Jaeger_Sampler) Descriptor() ([]byte, []int)

Deprecated: Use Tracing_Jaeger_Sampler.ProtoReflect.Descriptor instead.

func (*Tracing_Jaeger_Sampler) GetParam added in v0.0.17

func (x *Tracing_Jaeger_Sampler) GetParam() float32

func (*Tracing_Jaeger_Sampler) GetServerUrl added in v0.0.17

func (x *Tracing_Jaeger_Sampler) GetServerUrl() string

func (*Tracing_Jaeger_Sampler) GetType added in v0.0.17

func (*Tracing_Jaeger_Sampler) ProtoMessage added in v0.0.17

func (*Tracing_Jaeger_Sampler) ProtoMessage()

func (*Tracing_Jaeger_Sampler) ProtoReflect added in v0.0.17

func (x *Tracing_Jaeger_Sampler) ProtoReflect() protoreflect.Message

func (*Tracing_Jaeger_Sampler) Reset added in v0.0.17

func (x *Tracing_Jaeger_Sampler) Reset()

func (*Tracing_Jaeger_Sampler) String added in v0.0.17

func (x *Tracing_Jaeger_Sampler) String() string

type Tracing_Jaeger_Sampler_Type added in v0.0.17

type Tracing_Jaeger_Sampler_Type int32

Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote

const (
	Tracing_Jaeger_Sampler_const         Tracing_Jaeger_Sampler_Type = 0
	Tracing_Jaeger_Sampler_probabilistic Tracing_Jaeger_Sampler_Type = 1
	Tracing_Jaeger_Sampler_rateLimiting  Tracing_Jaeger_Sampler_Type = 2
	Tracing_Jaeger_Sampler_remote        Tracing_Jaeger_Sampler_Type = 3
)

func (Tracing_Jaeger_Sampler_Type) Descriptor added in v0.0.17

func (Tracing_Jaeger_Sampler_Type) Enum added in v0.0.17

func (Tracing_Jaeger_Sampler_Type) EnumDescriptor deprecated added in v0.0.17

func (Tracing_Jaeger_Sampler_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Tracing_Jaeger_Sampler_Type.Descriptor instead.

func (Tracing_Jaeger_Sampler_Type) Number added in v0.0.17

func (Tracing_Jaeger_Sampler_Type) String added in v0.0.17

func (Tracing_Jaeger_Sampler_Type) Type added in v0.0.17

type Tracing_Type added in v0.0.17

type Tracing_Type int32
const (
	Tracing_urber_jaeger Tracing_Type = 0 //uber-jaeger
	Tracing_zipkin       Tracing_Type = 1 //zipkin
)

func (Tracing_Type) Descriptor added in v0.0.17

func (Tracing_Type) Enum added in v0.0.17

func (x Tracing_Type) Enum() *Tracing_Type

func (Tracing_Type) EnumDescriptor deprecated added in v0.0.17

func (Tracing_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Tracing_Type.Descriptor instead.

func (Tracing_Type) Number added in v0.0.17

func (Tracing_Type) String added in v0.0.17

func (x Tracing_Type) String() string

func (Tracing_Type) Type added in v0.0.17

Jump to

Keyboard shortcuts

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