Skip to content

Commit

Permalink
[otel-integration] add semconv transformation for spans (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
povilasv authored Feb 19, 2025
1 parent 7de0a52 commit 00f8836
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions otel-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## OpenTelemtry-Integration

### v0.0.146 / 2025-02-19

- [Feat] Automatically convert http.request.method to http.method for spans

### v0.0.145 / 2025-02-18

- [Feat] Add agent type and service instance id to Otel Collector metrics
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.145
version: 0.0.146
keywords:
- OpenTelemetry Collector
- OpenTelemetry Agent
Expand Down
3 changes: 2 additions & 1 deletion otel-integration/k8s-helm/e2e-test/expected_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ var expectedMetrics map[string]bool = map[string]bool{
}

var expectedTracesSchemaURL = map[string]bool{
"https://opentelemetry.io/schemas/1.4.0": false,
"https://opentelemetry.io/schemas/1.4.0": false,
"https://opentelemetry.io/schemas/1.25.0": false,
}

func expectedTraces(testID string, testNs string) map[string]struct {
Expand Down
11 changes: 7 additions & 4 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.145"
version: "0.0.146"

extensions:
kubernetesDashboard:
Expand Down Expand Up @@ -190,8 +190,6 @@ opentelemetry-agent:
# Configures collector to add service.version to spanMetrics dimensions
serviceVersion:
enabled: true
# transformStatements:
# - set(attributes["http.response.status_code"], attributes["http.status_code"]) where attributes["http.response.status_code"] == nil
errorTracking:
enabled: true
dbMetrics:
Expand Down Expand Up @@ -318,7 +316,11 @@ opentelemetry-agent:
- "k8s.node.name"
# Will get the k8s resource limits
memory_limiter: null

transform/semconv:
trace_statements:
- context: span
statements:
- set(attributes["http.method"], attributes["http.request.method"]) where attributes["http.request.method"] != nil
exporters:
coralogix:
timeout: "30s"
Expand Down Expand Up @@ -387,6 +389,7 @@ opentelemetry-agent:
- k8sattributes
- resourcedetection/env
- resourcedetection/region
- transform/semconv
- batch
receivers:
- otlp
Expand Down

0 comments on commit 00f8836

Please sign in to comment.