Switch default OTel sampler and fix various doc inconsistencies
This commit is contained in:
parent
d1dc3e827f
commit
be7fe7864c
4 changed files with 36 additions and 26 deletions
|
@ -160,12 +160,12 @@ The following table shows a configuration option's name, type, and the default v
|
||||||
| [opentelemetry-config](#/etc/nginx/opentelemetry.toml) | string | "/etc/nginx/opentelemetry.toml" | |
|
| [opentelemetry-config](#/etc/nginx/opentelemetry.toml) | string | "/etc/nginx/opentelemetry.toml" | |
|
||||||
| [otlp-collector-host](#otlp-collector-host) | string | "" | |
|
| [otlp-collector-host](#otlp-collector-host) | string | "" | |
|
||||||
| [otlp-collector-port](#otlp-collector-port) | int | 4317 | |
|
| [otlp-collector-port](#otlp-collector-port) | int | 4317 | |
|
||||||
| [otel-max-queuesize](#otel-max-queuesize) | int | | |
|
| [otel-max-queuesize](#otel-max-queuesize) | int | 2048 | |
|
||||||
| [otel-schedule-delay-millis](#otel-schedule-delay-millis) | int | | |
|
| [otel-schedule-delay-millis](#otel-schedule-delay-millis) | int | 5000 | |
|
||||||
| [otel-max-export-batch-size](#otel-max-export-batch-size) | int | | |
|
| [otel-max-export-batch-size](#otel-max-export-batch-size) | int | 512 | |
|
||||||
| [otel-service-name](#otel-service-name) | string | "nginx" | |
|
| [otel-service-name](#otel-service-name) | string | "nginx" | |
|
||||||
| [otel-sampler](#otel-sampler) | string | "AlwaysOff" | |
|
| [otel-sampler](#otel-sampler) | string | "TraceIdRatioBased" | |
|
||||||
| [otel-sampler-parent-based](#otel-sampler-parent-based) | bool | "false" | |
|
| [otel-sampler-parent-based](#otel-sampler-parent-based) | bool | "true" | |
|
||||||
| [otel-sampler-ratio](#otel-sampler-ratio) | float | 0.01 | |
|
| [otel-sampler-ratio](#otel-sampler-ratio) | float | 0.01 | |
|
||||||
| [main-snippet](#main-snippet) | string | "" | |
|
| [main-snippet](#main-snippet) | string | "" | |
|
||||||
| [http-snippet](#http-snippet) | string | "" | |
|
| [http-snippet](#http-snippet) | string | "" | |
|
||||||
|
@ -1034,12 +1034,25 @@ Specifies the port to use when uploading traces. _**default:**_ 4317
|
||||||
|
|
||||||
Specifies the service name to use for any traces created. _**default:**_ nginx
|
Specifies the service name to use for any traces created. _**default:**_ nginx
|
||||||
|
|
||||||
## opentelemetry-trust-incoming-span: "true"
|
## opentelemetry-trust-incoming-span
|
||||||
|
|
||||||
Enables or disables using spans from incoming requests as parent for created ones. _**default:**_ true
|
Enables or disables using spans from incoming requests as parent for created ones. _**default:**_ true
|
||||||
|
|
||||||
## otel-sampler-parent-based
|
## otel-max-queuesize
|
||||||
|
|
||||||
Uses sampler implementation which by default will take a sample if parent Activity is sampled. _**default:**_ false
|
The maximum queue size. After the size is reached data are dropped. _**default:**_ 2048
|
||||||
|
|
||||||
|
## otel-schedule-delay-millis
|
||||||
|
|
||||||
|
The delay interval in milliseconds between two consecutive exports. _**default:**_ 5000
|
||||||
|
|
||||||
|
## otel-max-export-batch-size
|
||||||
|
|
||||||
|
The maximum batch size of every export. It must be smaller or equal to [otel-max-queuesize](#otel-max-queuesize). _**default:**_ 512
|
||||||
|
|
||||||
|
## otel-sampler-parent-based
|
||||||
|
|
||||||
|
Uses sampler implementation which by default will take a sample if parent Activity is sampled. _**default:**_ true
|
||||||
|
|
||||||
## otel-sampler-ratio
|
## otel-sampler-ratio
|
||||||
|
|
||||||
|
@ -1047,7 +1060,7 @@ Specifies sample rate for any traces created. _**default:**_ 0.01
|
||||||
|
|
||||||
## otel-sampler
|
## otel-sampler
|
||||||
|
|
||||||
Specifies the sampler to be used when sampling traces. The available samplers are: AlwaysOff, AlwaysOn, TraceIdRatioBased, remote. _**default:**_ AlwaysOff
|
Specifies the sampler to be used when sampling traces. The available samplers are: AlwaysOff, AlwaysOn, TraceIdRatioBased. _**default:**_ TraceIdRatioBased
|
||||||
|
|
||||||
## main-snippet
|
## main-snippet
|
||||||
|
|
||||||
|
|
|
@ -60,26 +60,23 @@ otlp-collector-port
|
||||||
# specifies the service name to use for any traces created, Default: nginx
|
# specifies the service name to use for any traces created, Default: nginx
|
||||||
otel-service-name
|
otel-service-name
|
||||||
|
|
||||||
# The maximum queue size. After the size is reached data are dropped.
|
# The maximum queue size. After the size is reached data are dropped, Default: 2048
|
||||||
otel-max-queuesize
|
otel-max-queuesize
|
||||||
|
|
||||||
# The delay interval in milliseconds between two consecutive exports.
|
# The delay interval in milliseconds between two consecutive exports, Default: 5000
|
||||||
otel-schedule-delay-millis
|
otel-schedule-delay-millis
|
||||||
|
|
||||||
# How long the export can run before it is cancelled.
|
# The maximum batch size of every export. It must be smaller or equal to otel-max-queuesize, Default: 512
|
||||||
otel-schedule-delay-millis
|
|
||||||
|
|
||||||
# The maximum batch size of every export. It must be smaller or equal to maxQueueSize.
|
|
||||||
otel-max-export-batch-size
|
otel-max-export-batch-size
|
||||||
|
|
||||||
# specifies sample rate for any traces created, Default: 0.01
|
# specifies sample rate for any traces created, Default: 0.01
|
||||||
otel-sampler-ratio
|
otel-sampler-ratio
|
||||||
|
|
||||||
# specifies the sampler to be used when sampling traces.
|
# specifies the sampler to be used when sampling traces.
|
||||||
# The available samplers are: AlwaysOn, AlwaysOff, TraceIdRatioBased, Default: AlwaysOff
|
# The available samplers are: AlwaysOn, AlwaysOff, TraceIdRatioBased, Default: TraceIdRatioBased
|
||||||
otel-sampler
|
otel-sampler
|
||||||
|
|
||||||
# Uses sampler implementation which by default will take a sample if parent Activity is sampled, Default: false
|
# Uses sampler implementation which by default will take a sample if parent Activity is sampled, Default: true
|
||||||
otel-sampler-parent-based
|
otel-sampler-parent-based
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -164,9 +161,9 @@ To install the example and collectors run:
|
||||||
otel-schedule-delay-millis: "5000"
|
otel-schedule-delay-millis: "5000"
|
||||||
otel-max-export-batch-size: "512"
|
otel-max-export-batch-size: "512"
|
||||||
otel-service-name: "nginx-proxy" # Opentelemetry resource name
|
otel-service-name: "nginx-proxy" # Opentelemetry resource name
|
||||||
otel-sampler: "AlwaysOn" # Also: AlwaysOff, TraceIdRatioBased
|
otel-sampler: "TraceIdRatioBased" # Also: AlwaysOn, AlwaysOff
|
||||||
otel-sampler-ratio: "1.0"
|
otel-sampler-ratio: "0.01"
|
||||||
otel-sampler-parent-based: "false"
|
otel-sampler-parent-based: "true"
|
||||||
metadata:
|
metadata:
|
||||||
name: ingress-nginx-controller
|
name: ingress-nginx-controller
|
||||||
namespace: ingress-nginx
|
namespace: ingress-nginx
|
||||||
|
|
|
@ -609,7 +609,7 @@ type Configuration struct {
|
||||||
OtelServiceName string `json:"otel-service-name"`
|
OtelServiceName string `json:"otel-service-name"`
|
||||||
|
|
||||||
// OtelSampler specifies the sampler to use for any traces created
|
// OtelSampler specifies the sampler to use for any traces created
|
||||||
// Default: AlwaysOn
|
// Default: TraceIdRatioBased
|
||||||
OtelSampler string `json:"otel-sampler"`
|
OtelSampler string `json:"otel-sampler"`
|
||||||
|
|
||||||
// OtelSamplerRatio specifies the sampler ratio to use for any traces created
|
// OtelSamplerRatio specifies the sampler ratio to use for any traces created
|
||||||
|
@ -620,15 +620,15 @@ type Configuration struct {
|
||||||
// Default: true
|
// Default: true
|
||||||
OtelSamplerParentBased bool `json:"otel-sampler-parent-based"`
|
OtelSamplerParentBased bool `json:"otel-sampler-parent-based"`
|
||||||
|
|
||||||
// MaxQueueSize specifies the max queue size for uploading traces
|
// OtelMaxQueueSize specifies the max queue size for uploading traces
|
||||||
// Default: 2048
|
// Default: 2048
|
||||||
OtelMaxQueueSize int32 `json:"otel-max-queuesize"`
|
OtelMaxQueueSize int32 `json:"otel-max-queuesize"`
|
||||||
|
|
||||||
// ScheduleDelayMillis specifies the max delay between uploading traces
|
// OtelScheduleDelayMillis specifies the max delay between uploading traces
|
||||||
// Default: 5000
|
// Default: 5000
|
||||||
OtelScheduleDelayMillis int32 `json:"otel-schedule-delay-millis"`
|
OtelScheduleDelayMillis int32 `json:"otel-schedule-delay-millis"`
|
||||||
|
|
||||||
// MaxExportBatchSize specifies the max export batch size to used when uploading traces
|
// OtelMaxExportBatchSize specifies the max export batch size to used when uploading traces
|
||||||
// Default: 512
|
// Default: 512
|
||||||
OtelMaxExportBatchSize int32 `json:"otel-max-export-batch-size"`
|
OtelMaxExportBatchSize int32 `json:"otel-max-export-batch-size"`
|
||||||
|
|
||||||
|
@ -886,7 +886,7 @@ func NewDefault() Configuration {
|
||||||
OpentelemetryConfig: "/etc/ingress-controller/telemetry/opentelemetry.toml",
|
OpentelemetryConfig: "/etc/ingress-controller/telemetry/opentelemetry.toml",
|
||||||
OtlpCollectorPort: "4317",
|
OtlpCollectorPort: "4317",
|
||||||
OtelServiceName: "nginx",
|
OtelServiceName: "nginx",
|
||||||
OtelSampler: "AlwaysOn",
|
OtelSampler: "TraceIdRatioBased",
|
||||||
OtelSamplerRatio: 0.01,
|
OtelSamplerRatio: 0.01,
|
||||||
OtelSamplerParentBased: true,
|
OtelSamplerParentBased: true,
|
||||||
OtelScheduleDelayMillis: 5000,
|
OtelScheduleDelayMillis: 5000,
|
||||||
|
|
|
@ -1063,7 +1063,7 @@ max_export_batch_size = {{ .OtelMaxExportBatchSize }}
|
||||||
name = "{{ .OtelServiceName }}" # Opentelemetry resource name
|
name = "{{ .OtelServiceName }}" # Opentelemetry resource name
|
||||||
|
|
||||||
[sampler]
|
[sampler]
|
||||||
name = "{{ .OtelSampler }}" # Also: AlwaysOff, TraceIdRatioBased
|
name = "{{ .OtelSampler }}"
|
||||||
ratio = {{ .OtelSamplerRatio }}
|
ratio = {{ .OtelSamplerRatio }}
|
||||||
parent_based = {{ .OtelSamplerParentBased }}
|
parent_based = {{ .OtelSamplerParentBased }}
|
||||||
`
|
`
|
||||||
|
|
Loading…
Reference in a new issue