Documentation
¶
Index ¶
- func GetSpanID(ctx context.Context) string
- func GetTraceID(ctx context.Context) string
- func New(ServiceName string, opts ...OptionTracer)
- func SetTracerPlatformType(t Platform)
- type FinishOption
- type FinishOptionFunc
- type OptionTracer
- func WithRatioSampler(ratio float64) OptionTracer
- func WithServiceInstanceId(instanceId string) OptionTracer
- func WithServiceVersion(version string) OptionTracer
- func WithTracerAgentHost(uri string) OptionTracer
- func WithTracerAgentPlatform(exporterPlatform PlatformType) OptionTracer
- func WithTracerServiceName(name string) OptionTracer
- func WithTracerTLS(tls *tls.Config) OptionTracer
- type Platform
- type PlatformType
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(ServiceName string, opts ...OptionTracer)
func SetTracerPlatformType ¶
func SetTracerPlatformType(t Platform)
SetTracerPlatformType function for set tracer platform
Types ¶
type FinishOption ¶
FinishOption for an option when trace is finished
type OptionTracer ¶
type OptionTracer func(t *optTracer)
func WithRatioSampler ¶
func WithRatioSampler(ratio float64) OptionTracer
func WithServiceInstanceId ¶
func WithServiceInstanceId(instanceId string) OptionTracer
func WithServiceVersion ¶
func WithServiceVersion(version string) OptionTracer
func WithTracerAgentHost ¶
func WithTracerAgentHost(uri string) OptionTracer
func WithTracerAgentPlatform ¶
func WithTracerAgentPlatform(exporterPlatform PlatformType) OptionTracer
func WithTracerServiceName ¶
func WithTracerServiceName(name string) OptionTracer
func WithTracerTLS ¶
func WithTracerTLS(tls *tls.Config) OptionTracer
type Platform ¶
type Platform interface { Start(ctx context.Context, operationName string) Tracer GetTraceID(ctx context.Context) string GetSpanID(ctx context.Context) string }
Platform defines the tracing platform
type PlatformType ¶
type PlatformType string
const ( // Open-Telemetry Collector OTLP PlatformType = "otlp" )
type Tracer ¶
type Tracer interface { Context() context.Context NewContext() context.Context Tags() map[string]interface{} SetTag(key string, value interface{}) Log(key string, value interface{}) SetError(err error) Finish(opts ...FinishOptionFunc) }
func StartTrace ¶
StartTrace starting trace child span from parent span
Click to show internal directories.
Click to hide internal directories.