-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
59 lines (47 loc) · 1.35 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package tracing
import (
"crypto/tls"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/resource"
"google.golang.org/grpc/credentials"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
//"google.golang.org/grpc/credentials"
)
type Config struct {
traceExporter *Exporter
metricExporter *Exporter
metricReportPeriod string
serviceInfo *ServiceInfo
attributes map[string]string
headers map[string]string
idGenerator sdktrace.IDGenerator
otelErrorHandler otel.ErrorHandler
traceBatchOptions []sdktrace.BatchSpanProcessorOption
sampleRatio float64
resourceAttributes []attribute.KeyValue
resourceDetectors []resource.Detector
tlsConf *tls.Config
// Tracing options
tracingEnabled bool
textMapPropagator propagation.TextMapPropagator
tracerProvider *sdktrace.TracerProvider
traceSampler sdktrace.Sampler
prettyPrint bool
bspOptions []sdktrace.BatchSpanProcessorOption
// Metrics options
metricsEnabled bool
metricOptions []metric.Option
}
type Exporter struct {
ExporterEndpoint string
Insecure bool
Creds credentials.TransportCredentials
}
type ServiceInfo struct {
Name string
Namespace string
Version string
}