Skip to content

Commit 9a81796

Browse files
committed
Polish "Reapply "Merge pull request #41213 from timpeeters""
See gh-41213
1 parent e39d943 commit 9a81796

File tree

6 files changed

+97
-46
lines changed

6 files changed

+97
-46
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/logging/opentelemetry/otlp/OtlpLoggingProperties.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.HashMap;
2121
import java.util.Map;
2222

23+
import org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp.Compression;
2324
import org.springframework.boot.context.properties.ConfigurationProperties;
2425

2526
/**
@@ -82,18 +83,4 @@ public Map<String, String> getHeaders() {
8283
return this.headers;
8384
}
8485

85-
public enum Compression {
86-
87-
/**
88-
* Gzip compression.
89-
*/
90-
GZIP,
91-
92-
/**
93-
* No compression.
94-
*/
95-
NONE
96-
97-
}
98-
9986
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2012-2024 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp;
18+
19+
/**
20+
* Algorithm used to compress OTLP data.
21+
*
22+
* @author Moritz Halbritter
23+
* @since 3.4.0
24+
*/
25+
public enum Compression {
26+
27+
/**
28+
* Gzip compression.
29+
*/
30+
GZIP,
31+
32+
/**
33+
* No compression.
34+
*/
35+
NONE
36+
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2012-2024 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp;
18+
19+
/**
20+
* Transport used to send OTLP data.
21+
*
22+
* @author Moritz Halbritter
23+
* @since 3.4.0
24+
*/
25+
public enum Transport {
26+
27+
/**
28+
* HTTP transport.
29+
*/
30+
HTTP,
31+
32+
/**
33+
* gRPC transport.
34+
*/
35+
GRPC
36+
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright 2012-2023 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Classes for OpenTelemetry's OTLP.
19+
*/
20+
package org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp;

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/otlp/OtlpProperties.java

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import java.util.HashMap;
2121
import java.util.Map;
2222

23+
import org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp.Compression;
24+
import org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp.Transport;
2325
import org.springframework.boot.context.properties.ConfigurationProperties;
2426

2527
/**
@@ -99,32 +101,4 @@ public void setHeaders(Map<String, String> headers) {
99101
this.headers = headers;
100102
}
101103

102-
public enum Transport {
103-
104-
/**
105-
* HTTP transport.
106-
*/
107-
HTTP,
108-
109-
/**
110-
* gRPC transport.
111-
*/
112-
GRPC
113-
114-
}
115-
116-
public enum Compression {
117-
118-
/**
119-
* Gzip compression.
120-
*/
121-
GZIP,
122-
123-
/**
124-
* No compression.
125-
*/
126-
NONE
127-
128-
}
129-
130104
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,10 +2058,6 @@
20582058
"type": "java.lang.Boolean",
20592059
"description": "Whether auto-configuration of tracing is enabled to export OTLP traces."
20602060
},
2061-
{
2062-
"name": "management.otlp.tracing.transport",
2063-
"defaultValue": "http"
2064-
},
20652061
{
20662062
"name": "management.server.add-application-context-header",
20672063
"type": "java.lang.Boolean",

0 commit comments

Comments
 (0)