Skip to content

Commit ff3c3ed

Browse files
committed
adopt otel exporter names
Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
1 parent 36d6c75 commit ff3c3ed

127 files changed

Lines changed: 962 additions & 199 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: operator
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Add automatic migration and deprecation warnings for OTLP exporter name changes (otlp→otlp_grpc, otlphttp→otlp_http)
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [4689]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: |
19+
The operator now automatically renames deprecated otlp and otlphttp exporters to otlp_grpc and otlp_http when upgrading to collector v0.145.0+.
20+
Deprecation warnings are emitted for existing configs using old names to help users migrate their configurations.
21+
This change aligns with the OpenTelemetry Collector's deprecation of generic OTLP exporter names in favor of explicit protocol names.
22+

apis/v1alpha1/convert_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ service:
3737
traces:
3838
receivers: [otlp]
3939
processors: [resourcedetection]
40-
exporters: [otlp]
40+
exporters: [otlp_grpc]
4141
`
4242

4343
func Test_tov1beta1_config(t *testing.T) {

apis/v1beta1/config.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"fmt"
1010
"math"
1111
"sort"
12+
"strings"
1213

1314
"dario.cat/mergo"
1415
"github.com/go-logr/logr"
@@ -323,6 +324,26 @@ func (c *Config) applyDefaultForComponentKinds(logger logr.Logger, componentKind
323324
}
324325
}
325326

327+
// Check for deprecated OTLP exporter names and emit warnings
328+
if c.Exporters.Object != nil {
329+
for exporterName := range c.Exporters.Object {
330+
if exporterName == "otlp" || strings.HasPrefix(exporterName, "otlp/") {
331+
events = append(events, EventInfo{
332+
Type: corev1.EventTypeWarning,
333+
Reason: "DeprecatedExporter",
334+
Message: fmt.Sprintf("Exporter '%s' uses deprecated name 'otlp'. Use 'otlp_grpc' instead. Config will be auto-migrated on next operator upgrade.", exporterName),
335+
})
336+
}
337+
if exporterName == "otlphttp" || strings.HasPrefix(exporterName, "otlphttp/") {
338+
events = append(events, EventInfo{
339+
Type: corev1.EventTypeWarning,
340+
Reason: "DeprecatedExporter",
341+
Message: fmt.Sprintf("Exporter '%s' uses deprecated name 'otlphttp'. Use 'otlp_http' instead. Config will be auto-migrated on next operator upgrade.", exporterName),
342+
})
343+
}
344+
}
345+
}
346+
326347
return events, nil
327348
}
328349

config/samples/core_v1alpha1_opentelemetrycollector.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
config: |
77
receivers:
8-
otlp:
8+
otlp_grpc:
99
protocols:
1010
grpc: {}
1111
http: {}

config/samples/core_v1beta1_opentelemetrycollector.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
config:
77
receivers:
8-
otlp:
8+
otlp_grpc:
99
protocols:
1010
grpc: {}
1111
http: {}

config/samples/exporter-with-tls.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ spec:
3434
batch: {}
3535
3636
exporters:
37-
otlp:
37+
otlp_grpc:
3838
endpoint: "simplest-collector-headless.default.svc:14250"
3939
tls:
4040
ca_file: "/etc/pki/ca-trust/source/service-ca/service-ca.crt"
@@ -45,4 +45,4 @@ spec:
4545
traces:
4646
receivers: [jaeger]
4747
processors: []
48-
exporters: [otlp]
48+
exporters: [otlp_grpc]

config/samples/sidecar.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spec:
66
mode: sidecar
77
config: |
88
receivers:
9-
otlp:
9+
otlp_grpc:
1010
protocols:
1111
grpc: {}
1212
http: {}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
receivers:
3-
otlp:
3+
otlp_grpc:
44
protocols:
55
grpc:
66
endpoint: 0.0.0.0:12345
7-
otlp/test:
7+
otlp_grpc/test:
88
protocols:
99
grpc:
1010
endpoint: 0.0.0.0:12346
@@ -13,5 +13,5 @@ exporters:
1313
service:
1414
pipelines:
1515
traces:
16-
receivers: [otlp, otlp/test]
16+
receivers: [otlp_grpc, otlp/test]
1717
exporters: [debug]

internal/controllers/testdata/otlp_test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
receivers:
2-
otlp:
2+
otlp_grpc:
33
protocols:
44
grpc:
55
http:
66
processors:
77
exporters:
8-
otlp:
8+
otlp_grpc:
99
endpoint: jaeger-allinone-collector-headless.chainsaw-otlp-metrics.svc:4317
1010
tls:
1111
insecure: true
@@ -17,7 +17,7 @@ service:
1717
pipelines:
1818
traces:
1919
receivers: [otlp]
20-
exporters: [otlp]
20+
exporters: [otlp_grpc]
2121
metrics:
2222
receivers: [otlp]
2323
exporters: [prometheus]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
receivers:
3-
otlp:
3+
otlp_grpc:
44
protocols:
55
grpc:
66
endpoint: 0.0.0.0:12345
7-
otlp/test:
7+
otlp_grpc/test:
88
protocols:
99
grpc:
1010
endpoint: 0.0.0.0:98765
@@ -15,5 +15,5 @@ exporters:
1515
service:
1616
pipelines:
1717
traces:
18-
receivers: [otlp, otlp/test]
18+
receivers: [otlp_grpc, otlp/test]
1919
exporters: [nop]

0 commit comments

Comments
 (0)