-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathtracer_options.go
32 lines (29 loc) · 1.3 KB
/
tracer_options.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
// (c) Copyright IBM Corp. 2021
// (c) Copyright Instana Inc. 2017
package instana
// TracerOptions carry the tracer configuration
type TracerOptions struct {
// DropAllLogs turns log events on all spans into no-ops
DropAllLogs bool
// MaxLogsPerSpan limits the number of log records in a span (if set to a non-zero
// value). If a span has more logs than this value, logs are dropped as
// necessary
MaxLogsPerSpan int
// Secrets is a secrets matcher used to filter out sensitive data from HTTP requests, database
// connection strings, etc. By default tracer does not filter any values. Package `secrets`
// provides a set of secret matchers supported by the host agent configuration.
//
// See https://www.instana.com/docs/setup_and_manage/host_agent/configuration/#secrets for details
Secrets Matcher
// CollectableHTTPHeaders is a case-insensitive list of HTTP headers to be collected from HTTP requests and sent to the agent
//
// See https://www.instana.com/docs/setup_and_manage/host_agent/configuration/#capture-custom-http-headers for details
CollectableHTTPHeaders []string
}
// DefaultTracerOptions returns the default set of options to configure a tracer
func DefaultTracerOptions() TracerOptions {
return TracerOptions{
MaxLogsPerSpan: MaxLogsPerSpan,
Secrets: DefaultSecretsMatcher(),
}
}