Documentation
¶
Index ¶
- Variables
- func Bool(k string, v bool) attribute.KeyValue
- func BoolSlice(k string, v []bool) attribute.KeyValue
- func ErrorCode() codes.Code
- func ErrorRecording(ctx context.Context, err error)
- func Float64(k string, v float64) attribute.KeyValue
- func Float64Slice(k string, v []float64) attribute.KeyValue
- func Int(k string, v int) attribute.KeyValue
- func Int64(k string, v int64) attribute.KeyValue
- func Int64Slice(k string, v []int64) attribute.KeyValue
- func IntSlice(k string, v []int) attribute.KeyValue
- func NewTracerProviderCtx(ctx context.Context, c *Config, serviceName string) *trace.TracerProvider
- func SetAttribute(ctx context.Context, name string, value string)
- func SpanFromContext(ctx context.Context) trace.Span
- func SpanID(ctx context.Context) string
- func String(k, v string) attribute.KeyValue
- func StringSlice(k string, v []string) attribute.KeyValue
- func Stringer(k string, v fmt.Stringer) attribute.KeyValue
- func TraceID(ctx context.Context) string
- func WithStackTrace(b bool) trace.SpanEndEventOption
- type Config
- type ConfigTag
- type Logs
- type Metrics
- type Options
- type Traces
Constants ¶
This section is empty.
Variables ¶
View Source
var LogProvider otellog.LoggerProvider
View Source
var MeterProvider metric.MeterProvider
View Source
var TraceProvider sdktrace.TracerProvider
Functions ¶
func BoolSlice ¶ added in v0.7.0
BoolSlice creates a attribute.KeyValue with a BOOLSLICE Value type.
func ErrorRecording ¶ added in v1.0.997
func Float64Slice ¶ added in v0.7.0
Float64Slice creates a attribute.KeyValue with a FLOAT64SLICE Value type.
func Int64Slice ¶ added in v0.7.0
Int64Slice creates a attribute.KeyValue with an INT64SLICE Value type.
func IntSlice ¶ added in v0.7.0
IntSlice creates a attribute.KeyValue with an INT64SLICE Value type.
func NewTracerProviderCtx ¶ added in v1.5.0
func SetAttribute ¶ added in v1.0.96
func StringSlice ¶ added in v0.7.0
StringSlice creates a attribute.KeyValue with a STRINGSLICE Value type.
func Stringer ¶ added in v0.7.0
Stringer creates a new key-value pair with a passed name and a string value generated by the passed Stringer interface.
func WithStackTrace ¶ added in v1.0.996
func WithStackTrace(b bool) trace.SpanEndEventOption
Types ¶
type Config ¶ added in v1.0.7
type Config struct { ServiceName string Host string TenantID string AccessToken string LogHost string Tp *sdktrace.TracerProvider Mp *sdkmetric.MeterProvider Lp *sdklog.LoggerProvider // contains filtered or unexported fields }
type ConfigTag ¶ added in v1.4.0
type ConfigTag string
const ( PauseMetrics ConfigTag = "pauseMetrics" // Boolean - disable all metrics PauseDefaultMetrics ConfigTag = "pauseDefaultMetrics" // Boolean - disable default runtime metrics PauseTraces ConfigTag = "pauseTraces" // Boolean - disable all traces PauseLogs ConfigTag = "pauseLogs" // Boolean - disable all logs PauseProfiling ConfigTag = "pauseProfiling" // Boolean - disable profiling Debug ConfigTag = "debug" // Boolean - enable debug in console DebugLogFile ConfigTag = "debugLogFile" // Boolean - get logs files for debug mode Service ConfigTag = "service" // String - Service Name e.g: "My-Service" Target ConfigTag = "target" // String - Target e.g: "app.middleware.io:443" Project ConfigTag = "projectName" // String - Project Name e.g: "My-Project" Token ConfigTag = "accessToken" // String - Token string found at agent installation CustomResourceAttributes ConfigTag = "customResourceAttributes" // map[string]interface{} )
type Metrics ¶ added in v1.0.93
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶ added in v1.4.4
func NewMetrics() *Metrics
func (*Metrics) Initialize ¶ added in v1.4.4
func (t *Metrics) Initialize()
type Options ¶ added in v0.7.0
type Options func(*Config)
func WithConfigTag ¶ added in v0.7.0
Add Config Options using ConfigTag e.g: track.WithConfigTag(track.Service, "my-service")
Click to show internal directories.
Click to hide internal directories.