Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTelemetry default config #9978

Merged
merged 1 commit into from
May 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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