Skip to content

Commit

Permalink
docs: add instruction how to keep sourceCategory for metrics (#3045)
Browse files Browse the repository at this point in the history
* docs: add instruction how to keep sourceCategory for metrics

Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>

* chore: review

---------

Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
  • Loading branch information
sumo-drosiek authored May 15, 2023
1 parent 7ce6331 commit 6a9b55b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -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
```

0 comments on commit 6a9b55b

Please sign in to comment.