Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OpenTelemetry and Instrumentation 1.28.0 -> 1.31.0 #2982

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ jacksonVersion=2.15.4

openTracingVersion=0.33.0
zipkinReporterVersion=2.17.2
opentelemetryVersion=1.28.0
opentelemetryInstrumentationVersion=1.28.0-alpha
opentelemetryVersion=1.31.0
opentelemetryInstrumentationVersion=1.31.0-alpha

# gRPC
protobufGradlePluginVersion=0.9.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientMetrics;
import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor;
import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesExtractor;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
import io.opentelemetry.semconv.SemanticAttributes;

import java.util.function.UnaryOperator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ public String getUrlFull(final HttpRequestMetaData request) {
return requestScheme + "://" + hostAndPort + '/' + request.requestTarget();
}

@Nullable
@Override
public String getServerAddress(final HttpRequestMetaData requestMetaData) {
final HostAndPort hostAndPort = requestMetaData.effectiveHostAndPort();
return hostAndPort != null ? hostAndPort.hostName() : null;
}

@Nullable
@Override
public Integer getServerPort(final HttpRequestMetaData requestMetaData) {
final HostAndPort hostAndPort = requestMetaData.effectiveHostAndPort();
return hostAndPort != null ? hostAndPort.port() : null;
}

@Override
public String getUrlScheme(final HttpRequestMetaData httpRequestMetaData) {
final String scheme = httpRequestMetaData.scheme();
Expand Down Expand Up @@ -111,4 +125,11 @@ private static List<String> getHeaderValues(final HttpHeaders headers, final Str
}
return unmodifiableList(result);
}

@Nullable
@Override
public String getNetworkType(final HttpRequestMetaData requestMetaData,
@Nullable final HttpResponseMetaData responseMetaData) {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import io.opentelemetry.context.propagation.ContextPropagators;
import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension;
import io.opentelemetry.sdk.trace.data.SpanData;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
import io.opentelemetry.semconv.SemanticAttributes;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import io.opentelemetry.context.propagation.TextMapSetter;
import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension;
import io.opentelemetry.sdk.trace.data.SpanData;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
import io.opentelemetry.semconv.SemanticAttributes;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down
Loading