Skip to content

Commit

Permalink
[otel-integration] add status_code dimension to spanmetrics preset (#411
Browse files Browse the repository at this point in the history
)
  • Loading branch information
povilasv committed Jun 3, 2024
1 parent 3ae88a4 commit c8cb1c1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 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.76 / 2024-06-03
- [FEAT] Add Kubernetes metadata to otel collector metrics

### v0.0.75 / 2024-06-03
- [FEAT] Add status_code to spanmetrics preset

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.75
version: 0.0.76
keywords:
- OpenTelemetry Collector
- OpenTelemetry Agent
Expand Down
2 changes: 1 addition & 1 deletion otel-integration/k8s-helm/e2e-test/expected_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var expectedResourceAttributesPrometheusreceiver = map[string]string{
"k8s.node.name": "otel-integration-agent-e2e-control-plane",
"host.name": "otel-integration-agent-e2e-control-plane",
"host.id": "",
"os.type": "linux",
"k8s.pod.ip": "",
}

var expectedMetrics map[string]bool = map[string]bool{
Expand Down
16 changes: 15 additions & 1 deletion 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.75"
version: "0.0.76"

extensions:
kubernetesDashboard:
Expand Down Expand Up @@ -206,6 +206,12 @@ opentelemetry-agent:
detectors: ["gcp", "ec2"]
timeout: 2s
override: true
transform/prometheus:
error_mode: ignore
metric_statements:
- context: resource
statements:
- set(attributes["k8s.pod.ip"], attributes["net.host.name"]) where attributes["service.name"] == "opentelemetry-collector"
k8sattributes:
filter:
node_from_env_var: KUBE_NODE_NAME
Expand Down Expand Up @@ -270,6 +276,7 @@ opentelemetry-agent:
exporters:
- coralogix
processors:
- transform/prometheus
- k8sattributes
- resourcedetection/env
- resourcedetection/region
Expand Down Expand Up @@ -444,6 +451,12 @@ opentelemetry-cluster-collector:
- "k8s.job.name"
- "k8s.pod.name"
- "k8s.node.name"
transform/prometheus:
error_mode: ignore
metric_statements:
- context: resource
statements:
- set(attributes["k8s.pod.ip"], attributes["net.host.name"]) where attributes["service.name"] == "opentelemetry-infrastructure-collector"
resource/kube-events:
attributes:
- key: service.name
Expand Down Expand Up @@ -581,6 +594,7 @@ opentelemetry-cluster-collector:
exporters:
- coralogix
processors:
- transform/prometheus
- k8sattributes
- metricstransform/k8s-dashboard
- transform/k8s-dashboard
Expand Down

0 comments on commit c8cb1c1

Please sign in to comment.