Skip to content

Commit

Permalink
Never split metrics requests in batchprocessor in kube-stack helm val…
Browse files Browse the repository at this point in the history
…ues (#6928) (#6942)

Setting non-zero send_batch_max_size for metrics risks TSDB
version_conflict_engine_exception as it causes metrics grouping in es
exporter to not work properly.

(cherry picked from commit e1aa748)

Co-authored-by: Carson Ip <carsonip@users.noreply.github.com>
  • Loading branch information
mergify[bot] and carsonip authored Feb 20, 2025
1 parent c488163 commit 19bee32
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Kind can be one of:
# - breaking-change: a change to previously-documented behavior
# - deprecation: functionality that is being removed in a later release
# - bug-fix: fixes a problem in a previous version
# - enhancement: extends functionality but does not break or fix existing behavior
# - feature: new functionality
# - known-issue: problems that we are aware of in a given version
# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: bug-fix

# Change summary; a 80ish characters long description of the change.
summary: Fix TSDB version_conflict_engine_exception caused by incorrect kube-stack Helm values

# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
description: Setting non-zero send_batch_max_size for metrics risks TSDB version_conflict_engine_exception as it causes metrics grouping in es exporter to not work properly.


# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
component: "elastic-agent"

# PR URL; optional; the PR number that added the changeset.
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
# Please provide it if you are adding a fragment for a different PR.
#pr: https://github.com/owner/repo/1234

# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
# If not present is automatically filled by the tooling with the issue linked to the PR number.
#issue: https://github.com/owner/repo/1234
18 changes: 14 additions & 4 deletions deploy/helm/edot-collector/kube-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ collectors:
insecure: true
processors:
# [Batch Processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor)
batch: {}
batch: {} # inherit any values from helm chart
batch/metrics:
# explicitly set send_batch_max_size to 0, as splitting metrics requests may cause version_conflict_engine_exception in TSDB
send_batch_max_size: 0
timeout: 1s
# [Resource Detection Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor)
resourcedetection/eks:
detectors: [env, eks] # Detects resources from environment variables and EKS (Elastic Kubernetes Service).
Expand Down Expand Up @@ -482,7 +486,7 @@ collectors:
- kubeletstats
- hostmetrics
processors:
- batch
- batch/metrics
- k8sattributes
- resourcedetection/system
- resourcedetection/eks
Expand All @@ -498,7 +502,7 @@ collectors:
receivers:
- otlp
processors:
- batch
- batch/metrics
- resource/hostname
exporters:
- otlp/gateway
Expand Down Expand Up @@ -834,8 +838,14 @@ collectors:
send_batch_size: 1000
timeout: 1s
send_batch_max_size: 1500
batch/metrics:
# explicitly set send_batch_max_size to 0, as splitting metrics requests may cause version_conflict_engine_exception in TSDB
send_batch_max_size: 0
timeout: 1s
batch/aggs:
send_batch_size: 16384 # 2x the default
# explicitly set send_batch_max_size to 0, as splitting metrics requests may cause version_conflict_engine_exception in TSDB
send_batch_max_size: 0
timeout: 10s
# [Elastic Trace Processor](https://github.com/elastic/opentelemetry-collector-components/tree/main/processor/elastictraceprocessor)
elastictrace: {} # The processor enriches traces with elastic specific requirements.
Expand Down Expand Up @@ -888,7 +898,7 @@ collectors:
- elasticinframetrics
- attributes/dataset
- resource/process
- batch
- batch/metrics
exporters: [debug, elasticsearch/ecs]
metrics/otel:
receivers: [routing]
Expand Down

0 comments on commit 19bee32

Please sign in to comment.