Add datadog environment as a configuration option
(cherry picked from commit 4306558baa595606cd6befff08c8c815d6fe2bd4)
This commit is contained in:
parent
4061ef375d
commit
57b10f5693
4 changed files with 16 additions and 2 deletions
|
|
@ -584,6 +584,10 @@ type Configuration struct {
|
|||
// Default: 8126
|
||||
DatadogCollectorPort int `json:"datadog-collector-port"`
|
||||
|
||||
// DatadogEnvironment specifies the environment this trace belongs to.
|
||||
// Default: prod
|
||||
DatadogEnvironment string `json:"datadog-environment"`
|
||||
|
||||
// DatadogServiceName specifies the service name to use for any traces created
|
||||
// Default: nginx
|
||||
DatadogServiceName string `json:"datadog-service-name"`
|
||||
|
|
@ -823,6 +827,7 @@ func NewDefault() Configuration {
|
|||
JaegerSamplerPort: 5778,
|
||||
JaegerSamplerHost: "http://127.0.0.1",
|
||||
DatadogServiceName: "nginx",
|
||||
DatadogEnvironment: "prod",
|
||||
DatadogCollectorPort: 8126,
|
||||
DatadogOperationNameOverride: "nginx.handle",
|
||||
DatadogSampleRate: 1.0,
|
||||
|
|
|
|||
|
|
@ -1046,6 +1046,7 @@ const datadogTmpl = `{
|
|||
"service": "{{ .DatadogServiceName }}",
|
||||
"agent_host": "{{ .DatadogCollectorHost }}",
|
||||
"agent_port": {{ .DatadogCollectorPort }},
|
||||
"environment": "{{ .DatadogEnvironment }}",
|
||||
"operation_name_override": "{{ .DatadogOperationNameOverride }}",
|
||||
"sample_rate": {{ .DatadogSampleRate }},
|
||||
"dd.priority.sampling": {{ .DatadogPrioritySampling }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue