-
Notifications
You must be signed in to change notification settings - Fork 8
/
defaults.go
48 lines (46 loc) · 1.69 KB
/
defaults.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
package config // import "github.com/hypertrace/goagent/config"
import (
agentconfig "github.com/hypertrace/agent-config/gen/go/v1"
"google.golang.org/protobuf/types/known/wrapperspb"
)
// defaultConfig holds the default config values for agent.
var defaultConfig = agentconfig.AgentConfig{
Enabled: agentconfig.Bool(true),
PropagationFormats: []agentconfig.PropagationFormat{agentconfig.PropagationFormat_TRACECONTEXT},
DataCapture: &agentconfig.DataCapture{
HttpHeaders: &agentconfig.Message{
Request: agentconfig.Bool(true),
Response: agentconfig.Bool(true),
},
HttpBody: &agentconfig.Message{
Request: agentconfig.Bool(true),
Response: agentconfig.Bool(true),
},
RpcMetadata: &agentconfig.Message{
Request: agentconfig.Bool(true),
Response: agentconfig.Bool(true),
},
RpcBody: &agentconfig.Message{
Request: agentconfig.Bool(true),
Response: agentconfig.Bool(true),
},
BodyMaxSizeBytes: agentconfig.Int32(131072),
BodyMaxProcessingSizeBytes: agentconfig.Int32(1048576),
AllowedContentTypes: []*wrapperspb.StringValue{wrapperspb.String("json"),
wrapperspb.String("x-www-form-urlencoded")},
},
Reporting: &agentconfig.Reporting{
Endpoint: agentconfig.String("http://localhost:9411/api/v2/spans"),
Secure: agentconfig.Bool(false),
TraceReporterType: agentconfig.TraceReporterType_ZIPKIN,
CertFile: agentconfig.String(""),
EnableGrpcLoadbalancing: agentconfig.Bool(true),
},
Telemetry: &agentconfig.Telemetry{
StartupSpanEnabled: agentconfig.Bool(true),
MetricsEnabled: agentconfig.Bool(true),
},
Goagent: &agentconfig.GoAgent{
UseCustomBsp: agentconfig.Bool(true),
},
}