From 516d1d39ff22a9f50bb5ffa79607512725d63b11 Mon Sep 17 00:00:00 2001 From: EddeCCC Date: Wed, 14 Feb 2024 15:49:36 +0100 Subject: [PATCH 1/5] update OpenTelemetryProtoConverter --- build.gradle | 4 +--- gradle.properties | 7 +++--- .../OpenTelemetryProtoConverter.java | 23 +++++++++++-------- .../exporters/ExporterIntMockMvcTestBase.java | 8 ++----- .../ExporterIntTestBaseWithOtelCollector.java | 9 ++++---- .../OpenTelemetryProtoConverterTest.java | 22 +++++++++--------- .../resources/ot-trace-large-v0.18.2.json | 6 ++--- .../resources/ot-trace-small-v0.18.2.json | 6 ++--- 8 files changed, 42 insertions(+), 43 deletions(-) diff --git a/build.gradle b/build.gradle index 7f89d58..dbd45da 100644 --- a/build.gradle +++ b/build.gradle @@ -137,8 +137,6 @@ dependencies { "io.opencensus:opencensus-impl:${openCensusVersion}", "io.opencensus:opencensus-exporter-stats-prometheus:${openCensusVersion}", - //"io.grpc:grpc-context:1.58.0", - platform("io.opentelemetry:opentelemetry-bom-alpha:${openTelemetryAlphaVersion}"), "io.opentelemetry:opentelemetry-semconv", platform("io.opentelemetry:opentelemetry-bom:${openTelemetryVersion}"), @@ -146,7 +144,7 @@ dependencies { "io.opentelemetry:opentelemetry-exporter-jaeger", "io.opentelemetry:opentelemetry-exporter-jaeger-thrift", "io.opentelemetry:opentelemetry-sdk", - "io.opentelemetry:opentelemetry-proto:${openTelemetryProtoVersion}", + "io.opentelemetry.proto:opentelemetry-proto:${openTelemetryProtoVersion}", "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", diff --git a/gradle.properties b/gradle.properties index d678f7c..4a1ffc0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # The boomerang version to ship with the EUM server boomerangVersion=1.737.0 -# The open-telemetry-boomerang version to ship with the EUM server -boomerangOpenTelemetryPluginVersion=0.25.0-8 +# The OpenTelemetry-Boomerang version to ship with the EUM server +boomerangOpenTelemetryPluginVersion=0.25.0-9 # Upgrade to Spring 3.* and Java 17 springBootVersion=3.1.4 # CVE-2022-1471 was resolved with SnakeYAML 2.0 @@ -13,7 +13,8 @@ openCensusVersion=0.31.1 prometheusClientVersion = 0.6.0 openTelemetryVersion=1.27.0 openTelemetryAlphaVersion=1.27.0-alpha -openTelemetryProtoVersion=1.7.1-alpha +# The OTLP version, which the 'exporter-trace-otlp-http' of the OpenTelemetry-Boomerang plugin uses +openTelemetryProtoVersion=0.20.0-alpha protobufVersion=3.22.5 guavaVersion=32.1.2-jre geoip2Version=4.0.1 diff --git a/src/main/java/rocks/inspectit/oce/eum/server/tracing/opentelemtry/OpenTelemetryProtoConverter.java b/src/main/java/rocks/inspectit/oce/eum/server/tracing/opentelemtry/OpenTelemetryProtoConverter.java index 7029f91..922ffe5 100644 --- a/src/main/java/rocks/inspectit/oce/eum/server/tracing/opentelemtry/OpenTelemetryProtoConverter.java +++ b/src/main/java/rocks/inspectit/oce/eum/server/tracing/opentelemtry/OpenTelemetryProtoConverter.java @@ -4,9 +4,9 @@ import com.google.common.collect.ImmutableMap; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest; -import io.opentelemetry.proto.common.v1.InstrumentationLibrary; -import io.opentelemetry.proto.trace.v1.InstrumentationLibrarySpans; +import io.opentelemetry.proto.common.v1.InstrumentationScope; import io.opentelemetry.proto.trace.v1.ResourceSpans; +import io.opentelemetry.proto.trace.v1.ScopeSpans; import io.opentelemetry.sdk.common.InstrumentationScopeInfo; import io.opentelemetry.sdk.resources.Resource; import io.opentelemetry.sdk.trace.OcelotSpanUtils; @@ -49,9 +49,9 @@ public Collection convert(ExportTraceServiceRequest data) { Map customSpanAttributes = getCustomSpanAttributes(); - resourceSpans.getInstrumentationLibrarySpansList() + resourceSpans.getScopeSpansList() .stream() - .flatMap(librarySpans -> toSpanData(librarySpans, resource, customSpanAttributes)) + .flatMap(scopeSpans -> toSpanData(scopeSpans, resource, customSpanAttributes)) .forEach(result::add); } @@ -59,13 +59,16 @@ public Collection convert(ExportTraceServiceRequest data) { } /** - * @return Converts an {@link InstrumentationLibrarySpans} instance to a stream of individual {@link SpanData} instances. + * @return Converts an {@link ScopeSpans} instance to a stream of individual {@link SpanData} instances. */ - private Stream toSpanData(InstrumentationLibrarySpans librarySpans, Resource resource, Map customSpanAttributes) { - InstrumentationLibrary library = librarySpans.getInstrumentationLibrary(); - InstrumentationScopeInfo instrumentationScopeInfo = InstrumentationScopeInfo.builder(library.getName()).setVersion(library.getVersion()).build(); - - return librarySpans.getSpansList() + private Stream toSpanData(ScopeSpans scopeSpans, Resource resource, Map customSpanAttributes) { + InstrumentationScope scope = scopeSpans.getScope(); + InstrumentationScopeInfo instrumentationScopeInfo = InstrumentationScopeInfo + .builder(scope.getName()) + .setVersion(scope.getVersion()) + .build(); + + return scopeSpans.getSpansList() .stream() .map(protoSpan -> OcelotSpanUtils.createSpanData(protoSpan, resource, instrumentationScopeInfo, customSpanAttributes)) .filter(Objects::nonNull); diff --git a/src/test/java/rocks/inspectit/oce/eum/server/exporters/ExporterIntMockMvcTestBase.java b/src/test/java/rocks/inspectit/oce/eum/server/exporters/ExporterIntMockMvcTestBase.java index 09aaf42..bf3e57a 100644 --- a/src/test/java/rocks/inspectit/oce/eum/server/exporters/ExporterIntMockMvcTestBase.java +++ b/src/test/java/rocks/inspectit/oce/eum/server/exporters/ExporterIntMockMvcTestBase.java @@ -1,12 +1,9 @@ package rocks.inspectit.oce.eum.server.exporters; -import io.prometheus.client.CollectorRegistry; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.http.MediaType; @@ -92,11 +89,10 @@ protected void postSpan(String traceId) throws Exception { * * @param traceId the trace id * - * @return + * @return String of a dummy span with provided trace id */ private String getSpanString(String traceId) { String now = System.currentTimeMillis() + "000001"; - return "{\"resourceSpans\":[{\"resource\":{\"attributes\":[{\"key\":\"service.name\",\"value\":{\"stringValue\":\"" + SERVICE_NAME + "\"}},{\"key\":\"telemetry.sdk.language\",\"value\":{\"stringValue\":\"webjs\"}},{\"key\":\"telemetry.sdk.name\",\"value\":{\"stringValue\":\"opentelemetry\"}},{\"key\":\"telemetry.sdk.version\",\"value\":{\"stringValue\":\"0.18.2\"}}],\"droppedAttributesCount\":0},\"instrumentationLibrarySpans\":[{\"spans\":[{\"traceId\":\"" + traceId + "\",\"spanId\":\"fc3d735ad8dd7399\",\"name\":\"HTTP GET\",\"kind\":3,\"startTimeUnixNano\":" + now + ",\"endTimeUnixNano\":" + now + ",\"attributes\":[{\"key\":\"http.method\",\"value\":{\"stringValue\":\"GET\"}},{\"key\":\"http.url\",\"value\":{\"stringValue\":\"http://localhost:1337?command=undefined\"}},{\"key\":\"http.response_content_length\",\"value\":{\"intValue\":665}},{\"key\":\"http.status_code\",\"value\":{\"intValue\":200}},{\"key\":\"http.status_text\",\"value\":{\"stringValue\":\"OK\"}},{\"key\":\"http.host\",\"value\":{\"stringValue\":\"localhost:1337\"}},{\"key\":\"http.scheme\",\"value\":{\"stringValue\":\"http\"}},{\"key\":\"http.user_agent\",\"value\":{\"stringValue\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36\"}}],\"droppedAttributesCount\":0,\"events\":[{\"timeUnixNano\":1619187815416888600,\"name\":\"open\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815417378600,\"name\":\"send\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815418218800,\"name\":\"fetchStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815420648700,\"name\":\"domainLookupStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815420648700,\"name\":\"domainLookupEnd\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815420648700,\"name\":\"connectStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619170468572063700,\"name\":\"secureConnectionStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815723468800,\"name\":\"connectEnd\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815723523600,\"name\":\"requestStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815732868600,\"name\":\"responseStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815734768600,\"name\":\"responseEnd\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815735928600,\"name\":\"loaded\",\"attributes\":[],\"droppedAttributesCount\":0}],\"droppedEventsCount\":0,\"status\":{\"code\":0},\"links\":[],\"droppedLinksCount\":0}],\"instrumentationLibrary\":{\"name\":\"@opentelemetry/instrumentation-xml-http-request\",\"version\":\"0.18.2\"}}]}]}"; + return "{\"resourceSpans\":[{\"resource\":{\"attributes\":[{\"key\":\"service.name\",\"value\":{\"stringValue\":\"" + SERVICE_NAME + "\"}},{\"key\":\"telemetry.sdk.language\",\"value\":{\"stringValue\":\"webjs\"}},{\"key\":\"telemetry.sdk.name\",\"value\":{\"stringValue\":\"opentelemetry\"}},{\"key\":\"telemetry.sdk.version\",\"value\":{\"stringValue\":\"0.18.2\"}}],\"droppedAttributesCount\":0},\"scopeSpans\":[{\"spans\":[{\"traceId\":\"" + traceId + "\",\"spanId\":\"fc3d735ad8dd7399\",\"name\":\"HTTP GET\",\"kind\":3,\"startTimeUnixNano\":" + now + ",\"endTimeUnixNano\":" + now + ",\"attributes\":[{\"key\":\"http.method\",\"value\":{\"stringValue\":\"GET\"}},{\"key\":\"http.url\",\"value\":{\"stringValue\":\"http://localhost:1337?command=undefined\"}},{\"key\":\"http.response_content_length\",\"value\":{\"intValue\":665}},{\"key\":\"http.status_code\",\"value\":{\"intValue\":200}},{\"key\":\"http.status_text\",\"value\":{\"stringValue\":\"OK\"}},{\"key\":\"http.host\",\"value\":{\"stringValue\":\"localhost:1337\"}},{\"key\":\"http.scheme\",\"value\":{\"stringValue\":\"http\"}},{\"key\":\"http.user_agent\",\"value\":{\"stringValue\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36\"}}],\"droppedAttributesCount\":0,\"events\":[{\"timeUnixNano\":1619187815416888600,\"name\":\"open\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815417378600,\"name\":\"send\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815418218800,\"name\":\"fetchStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815420648700,\"name\":\"domainLookupStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815420648700,\"name\":\"domainLookupEnd\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815420648700,\"name\":\"connectStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619170468572063700,\"name\":\"secureConnectionStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815723468800,\"name\":\"connectEnd\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815723523600,\"name\":\"requestStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815732868600,\"name\":\"responseStart\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815734768600,\"name\":\"responseEnd\",\"attributes\":[],\"droppedAttributesCount\":0},{\"timeUnixNano\":1619187815735928600,\"name\":\"loaded\",\"attributes\":[],\"droppedAttributesCount\":0}],\"droppedEventsCount\":0,\"status\":{\"code\":0},\"links\":[],\"droppedLinksCount\":0}],\"scope\":{\"name\":\"@opentelemetry/instrumentation-xml-http-request\",\"version\":\"0.18.2\"}}]}]}"; } - } diff --git a/src/test/java/rocks/inspectit/oce/eum/server/exporters/ExporterIntTestBaseWithOtelCollector.java b/src/test/java/rocks/inspectit/oce/eum/server/exporters/ExporterIntTestBaseWithOtelCollector.java index 8f7e1d0..48e5381 100644 --- a/src/test/java/rocks/inspectit/oce/eum/server/exporters/ExporterIntTestBaseWithOtelCollector.java +++ b/src/test/java/rocks/inspectit/oce/eum/server/exporters/ExporterIntTestBaseWithOtelCollector.java @@ -12,6 +12,7 @@ import io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse; import io.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest; import io.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse; +import io.opentelemetry.proto.trace.v1.ScopeSpans; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; @@ -170,9 +171,9 @@ protected void awaitSpansExported(String expectedTraceId) { Stream> spansLis = grpcServer.traceRequests.stream() .flatMap(tr -> tr.getResourceSpansList() .stream() - .flatMap(rs -> rs.getInstrumentationLibrarySpansList() + .flatMap(rs -> rs.getScopeSpansList() .stream() - .map(ils -> ils.getSpansList()))); + .map(ScopeSpans::getSpansList))); assertThat(spansLis.anyMatch(s -> s.stream() .anyMatch(span -> TraceId.fromBytes(span.getTraceId().toByteArray()) @@ -207,7 +208,7 @@ protected void awaitMetricsExported(String metricName, double value, ViewDefinit .stream() .anyMatch(rm -> // check for the given metrics - rm.getInstrumentationLibraryMetrics(0) + rm.getScopeMetrics(0) .getMetricsList() .stream() .filter(metric -> metric.getName().equalsIgnoreCase(metricName)) @@ -236,7 +237,7 @@ protected void assertMetric(double value, boolean expected, ViewDefinitionSettin assertThat(grpcServer.metricRequests.stream() .anyMatch(mReq -> mReq.getResourceMetricsList() .stream() - .anyMatch(rm -> rm.getInstrumentationLibraryMetricsList() + .anyMatch(rm -> rm.getScopeMetricsList() .stream() .anyMatch(iml -> iml.getMetricsList() .stream() diff --git a/src/test/java/rocks/inspectit/oce/eum/server/tracing/opentelemtry/OpenTelemetryProtoConverterTest.java b/src/test/java/rocks/inspectit/oce/eum/server/tracing/opentelemtry/OpenTelemetryProtoConverterTest.java index 17eb7c4..790b2a7 100644 --- a/src/test/java/rocks/inspectit/oce/eum/server/tracing/opentelemtry/OpenTelemetryProtoConverterTest.java +++ b/src/test/java/rocks/inspectit/oce/eum/server/tracing/opentelemtry/OpenTelemetryProtoConverterTest.java @@ -3,12 +3,12 @@ import com.google.protobuf.util.JsonFormat; import io.opentelemetry.api.trace.SpanKind; import io.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest; -import io.opentelemetry.proto.common.v1.InstrumentationLibrary; +import io.opentelemetry.proto.common.v1.InstrumentationScope; import io.opentelemetry.proto.resource.v1.Resource; -import io.opentelemetry.proto.trace.v1.InstrumentationLibrarySpans; import io.opentelemetry.proto.trace.v1.ResourceSpans; +import io.opentelemetry.proto.trace.v1.ScopeSpans; import io.opentelemetry.proto.trace.v1.Span; -import io.opentelemetry.sdk.common.InstrumentationLibraryInfo; +import io.opentelemetry.sdk.common.InstrumentationScopeInfo; import io.opentelemetry.sdk.trace.data.EventData; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.data.StatusData; @@ -91,9 +91,9 @@ public void convertSmallRequest() throws Exception { assertThat(spanData.getLinks()).isEmpty(); assertThat(spanData.getTotalRecordedLinks()).isEqualTo(0); - InstrumentationLibraryInfo libraryInfo = spanData.getInstrumentationLibraryInfo(); - assertThat(libraryInfo.getName()).isEqualTo("my-library-name"); - assertThat(libraryInfo.getVersion()).isBlank(); + InstrumentationScopeInfo scopeInfo = spanData.getInstrumentationScopeInfo(); + assertThat(scopeInfo.getName()).isEqualTo("my-library-name"); + assertThat(scopeInfo.getVersion()).isBlank(); io.opentelemetry.sdk.resources.Resource resource = spanData.getResource(); assertThat(resource.getAttributes() @@ -134,9 +134,9 @@ public void convertLargeRequest() throws Exception { assertThat(spanData.getLinks()).isEmpty(); assertThat(spanData.getTotalRecordedLinks()).isEqualTo(2); - InstrumentationLibraryInfo libraryInfo = spanData.getInstrumentationLibraryInfo(); - assertThat(libraryInfo.getName()).isEqualTo("@opentelemetry/instrumentation-xml-http-request"); - assertThat(libraryInfo.getVersion()).isEqualTo("0.18.2"); + InstrumentationScopeInfo scopeInfo = spanData.getInstrumentationScopeInfo(); + assertThat(scopeInfo.getName()).isEqualTo("@opentelemetry/instrumentation-xml-http-request"); + assertThat(scopeInfo.getVersion()).isEqualTo("0.18.2"); io.opentelemetry.sdk.resources.Resource resource = spanData.getResource(); assertThat(resource.getAttributes() @@ -149,8 +149,8 @@ public void emptyIgnored() { ExportTraceServiceRequest data = ExportTraceServiceRequest.newBuilder() .addResourceSpans(ResourceSpans.newBuilder() .setResource(Resource.newBuilder().build()) - .addInstrumentationLibrarySpans(InstrumentationLibrarySpans.newBuilder() - .setInstrumentationLibrary(InstrumentationLibrary.newBuilder().build()) + .addScopeSpans(ScopeSpans.newBuilder() + .setScope(InstrumentationScope.newBuilder().build()) .addSpans(Span.newBuilder().build()) .build()) .build()) diff --git a/src/test/resources/ot-trace-large-v0.18.2.json b/src/test/resources/ot-trace-large-v0.18.2.json index 85da002..f2b30e0 100644 --- a/src/test/resources/ot-trace-large-v0.18.2.json +++ b/src/test/resources/ot-trace-large-v0.18.2.json @@ -30,7 +30,7 @@ ], "droppedAttributesCount": 0 }, - "instrumentationLibrarySpans": [ + "scopeSpans": [ { "spans": [ { @@ -85,7 +85,7 @@ "droppedLinksCount": 2 } ], - "instrumentationLibrary": { + "scope": { "name": "@opentelemetry/instrumentation-xml-http-request", "version": "0.18.2" } @@ -93,4 +93,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/test/resources/ot-trace-small-v0.18.2.json b/src/test/resources/ot-trace-small-v0.18.2.json index a662512..a812440 100644 --- a/src/test/resources/ot-trace-small-v0.18.2.json +++ b/src/test/resources/ot-trace-small-v0.18.2.json @@ -30,7 +30,7 @@ ], "droppedAttributesCount": 0 }, - "instrumentationLibrarySpans": [ + "scopeSpans": [ { "spans": [ { @@ -51,11 +51,11 @@ "droppedLinksCount": 0 } ], - "instrumentationLibrary": { + "scope": { "name": "my-library-name" } } ] } ] -} \ No newline at end of file +} From 7e85820cb59bbdc88df73c353b7c4b9db45b5f3d Mon Sep 17 00:00:00 2001 From: EddeCCC Date: Fri, 16 Feb 2024 12:45:00 +0100 Subject: [PATCH 2/5] update dependencies --- build.gradle | 2 ++ gradle.properties | 21 +++++++++++---------- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index dbd45da..b088f0e 100644 --- a/build.gradle +++ b/build.gradle @@ -137,6 +137,8 @@ dependencies { "io.opencensus:opencensus-impl:${openCensusVersion}", "io.opencensus:opencensus-exporter-stats-prometheus:${openCensusVersion}", + "io.grpc:grpc-context:${grpcVersion}", + platform("io.opentelemetry:opentelemetry-bom-alpha:${openTelemetryAlphaVersion}"), "io.opentelemetry:opentelemetry-semconv", platform("io.opentelemetry:opentelemetry-bom:${openTelemetryVersion}"), diff --git a/gradle.properties b/gradle.properties index 4a1ffc0..c9cab65 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,22 +1,23 @@ # The boomerang version to ship with the EUM server boomerangVersion=1.737.0 # The OpenTelemetry-Boomerang version to ship with the EUM server -boomerangOpenTelemetryPluginVersion=0.25.0-9 +boomerangOpenTelemetryPluginVersion=0.48.0-2 + # Upgrade to Spring 3.* and Java 17 -springBootVersion=3.1.4 -# CVE-2022-1471 was resolved with SnakeYAML 2.0 -snakeYamlVersion=2.0 +springBootVersion=3.2.2 +snakeYamlVersion=2.2 + # Ensure to adapt the netty version (inspectit-ocelot-core/build.gradle) when changing the OpenCensus version openCensusVersion=0.31.1 +grpcVersion=1.61.1 # pin Prometheus client to 0.6.0 to prevent auto prefixing counter metrics with "_total" # see: https://github.com/prometheus/client_java/issues/640, https://github.com/prometheus/client_java/pull/653 prometheusClientVersion = 0.6.0 openTelemetryVersion=1.27.0 openTelemetryAlphaVersion=1.27.0-alpha -# The OTLP version, which the 'exporter-trace-otlp-http' of the OpenTelemetry-Boomerang plugin uses -openTelemetryProtoVersion=0.20.0-alpha +openTelemetryProtoVersion=1.1.0-alpha protobufVersion=3.22.5 -guavaVersion=32.1.2-jre +guavaVersion=32.1.3-jre geoip2Version=4.0.1 commonsNetVersion=3.9.0 commonsMath3Version=3.6.1 @@ -27,15 +28,15 @@ influxdbJavaVersion=2.23 okioJvmVersion=3.5.0 opencensusInfluxdbExporterVersion=1.2 -armeriaVersion=1.23.1 +armeriaVersion=1.27.1 testContainersVersion=1.18.3 ### gradle plugin versions ### Check for newer version at https://plugins.gradle.org/ # io.spring.dependency-management -springDependencyManangementVersion=1.1.3 +springDependencyManangementVersion=1.1.4 # org.owasp.dependencycheck -owaspDependencyCheckVersion=8.4.0 +owaspDependencyCheckVersion=8.4.3 # org.cyclonedx.bom cyclonedxBomVersion=1.7.4 # com.palantir.docker diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 744c64d..509c4a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 92a6d4349777f174774449cb4098a9ea3ff584a7 Mon Sep 17 00:00:00 2001 From: EddeCCC Date: Fri, 16 Feb 2024 15:12:02 +0100 Subject: [PATCH 3/5] more updates --- build.gradle | 8 ++------ gradle.properties | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index b088f0e..edf2f6b 100644 --- a/build.gradle +++ b/build.gradle @@ -157,7 +157,7 @@ dependencies { "com.maxmind.geoip2:geoip2:${geoip2Version}", "commons-net:commons-net:${commonsNetVersion}", - "org.apache.commons:commons-lang3", + "org.apache.commons:commons-lang3:${commonsLang3Version}", "org.apache.commons:commons-math3:${commonsMath3Version}", "commons-io:commons-io:${commonsIoVersion}", @@ -176,11 +176,7 @@ dependencies { testImplementation( "org.springframework.boot:spring-boot-starter-test", "io.opencensus:opencensus-impl:${openCensusVersion}", - "org.apache.httpcomponents:httpclient:4.5.14", - "org.mockito:mockito-core", - "org.junit.jupiter:junit-jupiter-api", - "org.awaitility:awaitility", - "org.mockito:mockito-junit-jupiter", + "org.apache.httpcomponents:httpclient:${httpClientVersion}", // ServerExtension "com.linecorp.armeria:armeria-junit5:${armeriaVersion}", diff --git a/gradle.properties b/gradle.properties index c9cab65..098ad8b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,26 +10,32 @@ snakeYamlVersion=2.2 # Ensure to adapt the netty version (inspectit-ocelot-core/build.gradle) when changing the OpenCensus version openCensusVersion=0.31.1 grpcVersion=1.61.1 + # pin Prometheus client to 0.6.0 to prevent auto prefixing counter metrics with "_total" # see: https://github.com/prometheus/client_java/issues/640, https://github.com/prometheus/client_java/pull/653 prometheusClientVersion = 0.6.0 openTelemetryVersion=1.27.0 openTelemetryAlphaVersion=1.27.0-alpha openTelemetryProtoVersion=1.1.0-alpha + protobufVersion=3.22.5 -guavaVersion=32.1.3-jre -geoip2Version=4.0.1 +guavaVersion=33.0.0-jre +geoip2Version=4.2.0 + +httpClientVersion=4.5.14 commonsNetVersion=3.9.0 commonsMath3Version=3.6.1 +commonsLang3Version=3.13.0 commonsIoVersion=2.11.0 + # If indluxdb-java is updated, check new version of the transitive dependency okio-jvm # If there is a higher new version, remove the dependency override of okio-jvm -influxdbJavaVersion=2.23 +influxdbJavaVersion=2.24 okioJvmVersion=3.5.0 opencensusInfluxdbExporterVersion=1.2 armeriaVersion=1.27.1 -testContainersVersion=1.18.3 +testContainersVersion=1.19.5 ### gradle plugin versions ### Check for newer version at https://plugins.gradle.org/ @@ -38,7 +44,7 @@ springDependencyManangementVersion=1.1.4 # org.owasp.dependencycheck owaspDependencyCheckVersion=8.4.3 # org.cyclonedx.bom -cyclonedxBomVersion=1.7.4 +cyclonedxBomVersion=1.8.2 # com.palantir.docker palantirDockerVersion=0.35.0 -versionsPlugin=0.48.0 +versionsPlugin=0.51.0 From 3ebf6d209df5a4384c44c738a4b176fe2a49db9e Mon Sep 17 00:00:00 2001 From: EddeCCC Date: Fri, 16 Feb 2024 15:28:48 +0100 Subject: [PATCH 4/5] update commons and protobuf --- build.gradle | 4 ++-- gradle.properties | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index edf2f6b..bd65add 100644 --- a/build.gradle +++ b/build.gradle @@ -126,6 +126,8 @@ dependencies { "org.springframework.boot:spring-boot-starter-security", "org.yaml:snakeyaml:${snakeYamlVersion}", + // Has to be included, but is transitive to spring + "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", // pin Prometheus client to 0.6.0 to prevent auto prefixing counter metrics with "_total" // see: https://github.com/prometheus/client_java/issues/640, https://github.com/prometheus/client_java/pull/653 @@ -148,8 +150,6 @@ dependencies { "io.opentelemetry:opentelemetry-sdk", "io.opentelemetry.proto:opentelemetry-proto:${openTelemetryProtoVersion}", - "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", - "com.google.protobuf:protobuf-java:${protobufVersion}", "com.google.protobuf:protobuf-java-util:${protobufVersion}", diff --git a/gradle.properties b/gradle.properties index 098ad8b..c0dd4c9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,15 +18,15 @@ openTelemetryVersion=1.27.0 openTelemetryAlphaVersion=1.27.0-alpha openTelemetryProtoVersion=1.1.0-alpha -protobufVersion=3.22.5 +protobufVersion=3.25.3 guavaVersion=33.0.0-jre geoip2Version=4.2.0 httpClientVersion=4.5.14 -commonsNetVersion=3.9.0 +commonsNetVersion=3.10.0 commonsMath3Version=3.6.1 -commonsLang3Version=3.13.0 -commonsIoVersion=2.11.0 +commonsLang3Version=3.14.0 +commonsIoVersion=2.14.0 # If indluxdb-java is updated, check new version of the transitive dependency okio-jvm # If there is a higher new version, remove the dependency override of okio-jvm From a4ed74092172ac0480a4bad4c245c35f68375166 Mon Sep 17 00:00:00 2001 From: EddeCCC Date: Fri, 16 Feb 2024 16:25:20 +0100 Subject: [PATCH 5/5] update OpenTelemetry --- build.gradle | 10 +++++----- gradle.properties | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index bd65add..064062d 100644 --- a/build.gradle +++ b/build.gradle @@ -142,12 +142,12 @@ dependencies { "io.grpc:grpc-context:${grpcVersion}", platform("io.opentelemetry:opentelemetry-bom-alpha:${openTelemetryAlphaVersion}"), - "io.opentelemetry:opentelemetry-semconv", platform("io.opentelemetry:opentelemetry-bom:${openTelemetryVersion}"), - "io.opentelemetry:opentelemetry-exporter-otlp", - "io.opentelemetry:opentelemetry-exporter-jaeger", - "io.opentelemetry:opentelemetry-exporter-jaeger-thrift", - "io.opentelemetry:opentelemetry-sdk", + "io.opentelemetry:opentelemetry-exporter-otlp:${openTelemetryVersion}", + "io.opentelemetry:opentelemetry-semconv:${openTelemetrySemConvVersion}", + "io.opentelemetry:opentelemetry-exporter-jaeger:${openTelemetryJaegerVersion}", + "io.opentelemetry:opentelemetry-exporter-jaeger-thrift:${openTelemetryJaegerVersion}", + "io.opentelemetry:opentelemetry-sdk:${openTelemetryVersion}", "io.opentelemetry.proto:opentelemetry-proto:${openTelemetryProtoVersion}", "com.google.protobuf:protobuf-java:${protobufVersion}", diff --git a/gradle.properties b/gradle.properties index c0dd4c9..3c370d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,9 +14,12 @@ grpcVersion=1.61.1 # pin Prometheus client to 0.6.0 to prevent auto prefixing counter metrics with "_total" # see: https://github.com/prometheus/client_java/issues/640, https://github.com/prometheus/client_java/pull/653 prometheusClientVersion = 0.6.0 -openTelemetryVersion=1.27.0 -openTelemetryAlphaVersion=1.27.0-alpha +# Keep the OpenTelemetry versions consistent +openTelemetryVersion=1.30.0 +openTelemetryAlphaVersion=1.30.0-alpha openTelemetryProtoVersion=1.1.0-alpha +openTelemetrySemConvVersion=1.30.1-alpha +openTelemetryJaegerVersion=1.34.1 protobufVersion=3.25.3 guavaVersion=33.0.0-jre