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

Add retry_on_failure/sending_queue config to values.yaml #460

Merged
merged 7 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased

### Added

- Add `splunkPlatform.retryOnFailure` and `splunkPlatform.sendingQueue` config options to values.yaml (#460)

## [0.52.0] - 2022-06-07

### Changed
Expand Down
18 changes: 18 additions & 0 deletions helm-charts/splunk-otel-collector/templates/config/_common.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@ splunk_hec/platform_logs:
{{- if .Values.splunkPlatform.caFile }}
ca_file: /otel/etc/splunk_platform_hec_ca_file
{{- end }}
retry_on_failure:
enabled: {{ .Values.splunkPlatform.retryOnFailure.enabled }}
initial_interval: {{ .Values.splunkPlatform.retryOnFailure.initialInterval }}
max_interval: {{ .Values.splunkPlatform.retryOnFailure.maxInterval }}
max_elapsed_time: {{ .Values.splunkPlatform.retryOnFailure.maxElapsedTime }}
sending_queue:
enabled: {{ .Values.splunkPlatform.sendingQueue.enabled }}
num_consumers: {{ .Values.splunkPlatform.sendingQueue.numConsumers }}
queue_size: {{ .Values.splunkPlatform.sendingQueue.queueSize }}
{{- end }}

{{/*
Expand Down Expand Up @@ -226,6 +235,15 @@ splunk_hec/platform_metrics:
{{- if .Values.splunkPlatform.caFile }}
ca_file: /otel/etc/splunk_platform_hec_ca_file
{{- end }}
retry_on_failure:
enabled: {{ .Values.splunkPlatform.retryOnFailure.enabled }}
initial_interval: {{ .Values.splunkPlatform.retryOnFailure.initialInterval }}
max_interval: {{ .Values.splunkPlatform.retryOnFailure.maxInterval }}
max_elapsed_time: {{ .Values.splunkPlatform.retryOnFailure.maxElapsedTime }}
sending_queue:
enabled: {{ .Values.splunkPlatform.sendingQueue.enabled }}
num_consumers: {{ .Values.splunkPlatform.sendingQueue.numConsumers }}
queue_size: {{ .Values.splunkPlatform.sendingQueue.queueSize }}
{{- end }}

{{/*
Expand Down
35 changes: 35 additions & 0 deletions helm-charts/splunk-otel-collector/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,41 @@
"type": "boolean"
}
}
},
"retryOnFailure": {
"description": "Retry configurations",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"initialInterval": {
"type": "string"
},
"maxInterval": {
"type": "string"
},
"maxElapsedTime": {
"type": "string"
}
}
},
"sendingQueue": {
"description": "Batching configurations for logs/traces/metrics",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"numConsumers": {
"type": "integer"
},
"queueSize": {
"type": "integer"
}
}
}
},
"anyOf": [
Expand Down
21 changes: 21 additions & 0 deletions helm-charts/splunk-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@ splunkPlatform:
# Boolean for keeping Otel convention fields after renaming it
keepOtelConvention: true

# Refer to https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md#configuration
# for detailed examples
retryOnFailure:
enabled: true
# Time to wait after the first failure before retrying; ignored if enabled is false
initialInterval: 5s
# The upper bound on backoff; ignored if enabled is false
maxInterval: 30s
# The maximum amount of time spent trying to send a batch; ignored if enabled is false
maxElapsedTime: 300s

sendingQueue:
enabled: true
# Number of consumers that dequeue batches; ignored if enabled is false
numConsumers: 10
# Maximum number of batches kept in memory before dropping; ignored if enabled is false
# User should calculate this as num_seconds * requests_per_second where:
# num_seconds is the number of seconds to buffer in case of a backend outage
# requests_per_second is the average number of requests per seconds.
queueSize: 5000

################################################################################
# Splunk Observability configuration
################################################################################
Expand Down