From 6a9b55bff4d8e7ab3428220685c9f1d54cc6151e Mon Sep 17 00:00:00 2001 From: Dominik Rosiek <58699848+sumo-drosiek@users.noreply.github.com> Date: Mon, 15 May 2023 09:35:39 +0200 Subject: [PATCH] docs: add instruction how to keep sourceCategory for metrics (#3045) * docs: add instruction how to keep sourceCategory for metrics Signed-off-by: Dominik Rosiek * chore: review --------- Signed-off-by: Dominik Rosiek --- docs/best-practices.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/best-practices.md b/docs/best-practices.md index 4e7b81d346..8d66b7340d 100644 --- a/docs/best-practices.md +++ b/docs/best-practices.md @@ -34,6 +34,7 @@ - [Binding pods to linux nodes](#binding-pods-to-linux-nodes) - [Setting different resources on different nodes for logs collector](#setting-different-resources-on-different-nodes-for-logs-collector) - [Parsing log content as json](#parsing-log-content-as-json) +- [Keeping Source Category for metrics](#keeping-source-category-for-metrics) ## Overriding chart resource names with `fullnameOverride` @@ -784,3 +785,24 @@ In order to parse and store log content as json following configuration has to b [chart_readme]: ../deploy/helm/sumologic/README.md [values.yaml]: ../deploy/helm/sumologic/values.yaml + +## Keeping Source Category for metrics + +In order to keep Source Category for metrics, the following configuration can be applied: + +```yaml +metadata: + metrics: + config: + merge: + processors: + resource/delete_source_metadata: + attributes: + ## Do not remove _sourceCategory + # - key: _sourceCategory + # action: delete + - key: _sourceHost + action: delete + - key: _sourceName + action: delete +```