revise Datadog trace sampling configuration (#10151)
* datadog: sample_rate omitted by default * config: use *float32 with nil instead of float32 with sentinel value * change some names * gofmt -s -w internal/ingress/controller/nginx.go
This commit is contained in:
parent
125b3be6f9
commit
6d55e1f3c4
2 changed files with 52 additions and 42 deletions
|
|
@ -706,16 +706,9 @@ type Configuration struct {
|
|||
// Default: nginx.handle
|
||||
DatadogOperationNameOverride string `json:"datadog-operation-name-override"`
|
||||
|
||||
// DatadogPrioritySampling specifies to use client-side sampling
|
||||
// If true disables client-side sampling (thus ignoring sample_rate) and enables distributed
|
||||
// priority sampling, where traces are sampled based on a combination of user-assigned
|
||||
// Default: true
|
||||
DatadogPrioritySampling bool `json:"datadog-priority-sampling"`
|
||||
|
||||
// DatadogSampleRate specifies sample rate for any traces created.
|
||||
// This is effective only when datadog-priority-sampling is false
|
||||
// Default: 1.0
|
||||
DatadogSampleRate float32 `json:"datadog-sample-rate"`
|
||||
// Default: use a dynamic rate instead
|
||||
DatadogSampleRate *float32 `json:"datadog-sample-rate",omitempty`
|
||||
|
||||
// MainSnippet adds custom configuration to the main section of the nginx configuration
|
||||
MainSnippet string `json:"main-snippet"`
|
||||
|
|
@ -1001,8 +994,7 @@ func NewDefault() Configuration {
|
|||
DatadogEnvironment: "prod",
|
||||
DatadogCollectorPort: 8126,
|
||||
DatadogOperationNameOverride: "nginx.handle",
|
||||
DatadogSampleRate: 1.0,
|
||||
DatadogPrioritySampling: true,
|
||||
DatadogSampleRate: nil,
|
||||
LimitReqStatusCode: 503,
|
||||
LimitConnStatusCode: 503,
|
||||
SyslogPort: 514,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue