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 d915967 commit 539eee3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
6 changes: 6 additions & 0 deletions otel-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## 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

### v0.0.74 / 2024-05-28
- [FEAT] Bump Collector to 0.101.0
- [FEAT] Allow setting dimensions to spanMetricsMulti 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.74
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": "127.0.0.01",
}

var expectedMetrics map[string]bool = map[string]bool{
Expand Down
18 changes: 17 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.74"
version: "0.0.76"

extensions:
kubernetesDashboard:
Expand Down Expand Up @@ -128,6 +128,7 @@ opentelemetry-agent:
- name: http.method
- name: cgx.transaction
- name: cgx.transaction.root
- name: status_code
# Configures the collector to export span metrics with different histogram bucket options
# for different applications. Applications are selected and routed to different pipelines
# using OTTL. For more information see https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/routingconnector
Expand All @@ -140,6 +141,7 @@ opentelemetry-agent:
- name: http.method
- name: cgx.transaction
- name: cgx.transaction.root
- name: status_code
defaultHistogramBuckets:
[1ms, 4ms, 10ms, 20ms, 50ms, 100ms, 200ms, 500ms, 1s, 2s, 5s]
configs: []
Expand Down Expand Up @@ -204,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 @@ -268,6 +276,7 @@ opentelemetry-agent:
exporters:
- coralogix
processors:
- transform/prometheus
- k8sattributes
- resourcedetection/env
- resourcedetection/region
Expand Down Expand Up @@ -442,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 @@ -579,6 +594,7 @@ opentelemetry-cluster-collector:
exporters:
- coralogix
processors:
- transform/prometheus
- k8sattributes
- metricstransform/k8s-dashboard
- transform/k8s-dashboard
Expand Down

0 comments on commit 539eee3

Please sign in to comment.