Polish "Reapply "Merge pull request #41213 from timpeeters""

See gh-41213
This commit is contained in:
Moritz Halbritter 2024-09-06 09:45:58 +02:00
parent e39d9434ea
commit 9a81796e62
6 changed files with 97 additions and 46 deletions

View File

@ -20,6 +20,7 @@ import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
import org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp.Compression;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
@ -82,18 +83,4 @@ public class OtlpLoggingProperties {
return this.headers;
}
public enum Compression {
/**
* Gzip compression.
*/
GZIP,
/**
* No compression.
*/
NONE
}
}

View File

@ -0,0 +1,37 @@
/*
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp;
/**
* Algorithm used to compress OTLP data.
*
* @author Moritz Halbritter
* @since 3.4.0
*/
public enum Compression {
/**
* Gzip compression.
*/
GZIP,
/**
* No compression.
*/
NONE
}

View File

@ -0,0 +1,37 @@
/*
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp;
/**
* Transport used to send OTLP data.
*
* @author Moritz Halbritter
* @since 3.4.0
*/
public enum Transport {
/**
* HTTP transport.
*/
HTTP,
/**
* gRPC transport.
*/
GRPC
}

View File

@ -0,0 +1,20 @@
/*
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Classes for OpenTelemetry's OTLP.
*/
package org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp;

View File

@ -20,6 +20,8 @@ import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
import org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp.Compression;
import org.springframework.boot.actuate.autoconfigure.opentelemetry.otlp.Transport;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
@ -99,32 +101,4 @@ public class OtlpProperties {
this.headers = headers;
}
public enum Transport {
/**
* HTTP transport.
*/
HTTP,
/**
* gRPC transport.
*/
GRPC
}
public enum Compression {
/**
* Gzip compression.
*/
GZIP,
/**
* No compression.
*/
NONE
}
}

View File

@ -2058,10 +2058,6 @@
"type": "java.lang.Boolean",
"description": "Whether auto-configuration of tracing is enabled to export OTLP traces."
},
{
"name": "management.otlp.tracing.transport",
"defaultValue": "http"
},
{
"name": "management.server.add-application-context-header",
"type": "java.lang.Boolean",