Skip to content

Commit

Permalink
Enable memory_limiter and queued_retry for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax committed Aug 27, 2020
1 parent d8585ce commit 96af61a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,14 @@ Create the k8s сluster receiver configmap with applied default values.
{{- $_ := set $resourceProcessor "attributes" (append $resourceAttributes $insertClusterNameAction) -}}
{{- end }}
{{- /* Setup default memory_limiter processor configuration */}}
{{- if hasKey $processors "memory_limiter" }}
{{- $memoryLimiter := index $processors "memory_limiter" }}
{{- $_ := set $memoryLimiter "limit_mib" (include "o11y-collector.getOtelMemLimitMib" .Values.otelK8sClusterReceiver) }}
{{- $_ := set $memoryLimiter "spike_limit_mib" (include "o11y-collector.getOtelMemSpikeLimitMib" .Values.otelK8sClusterReceiver) }}
{{- $_ := set $memoryLimiter "ballast_size_mib" (include "o11y-collector.getOtelMemBallastSizeMib" .Values.otelK8sClusterReceiver) }}
{{- end }}
{{- $config | toYaml | nindent 4 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
command:
- /otelcontribcol
- --config=/conf/relay.yaml
- --mem-ballast-size-mib={{ template "o11y-collector.getOtelMemBallastSizeMib" .Values.otelK8sClusterReceiver }}
- --metrics-addr=0.0.0.0:8888
{{- range .Values.otelK8sClusterReceiver.extraArgs }}
- {{ . }}
Expand Down
24 changes: 20 additions & 4 deletions helm-charts/o11y-collector-for-kubernetes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ otelAgent:
resourcedetection:
detectors: [env]

# memory limiter is enabled bby default.
# memory limiter is enabled by default.
memory_limiter:
# check_interval is the time between measurements of memory usage.
check_interval: 5s
Expand Down Expand Up @@ -246,7 +246,7 @@ otelAgent:
# k8s metrics pipeline
metrics:
receivers: [hostmetrics, prometheus, kubeletstats, receiver_creator]
processors: [k8s_tagger, resource/add_cluster_name, resourcedetection]
processors: [memory_limiter, k8s_tagger, resource/add_cluster_name, resourcedetection, queued_retry]
# The exporters value will set either to [signalfx] or [otlp] depending on whether we need to
# forward metrics through the standalone otel-collector which is defined by .collector.enabled config.
# The value should not be changed manually
Expand Down Expand Up @@ -300,6 +300,22 @@ otelK8sClusterReceiver:
metadata_exporters: [signalfx]

processors:
queued_retry: {}

# memory limiter is enabled by default.
memory_limiter:
# check_interval is the time between measurements of memory usage.
check_interval: 5s

# If left empty, the limit_mib value will be set to 80% of "agent.resources.limits.memory" by default
limit_mib:

# If left empty, the value spike_limit_mib will be set to 25% of "agent.resources.limits.memory" by default
spike_limit_mib:

# If left empty, the value ballast_size_mib will be set to 40% of "agent.resources.limits.memory" by default
ballast_size_mib:

# k8s_tagger to enrich its own metrics
k8s_tagger:
filter:
Expand Down Expand Up @@ -333,7 +349,7 @@ otelK8sClusterReceiver:
# default metrics pipeline
metrics:
receivers: [prometheus, k8s_cluster]
processors: [k8s_tagger, resource/add_cluster_name]
processors: [memory_limiter, k8s_tagger, resource/add_cluster_name, queued_retry]
exporters: [signalfx]


Expand Down Expand Up @@ -914,7 +930,7 @@ otelCollector:
# default metrics pipeline
metrics:
receivers: [otlp, prometheus]
processors: [k8s_tagger, resource/add_cluster_name]
processors: [memory_limiter, k8s_tagger, resource/add_cluster_name, queued_retry]
exporters: [signalfx]


Expand Down

0 comments on commit 96af61a

Please sign in to comment.