Skip to content

Commit

Permalink
k8app: bugfix: is already exist namespace - we mustn't replace it
Browse files Browse the repository at this point in the history
previously was in transform/metric_statements and overwrite some important system metrics from k8s
  • Loading branch information
d7561985 committed Nov 10, 2023
1 parent 70ba431 commit 9d8e2a2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.1.6
version: 1.1.7

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
appVersion: "1.16.0"
15 changes: 12 additions & 3 deletions charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ config:
- delete_key(attributes, "k8s.container.restart_count")
- delete_key(attributes, "k8s.container.name")
- replace_all_patterns(attributes, "key", "k8s.node.name", "nodename")
- replace_all_patterns(attributes, "key", "k8s.namespace.name", "namespace")
# - replace_all_patterns(attributes, "key", "k8s.namespace.name", "namespace")
log_statements:
- context: resource
statements:
Expand Down Expand Up @@ -303,6 +303,16 @@ config:
resource_attributes:
- key: k8s.container.name
value: "^.+$"
# must be after transform always!!!!
resource/metrics:
attributes:
# bugfix: is already exist namespace - we mustn't replace it
# previously was in transform/metric_statements and overwrite some important system metrics from k8s
- key: namespace
action: insert
from: k8s.namespace.name
- key: k8s.namespace.name
action: delete
resource:
attributes:
- key: project
Expand All @@ -328,7 +338,6 @@ config:
action: delete
- key: net.host.port
action: delete

batch:
send_batch_size: 500
send_batch_max_size: 1000
Expand Down Expand Up @@ -372,7 +381,7 @@ config:
exporters: [ logging, otlp/global ]
metrics/2:
receivers: [ prometheus ]
processors: [ memory_limiter, transform, resource, transform/metrics, batch/metrics ]
processors: [ memory_limiter, transform, resource, transform/metrics, resource/metrics, batch/metrics ]
exporters: [ logging, otlp/global ]
logs:
receivers: [ otlp, filelog ]
Expand Down

0 comments on commit 9d8e2a2

Please sign in to comment.