forked from hypertrace/goagent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefaults.go
42 lines (38 loc) · 1.01 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
package config
import (
"google.golang.org/protobuf/types/known/wrapperspb"
)
// defaultConfig holds the default config values for agent.
var defaultConfig = AgentConfig{
PropagationFormats: []PropagationFormat{PropagationFormat_TRACECONTEXT},
DataCapture: &DataCapture{
HttpHeaders: &Message{
Request: Bool(true),
Response: Bool(true),
},
HttpBody: &Message{
Request: Bool(true),
Response: Bool(true),
},
RpcMetadata: &Message{
Request: Bool(true),
Response: Bool(true),
},
RpcBody: &Message{
Request: Bool(true),
Response: Bool(true),
},
},
Reporting: &Reporting{
Endpoint: String("http://localhost:9411/api/v2/spans"),
Secure: Bool(false),
},
}
// Bool wraps the scalar value to be used in the AgentConfig object
func Bool(val bool) *wrapperspb.BoolValue {
return &wrapperspb.BoolValue{Value: val}
}
// String wraps the scalar value to be used in the AgentConfig object
func String(val string) *wrapperspb.StringValue {
return &wrapperspb.StringValue{Value: val}
}