Documentation ¶
Index ¶
- Variables
- func AsyncSetup(addr string, tenantID string, sampler sdktrace.Sampler) error
- func GlobalIDGenerator() sdktrace.IDGenerator
- func GlobalTracer() apitrace.Tracer
- func SetGlobalIDGenerator(gen sdktrace.IDGenerator)
- func Setup(addr string, opts ...SetupOption) error
- func Shutdown(ctx context.Context) error
- func Start(ctx context.Context, spanName string, opts ...apitrace.SpanStartOption) (context.Context, apitrace.Span)
- func Version() string
- func WithSpan(ctx context.Context, spanName string, fn func(ctx context.Context) error, ...) error
- type SetupOption
- func WithBatchSpanProcessorOption(opts ...trace.BatchSpanProcessorOption) SetupOption
- func WithDeferredSampler(deferredSampler trace.DeferredSampler) SetupOption
- func WithGRPCDialOption(opts ...grpc.DialOption) SetupOption
- func WithHTTPEnabled(enabled bool) SetupOption
- func WithIDGenerator(idGenerator sdktrace.IDGenerator) SetupOption
- func WithLabels(opts ...attribute.KeyValue) SetupOption
- func WithLevelEnable(level apilog.Level) SetupOption
- func WithLogEnabled(enabled bool) SetupOption
- func WithMetricEnabled(enabled bool) SetupOption
- func WithResource(rs *resource.Resource) SetupOption
- func WithSampler(sampler sdktrace.Sampler) SetupOption
- func WithServerOwner(owner string) SetupOption
- func WithServiceName(serviceName string) SetupOption
- func WithServiceNamespace(namespace string) SetupOption
- func WithTenantID(tenantID string) SetupOption
- func WithZPageSpanProcessor(enable bool) SetupOption
Constants ¶
This section is empty.
Variables ¶
var ( DefaultTenantID = "default" DefaultExporterAddr = "localhost:12520" DefaultLogLevel = apilog.InfoLevel MaxSendMessageSize = 4194304 )
Functions ¶
func AsyncSetup ¶
AsyncSetup init async setup, used in long running service, report data by batch
func GlobalIDGenerator ¶
func GlobalIDGenerator() sdktrace.IDGenerator
GlobalIDGenerator global id generator
func SetGlobalIDGenerator ¶
func SetGlobalIDGenerator(gen sdktrace.IDGenerator)
SetGlobalIDGenerator set global id generator
Types ¶
type SetupOption ¶
type SetupOption func(*setupOptions)
SetupOption opentelemetry setup option
func WithBatchSpanProcessorOption ¶
func WithBatchSpanProcessorOption(opts ...trace.BatchSpanProcessorOption) SetupOption
WithBatchSpanProcessorOption sets the options to configure a BatchSpanProcessor.
func WithDeferredSampler ¶
func WithDeferredSampler(deferredSampler trace.DeferredSampler) SetupOption
WithDeferredSampler with deferred sampler filter function
func WithGRPCDialOption ¶
func WithGRPCDialOption(opts ...grpc.DialOption) SetupOption
WithGRPCDialOption with grpc dial option
func WithHTTPEnabled ¶
func WithHTTPEnabled(enabled bool) SetupOption
WithHTTPEnabled enabled http protocol, default is grpc
func WithIDGenerator ¶
func WithIDGenerator(idGenerator sdktrace.IDGenerator) SetupOption
WithIDGenerator with custom id generator
func WithLabels ¶
func WithLabels(opts ...attribute.KeyValue) SetupOption
WithLabels with extra attribute labels
func WithLevelEnable ¶
func WithLevelEnable(level apilog.Level) SetupOption
WithLevelEnable with log level
func WithLogEnabled ¶
func WithLogEnabled(enabled bool) SetupOption
WithLogEnabled log is enabled or not
func WithMetricEnabled ¶
func WithMetricEnabled(enabled bool) SetupOption
WithMetricEnabled enables metric
func WithServerOwner ¶
func WithServerOwner(owner string) SetupOption
WithServerOwner with server owner
func WithServiceName ¶
func WithServiceName(serviceName string) SetupOption
WithServiceName with service name
func WithServiceNamespace ¶
func WithServiceNamespace(namespace string) SetupOption
WithServiceNamespace with namespace
func WithZPageSpanProcessor ¶
func WithZPageSpanProcessor(enable bool) SetupOption
WithZPageSpanProcessor enables zpage span processor
Directories ¶
Path | Synopsis |
---|---|
log
Package log log interface
|
Package log log interface |
example
|
|
basic
Module
|
|
log
Module
|
|
metric
Module
|
|
trace
Module
|
|
exporter
|
|
oteltrpc
module
|
|
example/greeter
Module
|
|
pkg
|
|
admin
Package admin provides simple admin http server API.
|
Package admin provides simple admin http server API. |
protocol/opentelemetry-ext/proto/operation
Package operation is a reverse proxy.
|
Package operation is a reverse proxy. |
protocol/opentelemetry-ext/proto/sampler
Package sampler is a reverse proxy.
|
Package sampler is a reverse proxy. |
sdk
|
|
metric
Package metric
|
Package metric |
remote
Package remote
|
Package remote |
trace
Package trace trace
|
Package trace trace |