Skip to content

Commit

Permalink
OpenTelemetry default config (#9978)
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo authored May 21, 2023
1 parent 4d57ddb commit ac9a507
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions internal/ingress/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,24 +596,27 @@ type Configuration struct {
OtelServiceName string `json:"otel-service-name"`

// OtelSampler specifies the sampler to use for any traces created
// Default: AlwaysOff
// Default: AlwaysOn
OtelSampler string `json:"otel-sampler"`

// OtelSamplerRatio specifies the sampler ratio to use for any traces created
// Default: 0.01
OtelSamplerRatio float32 `json:"otel-sampler-ratio"`

//OtelSamplerParentBased specifies the parent based sampler to be use for any traces created
// Default: false
// Default: true
OtelSamplerParentBased bool `json:"otel-sampler-parent-based"`

// MaxQueueSize specifies the max queue size for uploading traces
// Default: 2048
OtelMaxQueueSize int32 `json:"otel-max-queuesize"`

// ScheduleDelayMillis specifies the max delay between uploading traces
// Default: 5000
OtelScheduleDelayMillis int32 `json:"otel-schedule-delay-millis"`

// MaxExportBatchSize specifies the max export batch size to used when uploading traces
// Default: 512
OtelMaxExportBatchSize int32 `json:"otel-max-export-batch-size"`

// ZipkinCollectorHost specifies the host to use when uploading traces
Expand Down Expand Up @@ -975,9 +978,12 @@ func NewDefault() Configuration {
OpentelemetryConfig: "/etc/nginx/opentelemetry.toml",
OtlpCollectorPort: "4317",
OtelServiceName: "nginx",
OtelSampler: "AlwaysOff",
OtelSampler: "AlwaysOn",
OtelSamplerRatio: 0.01,
OtelSamplerParentBased: false,
OtelSamplerParentBased: true,
OtelScheduleDelayMillis: 5000,
OtelMaxExportBatchSize: 512,
OtelMaxQueueSize: 2048,
ZipkinCollectorPort: 9411,
ZipkinServiceName: "nginx",
ZipkinSampleRate: 1.0,
Expand Down

0 comments on commit ac9a507

Please sign in to comment.