From 89d5b3b3337c576d3e2abf297a2b4abe4d78ed8d Mon Sep 17 00:00:00 2001 From: Andrew Pielage Date: Mon, 2 Oct 2023 09:11:01 +0100 Subject: [PATCH 1/5] FISH-7278 Remove redundant dependency Signed-off-by: Andrew Pielage --- api/payara-bom/pom.xml | 6 ------ core/pom.xml | 1 - 2 files changed, 7 deletions(-) diff --git a/api/payara-bom/pom.xml b/api/payara-bom/pom.xml index fc9c7cc1dd7..0a582b3f96e 100644 --- a/api/payara-bom/pom.xml +++ b/api/payara-bom/pom.xml @@ -252,12 +252,6 @@ ${opentelemetry.version} provided - - io.opentelemetry - opentelemetry-api-logs - ${opentelemetry.alpha26.version} - provided - io.opentelemetry opentelemetry-sdk-extension-autoconfigure-spi diff --git a/core/pom.xml b/core/pom.xml index 6b9d8de4ce7..ce104524126 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -147,7 +147,6 @@ build-217-jenkins-16 1.29.0 1.29.0-alpha - 1.26.0-alpha 7.4.0 1.64 3.0.0 From fe6783ac88189c89283fc34c10059ca4770e46c5 Mon Sep 17 00:00:00 2001 From: Alfonso Altamirano Date: Tue, 3 Oct 2023 17:51:49 -0600 Subject: [PATCH 2/5] FISH-7776: fixing naming for span to pass tck issues --- .../telemetry/tracing/WithSpanMethodInterceptor.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/appserver/payara-appserver-modules/microprofile/telemetry/src/main/java/fish/payara/microprofile/telemetry/tracing/WithSpanMethodInterceptor.java b/appserver/payara-appserver-modules/microprofile/telemetry/src/main/java/fish/payara/microprofile/telemetry/tracing/WithSpanMethodInterceptor.java index dbfc7d334f0..095f29f9ac6 100644 --- a/appserver/payara-appserver-modules/microprofile/telemetry/src/main/java/fish/payara/microprofile/telemetry/tracing/WithSpanMethodInterceptor.java +++ b/appserver/payara-appserver-modules/microprofile/telemetry/src/main/java/fish/payara/microprofile/telemetry/tracing/WithSpanMethodInterceptor.java @@ -274,8 +274,13 @@ private boolean isWebServiceMethod(InvocationContext invocationContext, Invocati private String getWithSpanValue(final InvocationContext invocationContext, final WithSpan withSpan) { final String withSpanValue = withSpan.value(); if (withSpanValue.isEmpty()) { - return invocationContext.getMethod().getDeclaringClass().getCanonicalName() - + "." + invocationContext.getMethod().getName(); + if(invocationContext.getMethod().getDeclaringClass().getName().contains("$")) { + return invocationContext.getMethod().getDeclaringClass().getSimpleName() + + "." + invocationContext.getMethod().getName(); + } else { + return invocationContext.getMethod().getDeclaringClass().getCanonicalName() + + "." + invocationContext.getMethod().getName(); + } } return withSpanValue; } From b1b76ad063dfa28c70d714511e7094faa06c7a14 Mon Sep 17 00:00:00 2001 From: Alfonso Altamirano Date: Tue, 3 Oct 2023 18:11:51 -0600 Subject: [PATCH 3/5] FISH-7776: improving code format --- .../telemetry/tracing/WithSpanMethodInterceptor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appserver/payara-appserver-modules/microprofile/telemetry/src/main/java/fish/payara/microprofile/telemetry/tracing/WithSpanMethodInterceptor.java b/appserver/payara-appserver-modules/microprofile/telemetry/src/main/java/fish/payara/microprofile/telemetry/tracing/WithSpanMethodInterceptor.java index 095f29f9ac6..778a8058ce6 100644 --- a/appserver/payara-appserver-modules/microprofile/telemetry/src/main/java/fish/payara/microprofile/telemetry/tracing/WithSpanMethodInterceptor.java +++ b/appserver/payara-appserver-modules/microprofile/telemetry/src/main/java/fish/payara/microprofile/telemetry/tracing/WithSpanMethodInterceptor.java @@ -274,8 +274,8 @@ private boolean isWebServiceMethod(InvocationContext invocationContext, Invocati private String getWithSpanValue(final InvocationContext invocationContext, final WithSpan withSpan) { final String withSpanValue = withSpan.value(); if (withSpanValue.isEmpty()) { - if(invocationContext.getMethod().getDeclaringClass().getName().contains("$")) { - return invocationContext.getMethod().getDeclaringClass().getSimpleName() + if (invocationContext.getMethod().getDeclaringClass().getName().contains("$")) { + return invocationContext.getMethod().getDeclaringClass().getSimpleName() + "." + invocationContext.getMethod().getName(); } else { return invocationContext.getMethod().getDeclaringClass().getCanonicalName() From cb0c2d829f312a854b87050eeda64f57e686b563 Mon Sep 17 00:00:00 2001 From: Alfonso Altamirano Date: Wed, 4 Oct 2023 12:45:37 -0600 Subject: [PATCH 4/5] FISH-7776: fixing opentelemetry samples --- .../payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appserver/tests/payara-samples/samples/opentelemetry/src/test/java/fish/payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java b/appserver/tests/payara-samples/samples/opentelemetry/src/test/java/fish/payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java index dba27c137b6..5e163b64fa5 100644 --- a/appserver/tests/payara-samples/samples/opentelemetry/src/test/java/fish/payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java +++ b/appserver/tests/payara-samples/samples/opentelemetry/src/test/java/fish/payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java @@ -138,8 +138,8 @@ public void spanChild() { spanBean.spanChild(); var spans = exporter.getSpans(); assertEquals(2, spans.size()); - assertEquals("fish.payara.samples.otel.annotation.SpanBean.SpanChildBean.spanChild", spans.get(0).getName()); - assertEquals("fish.payara.samples.otel.annotation.SpanBean.spanChild", spans.get(1).getName()); + assertEquals("SpanChildBean.spanChild", spans.get(0).getName()); + assertEquals("SpanBean.spanChild", spans.get(1).getName()); assertEquals(spans.get(0).getParentSpanId(), spans.get(1).getSpanId()); } From 3134d345af6f7d77626e49c252b30060b8661913 Mon Sep 17 00:00:00 2001 From: Alfonso Altamirano Date: Wed, 4 Oct 2023 13:00:28 -0600 Subject: [PATCH 5/5] FISH-7776: fixing opentelemetry sample for not a subclassing name --- .../payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appserver/tests/payara-samples/samples/opentelemetry/src/test/java/fish/payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java b/appserver/tests/payara-samples/samples/opentelemetry/src/test/java/fish/payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java index 5e163b64fa5..ca53890a45f 100644 --- a/appserver/tests/payara-samples/samples/opentelemetry/src/test/java/fish/payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java +++ b/appserver/tests/payara-samples/samples/opentelemetry/src/test/java/fish/payara/samples/otel/spanname/OpenTelemetryWithSpanIT.java @@ -139,7 +139,7 @@ public void spanChild() { var spans = exporter.getSpans(); assertEquals(2, spans.size()); assertEquals("SpanChildBean.spanChild", spans.get(0).getName()); - assertEquals("SpanBean.spanChild", spans.get(1).getName()); + assertEquals("fish.payara.samples.otel.annotation.SpanBean.spanChild", spans.get(1).getName()); assertEquals(spans.get(0).getParentSpanId(), spans.get(1).getSpanId()); }