Use new exporter public constants in spring boot starters (#863)

This commit is contained in:
dengliming 2020-08-02 01:01:09 +08:00 committed by GitHub
parent d264bc4940
commit d362691100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 9 deletions

View File

@ -9,9 +9,9 @@ configurations.all {
ext {
versions = [
// Check https://oss.jfrog.org/libs-snapshot/io/opentelemetry/ for latest snapshot version.
opentelemetry : '0.7.0-20200729.192920-38',
opentelemetry : '0.7.0-20200731.182113-47',
// Snapshot versions can often get split into two suffixes
opentelemetryOther: '0.7.0-20200729.192920-37',
opentelemetryOther: '0.7.0-20200731.182113-46',
slf4j : "1.7.30",
guava : "20.0", // Last version to support Java 7

View File

@ -16,6 +16,10 @@
package io.opentelemetry.instrumentation.spring.autoconfigure.exporters.jaeger;
import static io.opentelemetry.exporters.jaeger.JaegerGrpcSpanExporter.DEFAULT_DEADLINE_MS;
import static io.opentelemetry.exporters.jaeger.JaegerGrpcSpanExporter.DEFAULT_ENDPOINT;
import static io.opentelemetry.exporters.jaeger.JaegerGrpcSpanExporter.DEFAULT_SERVICE_NAME;
import java.time.Duration;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ -32,9 +36,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public final class JaegerSpanExporterProperties {
private boolean enabled = true;
private String serviceName = "unknown";
private String endpoint = "localhost:14250";
private Duration spanTimeout = Duration.ofSeconds(1);
private String serviceName = DEFAULT_SERVICE_NAME;
private String endpoint = DEFAULT_ENDPOINT;
private Duration spanTimeout = Duration.ofMillis(DEFAULT_DEADLINE_MS);
public boolean isEnabled() {
return enabled;

View File

@ -16,6 +16,9 @@
package io.opentelemetry.instrumentation.spring.autoconfigure.exporters.otlp;
import static io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter.DEFAULT_DEADLINE_MS;
import static io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter.DEFAULT_ENDPOINT;
import java.time.Duration;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ -33,8 +36,8 @@ public final class OtlpGrpcSpanExporterProperties {
private boolean enabled = true;
private String serviceName = "unknown";
private String endpoint = "localhost:14250";
private Duration spanTimeout = Duration.ofSeconds(1);
private String endpoint = DEFAULT_ENDPOINT;
private Duration spanTimeout = Duration.ofMillis(DEFAULT_DEADLINE_MS);
public boolean isEnabled() {
return enabled;

View File

@ -16,6 +16,9 @@
package io.opentelemetry.instrumentation.spring.autoconfigure.exporters.zipkin;
import static io.opentelemetry.exporters.zipkin.ZipkinSpanExporter.DEFAULT_ENDPOINT;
import static io.opentelemetry.exporters.zipkin.ZipkinSpanExporter.DEFAULT_SERVICE_NAME;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
@ -29,8 +32,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class ZipkinSpanExporterProperties {
private boolean enabled = true;
private String serviceName = "unknown";
private String endpoint = "http://localhost:14250";
private String serviceName = DEFAULT_SERVICE_NAME;
private String endpoint = DEFAULT_ENDPOINT;
public boolean isEnabled() {
return enabled;