Skip to content

Commit

Permalink
[opentelemetry-integration] fix otel-gateway / receiver k8sattribute …
Browse files Browse the repository at this point in the history
…collection (#446)
  • Loading branch information
povilasv committed Sep 5, 2024
1 parent 5c73a54 commit 35ac6ac
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
3 changes: 3 additions & 0 deletions otel-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## OpenTelemtry-Integration

### v0.0.101 / 2024-09-05
- [Fix] Fix Tail sampling gateway / receiver k8s attribute collection

### v0.0.100 / 2024-08-30
- [Feat] Bump collector version to `0.108.0`

Expand Down
2 changes: 1 addition & 1 deletion otel-integration/k8s-helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: otel-integration
description: OpenTelemetry Integration
version: 0.0.100
version: 0.0.101
keywords:
- OpenTelemetry Collector
- OpenTelemetry Agent
Expand Down
22 changes: 19 additions & 3 deletions otel-integration/k8s-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ global:
defaultSubsystemName: "integration"
logLevel: "warn"
collectionInterval: "30s"
version: "0.0.100"
version: "0.0.101"

extensions:
kubernetesDashboard:
Expand Down Expand Up @@ -767,6 +767,13 @@ opentelemetry-gateway:
- "service.name"
processors:
# needed for self-monitored otel colector metrics
transform/k8s_attributes:
metric_statements:
- context: resource
statements:
- set(attributes["k8s.deployment.name"], attributes["k8s.replicaset.name"])
- replace_pattern(attributes["k8s.deployment.name"], "^(.*)-[0-9a-zA-Z]+$", "$$1") where attributes["k8s.replicaset.name"] != nil
- delete_key(attributes, "k8s.replicaset.name")
k8sattributes:
filter:
node_from_env_var: KUBE_NODE_NAME
Expand Down Expand Up @@ -841,6 +848,7 @@ opentelemetry-gateway:
processors:
- transform/prometheus
- k8sattributes
- transform/k8s_attributes
- resourcedetection/env
- resourcedetection/region
- memory_limiter
Expand Down Expand Up @@ -880,10 +888,10 @@ opentelemetry-receiver:
service:
enabled: true
clusterRole:
name: "coralogix-opentelemetry-gateway"
name: "coralogix-opentelemetry-receiver"
create: true
clusterRoleBinding:
name: "coralogix-opentelemetry-gateway"
name: "coralogix-opentelemetry-receiver"
rules:
- apiGroups: [""]
resources: ["pods", "namespaces"]
Expand Down Expand Up @@ -954,6 +962,13 @@ opentelemetry-receiver:
- "service.name"
processors:
# needed for self-monitored otel colector metrics
transform/k8s_attributes:
metric_statements:
- context: resource
statements:
- set(attributes["k8s.deployment.name"], attributes["k8s.replicaset.name"])
- replace_pattern(attributes["k8s.deployment.name"], "^(.*)-[0-9a-zA-Z]+$", "$$1") where attributes["k8s.replicaset.name"] != nil
- delete_key(attributes, "k8s.replicaset.name")
k8sattributes:
filter:
node_from_env_var: KUBE_NODE_NAME
Expand Down Expand Up @@ -1028,6 +1043,7 @@ opentelemetry-receiver:
processors:
- transform/prometheus
- k8sattributes
- transform/k8s_attributes
- resourcedetection/env
- resourcedetection/region
- memory_limiter
Expand Down

0 comments on commit 35ac6ac

Please sign in to comment.