From c886cccb19b0c1922b823d5c4e4d95bbc75bf1dd Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Tue, 7 Mar 2023 23:51:37 +0100 Subject: [PATCH] Replace Outcome interface with outcome enumeration. --- .../agent/impl/context/web/ResultUtil.java | 2 +- .../agent/impl/transaction/AbstractSpan.java | 19 +-------- .../impl/transaction/DroppedSpanStats.java | 1 + .../apm/agent/impl/transaction/Outcome.java | 39 ------------------- .../apm/agent/impl/transaction/Span.java | 1 + .../agent/impl/transaction/Transaction.java | 1 + .../agent/AbstractInstrumentationTest.java | 2 +- .../co/elastic/apm/agent/MockReporter.java | 2 +- .../elastic/apm/agent/TransactionUtils.java | 2 +- .../apm/agent/impl/ElasticApmTracerTest.java | 2 +- .../impl/context/web/ResultUtilTest.java | 2 +- .../AbstractCompressionStrategyTest.java | 1 + .../impl/transaction/FastExitSpanTest.java | 1 + .../apm/agent/impl/transaction/SpanTest.java | 1 + .../impl/transaction/TransactionTest.java | 1 + .../java/specs/OutcomeStepsDefinitions.java | 2 +- .../v3/HttpClient3Instrumentation.java | 2 +- .../v4/ApacheHttpClientInstrumentation.java | 2 +- ...LegacyApacheHttpClientInstrumentation.java | 2 +- .../v4/helper/FutureCallbackWrapper.java | 2 +- .../AbstractSpanInstrumentation.java | 2 +- .../pluginapi/CaptureSpanInstrumentation.java | 2 +- .../CaptureTransactionInstrumentation.java | 2 +- .../pluginapi/TracedInstrumentation.java | 2 +- .../TransactionInstrumentationTest.java | 4 +- .../java/co/elastic/apm/api/OutcomeTest.java | 2 +- ...bstractAsyncHttpClientInstrumentation.java | 2 +- .../v1/AmazonHttpClientInstrumentation.java | 2 +- .../SQSMessageDispatchingInstrumentation.java | 2 +- .../BaseSyncClientHandlerInstrumentation.java | 2 +- .../awssdk/v2/ResponseHandlerWrapper.java | 2 +- ...eSyncClientHandlerInstrumentationTest.java | 2 +- .../awssdk/common/AbstractAwsClientIT.java | 2 +- .../agent/awslambda/AbstractLambdaTest.java | 2 +- .../awslambda/AbstractPlainLambdaTest.java | 2 +- .../AbstractStreamHandlerLambdaTest.java | 2 +- .../awslambda/ApiGatewayV1LambdaTest.java | 2 +- .../awslambda/ApiGatewayV2LambdaTest.java | 2 +- .../agent/awslambda/S3EventLambdaTest.java | 2 +- .../agent/awslambda/SNSEventLambdaTest.java | 3 +- .../agent/awslambda/SQSEventLambdaTest.java | 2 +- ...libabaResponseCallbackInstrumentation.java | 2 +- .../advice/AlibabaMonitorFilterAdvice.java | 2 +- .../advice/ApacheMonitorFilterAdvice.java | 2 +- .../AbstractDubboInstrumentationTest.java | 2 +- .../dubbo/api/impl/DubboTestApiImpl.java | 2 +- .../AbstractElasticsearchJavaTest.java | 2 +- ...sticsearchRestClientInstrumentationIT.java | 2 +- ...sticsearchRestClientInstrumentationIT.java | 2 +- ...searchRestClientInstrumentationHelper.java | 2 +- .../co/elastic/apm/agent/grpc/GrpcHelper.java | 2 +- ...AbstractGrpcClientInstrumentationTest.java | 2 +- .../grpc/AbstractGrpcContextHeadersTest.java | 2 +- ...AbstractGrpcServerInstrumentationTest.java | 2 +- .../apm/agent/grpc/GrpcHelperTest.java | 2 +- .../specs/OutcomeGrpcStepsDefinitions.java | 2 +- ...AbstractHttpClientInstrumentationTest.java | 2 +- .../BaseServerEndpointInstrumentation.java | 2 +- .../apm/agent/java_ldap/LdapClientAdvice.java | 2 +- .../agent/java_ldap/LdapClientAdviceTest.java | 2 +- .../jdbc/AbstractJdbcInstrumentationTest.java | 2 +- .../apm/agent/jms/JmsInstrumentationIT.java | 7 +--- .../co/elastic/apm/agent/kafka/KafkaIT.java | 2 +- .../apm/agent/kafka/KafkaIT_RealReporter.java | 2 +- .../AbstractMongoClientInstrumentationIT.java | 2 +- .../OkHttp3ClientAsyncInstrumentation.java | 2 +- .../okhttp/OkHttp3ClientInstrumentation.java | 2 +- .../OkHttpClientAsyncInstrumentation.java | 2 +- .../okhttp/OkHttpClientInstrumentation.java | 2 +- .../agent/opentelemetry/tracing/OTelSpan.java | 2 +- .../tracing/OTelSpanBuilder.java | 2 +- .../tracing/ElasticOpenTelemetryTest.java | 2 +- .../apm/agent/process/ProcessHelper.java | 2 +- .../apm/agent/process/ProcessHelperTest.java | 2 +- ...JobTransactionNameInstrumentationTest.java | 2 +- ...JobTransactionNameInstrumentationTest.java | 2 +- ...ractJobTransactionNameInstrumentation.java | 2 +- ...JobTransactionNameInstrumentationTest.java | 2 +- .../apm/agent/rabbitmq/RabbitMQIT.java | 2 +- .../AbstractRedisInstrumentationTest.java | 2 +- ...heduledTransactionNameInstrumentation.java | 2 +- .../AbstractScheduledInstrumentationTest.java | 2 +- ...ledTransactionNameInstrumentationTest.java | 2 +- ...ledTransactionNameInstrumentationTest.java | 2 +- .../apm/agent/servlet/ServletApiAdvice.java | 2 +- .../SpringRestTemplateAdvice.java | 2 +- .../springwebclient/WebClientSubscriber.java | 1 - .../apm/agent/struts/ActionProxyAdvice.java | 2 +- .../HttpUrlConnectionInstrumentation.java | 2 +- .../vertx/AbstractVertxWebClientHelper.java | 2 +- .../apm/agent/tracer/AbstractSpan.java | 6 +++ .../co/elastic/apm/agent/tracer/Outcome.java | 20 +++++++++- .../servlet/tests/ExternalPluginTestApp.java | 2 +- 93 files changed, 115 insertions(+), 147 deletions(-) delete mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Outcome.java diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/web/ResultUtil.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/web/ResultUtil.java index 7ee601424dc..24e42fc33be 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/web/ResultUtil.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/web/ResultUtil.java @@ -18,7 +18,7 @@ */ package co.elastic.apm.agent.impl.context.web; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import javax.annotation.Nullable; diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpan.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpan.java index 98946efb03a..36ccb6af949 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpan.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpan.java @@ -26,6 +26,7 @@ import co.elastic.apm.agent.report.ReporterConfiguration; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.tracer.dispatch.BinaryHeaderGetter; import co.elastic.apm.agent.tracer.dispatch.BinaryHeaderSetter; import co.elastic.apm.agent.tracer.dispatch.HeaderGetter; @@ -748,28 +749,12 @@ public Outcome getOutcome() { return outcome != null ? outcome : Outcome.UNKNOWN; } - /** - * Sets outcome - * - * @param outcome outcome - * @return this - */ + @Override public T withOutcome(Outcome outcome) { this.outcome = outcome; return thiz(); } - @Override - public T withOutcome(co.elastic.apm.agent.tracer.Outcome outcome) { - if (outcome.name().equals(Outcome.FAILURE.name())) { - return withOutcome(Outcome.FAILURE); - } else if (outcome.name().equals(Outcome.SUCCESS.name())) { - return withOutcome(Outcome.SUCCESS); - } else { - return withOutcome(Outcome.UNKNOWN); - } - } - /** * Sets user outcome, which has priority over outcome set through {@link #withOutcome(Outcome)} * diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java index d5372e8e015..ff25b9596bc 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java @@ -21,6 +21,7 @@ import co.elastic.apm.agent.impl.context.ServiceTarget; import co.elastic.apm.agent.objectpool.ObjectPool; import co.elastic.apm.agent.objectpool.impl.QueueBasedObjectPool; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.util.CharSequenceUtils; import co.elastic.apm.agent.tracer.pooling.Allocator; import co.elastic.apm.agent.tracer.pooling.Recyclable; diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Outcome.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Outcome.java deleted file mode 100644 index 9daf152351b..00000000000 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Outcome.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you 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 - * - * http://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 co.elastic.apm.agent.impl.transaction; - -public enum Outcome implements co.elastic.apm.agent.tracer.Outcome { - SUCCESS("success"), - FAILURE("failure"), - UNKNOWN("unknown"); - - /** - * String value used for serialization - */ - private final String stringValue; - - Outcome(String stringValue) { - this.stringValue = stringValue; - } - - @Override - public String toString() { - return stringValue; - } -} diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Span.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Span.java index 0086801dbc8..a8746d8d357 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Span.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Span.java @@ -28,6 +28,7 @@ import co.elastic.apm.agent.impl.context.web.ResultUtil; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.util.CharSequenceUtils; import co.elastic.apm.agent.tracer.pooling.Recyclable; diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java index 866a5303f97..38f0b0b3bfc 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java @@ -29,6 +29,7 @@ import co.elastic.apm.agent.metrics.Labels; import co.elastic.apm.agent.metrics.MetricRegistry; import co.elastic.apm.agent.metrics.Timer; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.util.KeyListConcurrentHashMap; import co.elastic.apm.agent.tracer.dispatch.HeaderGetter; import org.HdrHistogram.WriterReaderPhaser; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/AbstractInstrumentationTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/AbstractInstrumentationTest.java index 85c395c0b22..c6dda2d0142 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/AbstractInstrumentationTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/AbstractInstrumentationTest.java @@ -25,7 +25,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.Tracer; import co.elastic.apm.agent.impl.TracerInternalApiUtils; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.objectpool.TestObjectPoolFactory; import co.elastic.apm.agent.report.ApmServerClient; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/MockReporter.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/MockReporter.java index d9ed739ce54..dc8a5cad1e2 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/MockReporter.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/MockReporter.java @@ -24,7 +24,7 @@ import co.elastic.apm.agent.impl.metadata.MetaData; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.report.ApmServerClient; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/TransactionUtils.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/TransactionUtils.java index 8cb0c74205a..b79e663ec3d 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/TransactionUtils.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/TransactionUtils.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.impl.context.Request; import co.elastic.apm.agent.impl.context.TransactionContext; import co.elastic.apm.agent.impl.sampling.ConstantSampler; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java index 33167e50545..62f7c637880 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java @@ -28,7 +28,7 @@ import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; import co.elastic.apm.agent.impl.transaction.AbstractSpan; import co.elastic.apm.agent.impl.transaction.ElasticContext; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/context/web/ResultUtilTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/context/web/ResultUtilTest.java index 0595c11d3fc..45e4e575161 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/context/web/ResultUtilTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/context/web/ResultUtilTest.java @@ -18,7 +18,7 @@ */ package co.elastic.apm.agent.impl.context.web; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/AbstractCompressionStrategyTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/AbstractCompressionStrategyTest.java index ebc71079f71..a0906a24b83 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/AbstractCompressionStrategyTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/AbstractCompressionStrategyTest.java @@ -24,6 +24,7 @@ import co.elastic.apm.agent.configuration.converter.TimeDuration; import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.context.ServiceTarget; +import co.elastic.apm.agent.tracer.Outcome; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/FastExitSpanTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/FastExitSpanTest.java index 38189d0c258..e4bec6968b8 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/FastExitSpanTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/FastExitSpanTest.java @@ -23,6 +23,7 @@ import co.elastic.apm.agent.configuration.SpanConfiguration; import co.elastic.apm.agent.configuration.converter.TimeDuration; import co.elastic.apm.agent.impl.ElasticApmTracer; +import co.elastic.apm.agent.tracer.Outcome; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/SpanTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/SpanTest.java index dddc308aa57..2ce41cf8975 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/SpanTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/SpanTest.java @@ -24,6 +24,7 @@ import co.elastic.apm.agent.impl.TextHeaderMapAccessor; import co.elastic.apm.agent.impl.sampling.ConstantSampler; import co.elastic.apm.agent.objectpool.TestObjectPoolFactory; +import co.elastic.apm.agent.tracer.Outcome; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/TransactionTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/TransactionTest.java index 282b49b12e4..cd5328ec6d0 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/TransactionTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/transaction/TransactionTest.java @@ -25,6 +25,7 @@ import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; import co.elastic.apm.agent.report.ApmServerClient; import co.elastic.apm.agent.report.serialize.DslJsonSerializer; +import co.elastic.apm.agent.tracer.Outcome; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; diff --git a/apm-agent-core/src/test/java/specs/OutcomeStepsDefinitions.java b/apm-agent-core/src/test/java/specs/OutcomeStepsDefinitions.java index f7fa511955a..90069d652f7 100644 --- a/apm-agent-core/src/test/java/specs/OutcomeStepsDefinitions.java +++ b/apm-agent-core/src/test/java/specs/OutcomeStepsDefinitions.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.impl.context.web.ResultUtil; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import io.cucumber.java.en.Given; diff --git a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient3-plugin/src/main/java/co/elastic/apm/agent/httpclient/v3/HttpClient3Instrumentation.java b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient3-plugin/src/main/java/co/elastic/apm/agent/httpclient/v3/HttpClient3Instrumentation.java index b0614356d83..3ca44c69e5b 100644 --- a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient3-plugin/src/main/java/co/elastic/apm/agent/httpclient/v3/HttpClient3Instrumentation.java +++ b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient3-plugin/src/main/java/co/elastic/apm/agent/httpclient/v3/HttpClient3Instrumentation.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.bci.TracerAwareInstrumentation; import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.sdk.logging.Logger; diff --git a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/ApacheHttpClientInstrumentation.java b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/ApacheHttpClientInstrumentation.java index 079b69b11c3..a40c47701f6 100644 --- a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/ApacheHttpClientInstrumentation.java +++ b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/ApacheHttpClientInstrumentation.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.httpclient.v4.helper.RequestHeaderAccessor; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import net.bytebuddy.asm.Advice; diff --git a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/LegacyApacheHttpClientInstrumentation.java b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/LegacyApacheHttpClientInstrumentation.java index 4f59480cc13..c2cde4a1e74 100644 --- a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/LegacyApacheHttpClientInstrumentation.java +++ b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/LegacyApacheHttpClientInstrumentation.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.httpclient.v4.helper.RequestHeaderAccessor; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import net.bytebuddy.asm.Advice; diff --git a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/helper/FutureCallbackWrapper.java b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/helper/FutureCallbackWrapper.java index 428c7f8a64c..fd2c36c2982 100644 --- a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/helper/FutureCallbackWrapper.java +++ b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/src/main/java/co/elastic/apm/agent/httpclient/v4/helper/FutureCallbackWrapper.java @@ -18,7 +18,7 @@ */ package co.elastic.apm.agent.httpclient.v4.helper; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.tracer.pooling.Recyclable; import org.apache.http.HttpResponse; diff --git a/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/AbstractSpanInstrumentation.java b/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/AbstractSpanInstrumentation.java index ea2388148f1..042f16e4513 100644 --- a/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/AbstractSpanInstrumentation.java +++ b/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/AbstractSpanInstrumentation.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.impl.context.ServiceTarget; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import net.bytebuddy.asm.Advice; diff --git a/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/CaptureSpanInstrumentation.java b/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/CaptureSpanInstrumentation.java index b3bc82c4ce7..7f1fcb48134 100644 --- a/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/CaptureSpanInstrumentation.java +++ b/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/CaptureSpanInstrumentation.java @@ -25,7 +25,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import net.bytebuddy.asm.Advice; import net.bytebuddy.description.NamedElement; diff --git a/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/CaptureTransactionInstrumentation.java b/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/CaptureTransactionInstrumentation.java index 8f2e9cdeff3..c0f6692a55b 100644 --- a/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/CaptureTransactionInstrumentation.java +++ b/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/CaptureTransactionInstrumentation.java @@ -24,7 +24,7 @@ import co.elastic.apm.agent.configuration.CoreConfiguration; import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.PrivilegedActionUtils; import net.bytebuddy.asm.Advice; diff --git a/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/TracedInstrumentation.java b/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/TracedInstrumentation.java index 96b4a69fab1..f52b7fecca4 100644 --- a/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/TracedInstrumentation.java +++ b/apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/TracedInstrumentation.java @@ -25,7 +25,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.PrivilegedActionUtils; diff --git a/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/agent/pluginapi/TransactionInstrumentationTest.java b/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/agent/pluginapi/TransactionInstrumentationTest.java index ab3cdd5202f..cabb1fd2821 100644 --- a/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/agent/pluginapi/TransactionInstrumentationTest.java +++ b/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/agent/pluginapi/TransactionInstrumentationTest.java @@ -337,7 +337,7 @@ private void endTransaction() { assertThat(reporter.getTransactions()).hasSize(1); } - private co.elastic.apm.agent.impl.transaction.Outcome convertOutcome(Outcome apiOutcome) { - return co.elastic.apm.agent.impl.transaction.Outcome.valueOf(apiOutcome.toString()); + private co.elastic.apm.agent.tracer.Outcome convertOutcome(Outcome apiOutcome) { + return co.elastic.apm.agent.tracer.Outcome.valueOf(apiOutcome.toString()); } } diff --git a/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/OutcomeTest.java b/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/OutcomeTest.java index b738213c469..a71d022d960 100644 --- a/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/OutcomeTest.java +++ b/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/OutcomeTest.java @@ -32,7 +32,7 @@ class OutcomeTest { void apiOutcomeMatchesInternalOutcome() { Set apiEnumNames = getEnumValues(Outcome.values()); - Set internalEnumNames = getEnumValues(co.elastic.apm.agent.impl.transaction.Outcome.values()); + Set internalEnumNames = getEnumValues(co.elastic.apm.agent.tracer.Outcome.values()); assertThat(apiEnumNames) .containsExactlyInAnyOrderElementsOf(internalEnumNames); diff --git a/apm-agent-plugins/apm-asynchttpclient-plugin/src/main/java/co/elastic/apm/agent/asynchttpclient/AbstractAsyncHttpClientInstrumentation.java b/apm-agent-plugins/apm-asynchttpclient-plugin/src/main/java/co/elastic/apm/agent/asynchttpclient/AbstractAsyncHttpClientInstrumentation.java index 170267d3dfc..726783d1595 100644 --- a/apm-agent-plugins/apm-asynchttpclient-plugin/src/main/java/co/elastic/apm/agent/asynchttpclient/AbstractAsyncHttpClientInstrumentation.java +++ b/apm-agent-plugins/apm-asynchttpclient-plugin/src/main/java/co/elastic/apm/agent/asynchttpclient/AbstractAsyncHttpClientInstrumentation.java @@ -23,7 +23,7 @@ import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.sdk.DynamicTransformer; import co.elastic.apm.agent.sdk.ElasticApmInstrumentation; diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/src/main/java/co/elastic/apm/agent/awssdk/v1/AmazonHttpClientInstrumentation.java b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/src/main/java/co/elastic/apm/agent/awssdk/v1/AmazonHttpClientInstrumentation.java index 9d47c9ec0cc..dc323b84120 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/src/main/java/co/elastic/apm/agent/awssdk/v1/AmazonHttpClientInstrumentation.java +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/src/main/java/co/elastic/apm/agent/awssdk/v1/AmazonHttpClientInstrumentation.java @@ -24,7 +24,7 @@ import co.elastic.apm.agent.awssdk.v1.helper.S3Helper; import co.elastic.apm.agent.awssdk.v1.helper.SQSHelper; import co.elastic.apm.agent.awssdk.v1.helper.SdkV1DataSource; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import com.amazonaws.Request; import com.amazonaws.handlers.HandlerContextKey; diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/src/main/java/co/elastic/apm/agent/awssdk/v1/SQSMessageDispatchingInstrumentation.java b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/src/main/java/co/elastic/apm/agent/awssdk/v1/SQSMessageDispatchingInstrumentation.java index a32c139647a..ae613528e6c 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/src/main/java/co/elastic/apm/agent/awssdk/v1/SQSMessageDispatchingInstrumentation.java +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/src/main/java/co/elastic/apm/agent/awssdk/v1/SQSMessageDispatchingInstrumentation.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.awssdk.common.AbstractAwsSdkInstrumentation; import co.elastic.apm.agent.awssdk.v1.helper.SQSHelper; import co.elastic.apm.agent.awssdk.v1.helper.SdkV1DataSource; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.sdk.state.CallDepth; import com.amazonaws.AmazonWebServiceRequest; diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/main/java/co/elastic/apm/agent/awssdk/v2/BaseSyncClientHandlerInstrumentation.java b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/main/java/co/elastic/apm/agent/awssdk/v2/BaseSyncClientHandlerInstrumentation.java index 8e89e832863..64ececba111 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/main/java/co/elastic/apm/agent/awssdk/v2/BaseSyncClientHandlerInstrumentation.java +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/main/java/co/elastic/apm/agent/awssdk/v2/BaseSyncClientHandlerInstrumentation.java @@ -24,7 +24,7 @@ import co.elastic.apm.agent.awssdk.v2.helper.sqs.wrapper.MessageListWrapper; import co.elastic.apm.agent.bci.TracerAwareInstrumentation; import co.elastic.apm.agent.common.JvmRuntimeInfo; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import net.bytebuddy.asm.Advice; import net.bytebuddy.description.method.MethodDescription; diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/main/java/co/elastic/apm/agent/awssdk/v2/ResponseHandlerWrapper.java b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/main/java/co/elastic/apm/agent/awssdk/v2/ResponseHandlerWrapper.java index 61fd0eee57e..a878e0b71c7 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/main/java/co/elastic/apm/agent/awssdk/v2/ResponseHandlerWrapper.java +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/main/java/co/elastic/apm/agent/awssdk/v2/ResponseHandlerWrapper.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.awssdk.v2.helper.SQSHelper; import co.elastic.apm.agent.awssdk.v2.helper.sqs.wrapper.MessageListWrapper; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import org.reactivestreams.Publisher; import software.amazon.awssdk.core.Response; diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/test/java/co/elastic/apm/agent/awssdk/v2/BaseSyncClientHandlerInstrumentationTest.java b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/test/java/co/elastic/apm/agent/awssdk/v2/BaseSyncClientHandlerInstrumentationTest.java index 6b5e6dc6da0..c1bf45a01c3 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/test/java/co/elastic/apm/agent/awssdk/v2/BaseSyncClientHandlerInstrumentationTest.java +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/src/test/java/co/elastic/apm/agent/awssdk/v2/BaseSyncClientHandlerInstrumentationTest.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.MockTracer; import co.elastic.apm.agent.common.JvmRuntimeInfo; import co.elastic.apm.agent.impl.ElasticApmTracer; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import org.junit.jupiter.api.BeforeEach; diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/src/test/java/co/elastic/apm/agent/awssdk/common/AbstractAwsClientIT.java b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/src/test/java/co/elastic/apm/agent/awssdk/common/AbstractAwsClientIT.java index aab24389bb9..e4f98beb193 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/src/test/java/co/elastic/apm/agent/awssdk/common/AbstractAwsClientIT.java +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/src/test/java/co/elastic/apm/agent/awssdk/common/AbstractAwsClientIT.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.impl.context.ServiceTarget; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import org.testcontainers.containers.localstack.LocalStackContainer; import org.testcontainers.junit.jupiter.Container; diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractLambdaTest.java index 1e860a31274..4734d4328c9 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractLambdaTest.java +++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractLambdaTest.java @@ -27,7 +27,7 @@ import co.elastic.apm.agent.configuration.SpyConfiguration; import co.elastic.apm.agent.impl.metadata.MetaDataMock; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.TraceState; import co.elastic.apm.agent.impl.transaction.Transaction; diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractPlainLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractPlainLambdaTest.java index f7386194a6d..079532d5de4 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractPlainLambdaTest.java +++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractPlainLambdaTest.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.awslambda.lambdas.TestContext; import co.elastic.apm.agent.impl.metadata.MetaData; import co.elastic.apm.agent.impl.transaction.Faas; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.VersionUtils; import com.amazonaws.services.lambda.runtime.RequestHandler; diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractStreamHandlerLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractStreamHandlerLambdaTest.java index 512e88ad6e8..9b2acb996a1 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractStreamHandlerLambdaTest.java +++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractStreamHandlerLambdaTest.java @@ -22,7 +22,7 @@ import co.elastic.apm.agent.awslambda.lambdas.TestContext; import co.elastic.apm.agent.impl.metadata.MetaData; import co.elastic.apm.agent.impl.transaction.Faas; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.VersionUtils; import com.amazonaws.services.lambda.runtime.Context; diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java index 172072f5b11..9bdd7ec8ae3 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java +++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java @@ -27,7 +27,7 @@ import co.elastic.apm.agent.impl.context.Url; import co.elastic.apm.agent.impl.context.web.WebConfiguration; import co.elastic.apm.agent.impl.transaction.Faas; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.PotentiallyMultiValuedMap; import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent; diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java index 7367b6c6cdb..ebfc01d6225 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java +++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java @@ -28,7 +28,7 @@ import co.elastic.apm.agent.impl.context.Url; import co.elastic.apm.agent.impl.context.web.WebConfiguration; import co.elastic.apm.agent.impl.transaction.Faas; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.PotentiallyMultiValuedMap; import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent; diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/S3EventLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/S3EventLambdaTest.java index f7ba6307055..a3e5dac4db0 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/S3EventLambdaTest.java +++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/S3EventLambdaTest.java @@ -22,7 +22,7 @@ import co.elastic.apm.agent.awslambda.lambdas.S3EventLambdaFunction; import co.elastic.apm.agent.awslambda.lambdas.TestContext; import co.elastic.apm.agent.impl.transaction.Faas; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import com.amazonaws.services.lambda.runtime.events.S3Event; import com.amazonaws.services.lambda.runtime.events.models.s3.S3EventNotification; diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/SNSEventLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/SNSEventLambdaTest.java index 7f0ee894b21..be4c9fc30ce 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/SNSEventLambdaTest.java +++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/SNSEventLambdaTest.java @@ -19,11 +19,10 @@ package co.elastic.apm.agent.awslambda; import co.elastic.apm.agent.awslambda.lambdas.AbstractFunction; -import co.elastic.apm.agent.awslambda.lambdas.S3EventLambdaFunction; import co.elastic.apm.agent.awslambda.lambdas.SNSEventLambdaFunction; import co.elastic.apm.agent.awslambda.lambdas.TestContext; import co.elastic.apm.agent.impl.transaction.Faas; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; import com.amazonaws.services.lambda.runtime.events.SNSEvent; diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/SQSEventLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/SQSEventLambdaTest.java index 2ba8a5228de..b4fc9f2d9d2 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/SQSEventLambdaTest.java +++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/SQSEventLambdaTest.java @@ -22,7 +22,7 @@ import co.elastic.apm.agent.awslambda.lambdas.SQSEventLambdaFunction; import co.elastic.apm.agent.awslambda.lambdas.TestContext; import co.elastic.apm.agent.impl.transaction.Faas; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; import com.amazonaws.services.lambda.runtime.events.SQSEvent; diff --git a/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/AlibabaResponseCallbackInstrumentation.java b/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/AlibabaResponseCallbackInstrumentation.java index 2a73afc86a5..b06789b7e3c 100644 --- a/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/AlibabaResponseCallbackInstrumentation.java +++ b/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/AlibabaResponseCallbackInstrumentation.java @@ -19,7 +19,7 @@ package co.elastic.apm.agent.dubbo; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import com.alibaba.dubbo.remoting.exchange.ResponseCallback; import com.alibaba.dubbo.rpc.Result; import net.bytebuddy.asm.Advice; diff --git a/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/advice/AlibabaMonitorFilterAdvice.java b/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/advice/AlibabaMonitorFilterAdvice.java index c715612d818..a39c30025d9 100644 --- a/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/advice/AlibabaMonitorFilterAdvice.java +++ b/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/advice/AlibabaMonitorFilterAdvice.java @@ -23,7 +23,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.GlobalTracer; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.PrivilegedActionUtils; diff --git a/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/advice/ApacheMonitorFilterAdvice.java b/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/advice/ApacheMonitorFilterAdvice.java index 3990a03ecbd..7be4f3d9cfc 100644 --- a/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/advice/ApacheMonitorFilterAdvice.java +++ b/apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/advice/ApacheMonitorFilterAdvice.java @@ -23,7 +23,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.GlobalTracer; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.PrivilegedActionUtils; diff --git a/apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/AbstractDubboInstrumentationTest.java b/apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/AbstractDubboInstrumentationTest.java index b01307c776f..82ac37f7211 100644 --- a/apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/AbstractDubboInstrumentationTest.java +++ b/apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/AbstractDubboInstrumentationTest.java @@ -25,7 +25,7 @@ import co.elastic.apm.agent.impl.context.Destination; import co.elastic.apm.agent.impl.error.ErrorCapture; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.testutils.TestPort; diff --git a/apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/api/impl/DubboTestApiImpl.java b/apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/api/impl/DubboTestApiImpl.java index b2831c43b28..15f16659d36 100644 --- a/apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/api/impl/DubboTestApiImpl.java +++ b/apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/api/impl/DubboTestApiImpl.java @@ -22,7 +22,7 @@ import co.elastic.apm.agent.dubbo.api.DubboTestApi; import co.elastic.apm.agent.dubbo.api.exception.BizException; import co.elastic.apm.agent.impl.GlobalTracer; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.client.MappingBuilder; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-api-client-test/src/test/java/co/elastic/apm/esjavaclient/AbstractElasticsearchJavaTest.java b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-api-client-test/src/test/java/co/elastic/apm/esjavaclient/AbstractElasticsearchJavaTest.java index cb7c364b17e..4c3042b79a8 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-api-client-test/src/test/java/co/elastic/apm/esjavaclient/AbstractElasticsearchJavaTest.java +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-api-client-test/src/test/java/co/elastic/apm/esjavaclient/AbstractElasticsearchJavaTest.java @@ -19,7 +19,7 @@ package co.elastic.apm.esjavaclient; import co.elastic.apm.agent.esrestclient.AbstractEsClientInstrumentationTest; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.clients.elasticsearch.ElasticsearchAsyncClient; import co.elastic.clients.elasticsearch.ElasticsearchClient; diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-5_6/src/test/java/co/elastic/apm/agent/esrestclient/v5_6/ElasticsearchRestClientInstrumentationIT.java b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-5_6/src/test/java/co/elastic/apm/agent/esrestclient/v5_6/ElasticsearchRestClientInstrumentationIT.java index 14a7db67b87..ae7ccfccad7 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-5_6/src/test/java/co/elastic/apm/agent/esrestclient/v5_6/ElasticsearchRestClientInstrumentationIT.java +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-5_6/src/test/java/co/elastic/apm/agent/esrestclient/v5_6/ElasticsearchRestClientInstrumentationIT.java @@ -19,7 +19,7 @@ package co.elastic.apm.agent.esrestclient.v5_6; import co.elastic.apm.agent.esrestclient.AbstractEsClientInstrumentationTest; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-7_x/src/test/java/co/elastic/apm/agent/esrestclient/v7_x/ElasticsearchRestClientInstrumentationIT.java b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-7_x/src/test/java/co/elastic/apm/agent/esrestclient/v7_x/ElasticsearchRestClientInstrumentationIT.java index 64fb1f8d272..6cfde2f3297 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-7_x/src/test/java/co/elastic/apm/agent/esrestclient/v7_x/ElasticsearchRestClientInstrumentationIT.java +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-7_x/src/test/java/co/elastic/apm/agent/esrestclient/v7_x/ElasticsearchRestClientInstrumentationIT.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.esrestclient.v6_4.AbstractEs6_4ClientInstrumentationTest; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import org.apache.http.HttpHost; diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/ElasticsearchRestClientInstrumentationHelper.java b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/ElasticsearchRestClientInstrumentationHelper.java index 0a67e20e88d..5ba52a4210d 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/ElasticsearchRestClientInstrumentationHelper.java +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/src/main/java/co/elastic/apm/agent/esrestclient/ElasticsearchRestClientInstrumentationHelper.java @@ -22,7 +22,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.GlobalTracer; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.objectpool.ObjectPool; import co.elastic.apm.agent.sdk.logging.Logger; diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/main/java/co/elastic/apm/agent/grpc/GrpcHelper.java b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/main/java/co/elastic/apm/agent/grpc/GrpcHelper.java index 84cd71b62a9..4dec3614563 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/main/java/co/elastic/apm/agent/grpc/GrpcHelper.java +++ b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/main/java/co/elastic/apm/agent/grpc/GrpcHelper.java @@ -22,7 +22,7 @@ import co.elastic.apm.agent.impl.GlobalTracer; import co.elastic.apm.agent.impl.Tracer; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcClientInstrumentationTest.java b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcClientInstrumentationTest.java index 929067ccf3f..f971afeac9a 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcClientInstrumentationTest.java +++ b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcClientInstrumentationTest.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.grpc.testapp.GrpcApp; import co.elastic.apm.agent.grpc.testapp.GrpcAppProvider; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import org.junit.jupiter.api.AfterEach; diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcContextHeadersTest.java b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcContextHeadersTest.java index 11428570b93..51996401898 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcContextHeadersTest.java +++ b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcContextHeadersTest.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.grpc.testapp.GrpcApp; import co.elastic.apm.agent.grpc.testapp.GrpcAppProvider; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import org.junit.jupiter.api.AfterEach; diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcServerInstrumentationTest.java b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcServerInstrumentationTest.java index ba52e7e7124..084bb8675dc 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcServerInstrumentationTest.java +++ b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/AbstractGrpcServerInstrumentationTest.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.grpc.testapp.GrpcApp; import co.elastic.apm.agent.grpc.testapp.GrpcAppProvider; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/GrpcHelperTest.java b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/GrpcHelperTest.java index c0d387b14d5..d0f59ddc869 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/GrpcHelperTest.java +++ b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/co/elastic/apm/agent/grpc/GrpcHelperTest.java @@ -18,7 +18,7 @@ */ package co.elastic.apm.agent.grpc; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import io.grpc.Status; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/specs/OutcomeGrpcStepsDefinitions.java b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/specs/OutcomeGrpcStepsDefinitions.java index 275fca7d9fb..66945d9e27b 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/specs/OutcomeGrpcStepsDefinitions.java +++ b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/src/test/java/specs/OutcomeGrpcStepsDefinitions.java @@ -19,7 +19,7 @@ package specs; import co.elastic.apm.agent.grpc.GrpcHelper; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import io.cucumber.java.en.Given; import io.grpc.Status; diff --git a/apm-agent-plugins/apm-httpclient-core/src/test/java/co/elastic/apm/agent/httpclient/AbstractHttpClientInstrumentationTest.java b/apm-agent-plugins/apm-httpclient-core/src/test/java/co/elastic/apm/agent/httpclient/AbstractHttpClientInstrumentationTest.java index 974c9ba66c8..8e5aae606a9 100644 --- a/apm-agent-plugins/apm-httpclient-core/src/test/java/co/elastic/apm/agent/httpclient/AbstractHttpClientInstrumentationTest.java +++ b/apm-agent-plugins/apm-httpclient-core/src/test/java/co/elastic/apm/agent/httpclient/AbstractHttpClientInstrumentationTest.java @@ -24,7 +24,7 @@ import co.elastic.apm.agent.impl.context.Destination; import co.elastic.apm.agent.impl.context.Http; import co.elastic.apm.agent.impl.context.web.ResultUtil; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; diff --git a/apm-agent-plugins/apm-jakarta-websocket-plugin/src/main/java/co/elastic/apm/agent/websocket/BaseServerEndpointInstrumentation.java b/apm-agent-plugins/apm-jakarta-websocket-plugin/src/main/java/co/elastic/apm/agent/websocket/BaseServerEndpointInstrumentation.java index d1b9000fb8c..09aac2edce0 100644 --- a/apm-agent-plugins/apm-jakarta-websocket-plugin/src/main/java/co/elastic/apm/agent/websocket/BaseServerEndpointInstrumentation.java +++ b/apm-agent-plugins/apm-jakarta-websocket-plugin/src/main/java/co/elastic/apm/agent/websocket/BaseServerEndpointInstrumentation.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.bci.TracerAwareInstrumentation; import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import net.bytebuddy.asm.Advice; import net.bytebuddy.description.NamedElement; diff --git a/apm-agent-plugins/apm-java-ldap-plugin/src/main/java/co/elastic/apm/agent/java_ldap/LdapClientAdvice.java b/apm-agent-plugins/apm-java-ldap-plugin/src/main/java/co/elastic/apm/agent/java_ldap/LdapClientAdvice.java index 7912d64ff07..12f9a296fee 100644 --- a/apm-agent-plugins/apm-java-ldap-plugin/src/main/java/co/elastic/apm/agent/java_ldap/LdapClientAdvice.java +++ b/apm-agent-plugins/apm-java-ldap-plugin/src/main/java/co/elastic/apm/agent/java_ldap/LdapClientAdvice.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.GlobalTracer; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import com.sun.jndi.ldap.Connection; import com.sun.jndi.ldap.LdapResult; diff --git a/apm-agent-plugins/apm-java-ldap-plugin/src/test/java/co/elastic/apm/agent/java_ldap/LdapClientAdviceTest.java b/apm-agent-plugins/apm-java-ldap-plugin/src/test/java/co/elastic/apm/agent/java_ldap/LdapClientAdviceTest.java index d7b95579d32..23ec295f1c2 100644 --- a/apm-agent-plugins/apm-java-ldap-plugin/src/test/java/co/elastic/apm/agent/java_ldap/LdapClientAdviceTest.java +++ b/apm-agent-plugins/apm-java-ldap-plugin/src/test/java/co/elastic/apm/agent/java_ldap/LdapClientAdviceTest.java @@ -19,7 +19,7 @@ package co.elastic.apm.agent.java_ldap; import co.elastic.apm.agent.AbstractInstrumentationTest; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.testutils.TestPort; diff --git a/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/AbstractJdbcInstrumentationTest.java b/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/AbstractJdbcInstrumentationTest.java index 0a1fc6f974b..9900485e4ca 100644 --- a/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/AbstractJdbcInstrumentationTest.java +++ b/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/AbstractJdbcInstrumentationTest.java @@ -23,7 +23,7 @@ import co.elastic.apm.agent.db.signature.SignatureParser; import co.elastic.apm.agent.impl.context.Db; import co.elastic.apm.agent.impl.context.Destination; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.jdbc.helper.JdbcGlobalState; diff --git a/apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/src/test/java/co/elastic/apm/agent/jms/JmsInstrumentationIT.java b/apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/src/test/java/co/elastic/apm/agent/jms/JmsInstrumentationIT.java index 504207343bb..22357138b0f 100644 --- a/apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/src/test/java/co/elastic/apm/agent/jms/JmsInstrumentationIT.java +++ b/apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/src/test/java/co/elastic/apm/agent/jms/JmsInstrumentationIT.java @@ -22,19 +22,15 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.configuration.CoreConfiguration; import co.elastic.apm.agent.configuration.MessagingConfiguration; -import co.elastic.apm.agent.impl.GlobalTracer; import co.elastic.apm.agent.impl.TracerInternalApiUtils; import co.elastic.apm.agent.impl.context.Headers; import co.elastic.apm.agent.impl.sampling.ConstantSampler; import co.elastic.apm.agent.impl.sampling.Sampler; import co.elastic.apm.agent.impl.transaction.Id; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; -import co.elastic.apm.agent.jms.test.TestMessageConsumer; -import co.elastic.apm.agent.jms.test.TestMessageListener; -import co.elastic.apm.agent.jms.test.TestMsgHandler; import co.elastic.apm.agent.common.util.WildcardMatcher; import org.junit.After; import org.junit.AfterClass; @@ -47,7 +43,6 @@ import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; -import javax.jms.MessageListener; import javax.jms.Queue; import javax.jms.TemporaryQueue; import javax.jms.TextMessage; diff --git a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/src/test/java/co/elastic/apm/agent/kafka/KafkaIT.java b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/src/test/java/co/elastic/apm/agent/kafka/KafkaIT.java index 0d4c4d0cf5e..bf97de59a0b 100644 --- a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/src/test/java/co/elastic/apm/agent/kafka/KafkaIT.java +++ b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/src/test/java/co/elastic/apm/agent/kafka/KafkaIT.java @@ -29,7 +29,7 @@ import co.elastic.apm.agent.impl.context.TransactionContext; import co.elastic.apm.agent.impl.sampling.ConstantSampler; import co.elastic.apm.agent.impl.sampling.Sampler; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; diff --git a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/src/test/java/co/elastic/apm/agent/kafka/KafkaIT_RealReporter.java b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/src/test/java/co/elastic/apm/agent/kafka/KafkaIT_RealReporter.java index 30f211a612f..e4854f11ee6 100644 --- a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/src/test/java/co/elastic/apm/agent/kafka/KafkaIT_RealReporter.java +++ b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/src/test/java/co/elastic/apm/agent/kafka/KafkaIT_RealReporter.java @@ -26,7 +26,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.ElasticApmTracerBuilder; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.common.util.WildcardMatcher; import co.elastic.apm.agent.report.Reporter; diff --git a/apm-agent-plugins/apm-mongodb/apm-mongodb-common/src/test/java/co/elastic/apm/agent/mongodb/AbstractMongoClientInstrumentationIT.java b/apm-agent-plugins/apm-mongodb/apm-mongodb-common/src/test/java/co/elastic/apm/agent/mongodb/AbstractMongoClientInstrumentationIT.java index cfa9620889f..663eec481e8 100644 --- a/apm-agent-plugins/apm-mongodb/apm-mongodb-common/src/test/java/co/elastic/apm/agent/mongodb/AbstractMongoClientInstrumentationIT.java +++ b/apm-agent-plugins/apm-mongodb/apm-mongodb-common/src/test/java/co/elastic/apm/agent/mongodb/AbstractMongoClientInstrumentationIT.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.impl.context.Destination; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.common.util.WildcardMatcher; diff --git a/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttp3ClientAsyncInstrumentation.java b/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttp3ClientAsyncInstrumentation.java index 712787697d1..ceb9ddc06d7 100644 --- a/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttp3ClientAsyncInstrumentation.java +++ b/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttp3ClientAsyncInstrumentation.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import net.bytebuddy.asm.Advice; diff --git a/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttp3ClientInstrumentation.java b/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttp3ClientInstrumentation.java index 05bd8a643ff..fb383abc2be 100644 --- a/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttp3ClientInstrumentation.java +++ b/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttp3ClientInstrumentation.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import net.bytebuddy.asm.Advice; diff --git a/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttpClientAsyncInstrumentation.java b/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttpClientAsyncInstrumentation.java index fe24707eea4..f4d9c20cbce 100644 --- a/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttpClientAsyncInstrumentation.java +++ b/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttpClientAsyncInstrumentation.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import com.squareup.okhttp.Call; diff --git a/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttpClientInstrumentation.java b/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttpClientInstrumentation.java index 916692350c2..eab24707c52 100644 --- a/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttpClientInstrumentation.java +++ b/apm-agent-plugins/apm-okhttp-plugin/src/main/java/co/elastic/apm/agent/okhttp/OkHttpClientInstrumentation.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import com.squareup.okhttp.HttpUrl; diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpan.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpan.java index 8ec9f79d989..872e759052c 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpan.java +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpan.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.impl.context.Url; import co.elastic.apm.agent.impl.transaction.AbstractSpan; import co.elastic.apm.agent.impl.transaction.OTelSpanKind; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpanBuilder.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpanBuilder.java index a5006bd6824..653fe169bc5 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpanBuilder.java +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpanBuilder.java @@ -22,7 +22,7 @@ import co.elastic.apm.agent.impl.transaction.AbstractSpan; import co.elastic.apm.agent.impl.transaction.MultiValueMapAccessor; import co.elastic.apm.agent.impl.transaction.OTelSpanKind; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.sdk.logging.Logger; diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/co/elastic/apm/agent/opentelemetry/tracing/ElasticOpenTelemetryTest.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/co/elastic/apm/agent/opentelemetry/tracing/ElasticOpenTelemetryTest.java index 8fb9f626a7f..2bce882ea52 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/co/elastic/apm/agent/opentelemetry/tracing/ElasticOpenTelemetryTest.java +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/co/elastic/apm/agent/opentelemetry/tracing/ElasticOpenTelemetryTest.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.impl.transaction.AbstractSpan; import co.elastic.apm.agent.impl.transaction.ElasticContext; import co.elastic.apm.agent.impl.transaction.OTelSpanKind; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.SpanKind; diff --git a/apm-agent-plugins/apm-process-plugin/src/main/java/co/elastic/apm/agent/process/ProcessHelper.java b/apm-agent-plugins/apm-process-plugin/src/main/java/co/elastic/apm/agent/process/ProcessHelper.java index 4c54050fa14..d40a28a895d 100644 --- a/apm-agent-plugins/apm-process-plugin/src/main/java/co/elastic/apm/agent/process/ProcessHelper.java +++ b/apm-agent-plugins/apm-process-plugin/src/main/java/co/elastic/apm/agent/process/ProcessHelper.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.collections.WeakConcurrentProviderImpl; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.sdk.state.GlobalVariables; import co.elastic.apm.agent.sdk.weakconcurrent.WeakMap; diff --git a/apm-agent-plugins/apm-process-plugin/src/test/java/co/elastic/apm/agent/process/ProcessHelperTest.java b/apm-agent-plugins/apm-process-plugin/src/test/java/co/elastic/apm/agent/process/ProcessHelperTest.java index 12d8cc08a8d..aa4a3ee3f37 100644 --- a/apm-agent-plugins/apm-process-plugin/src/test/java/co/elastic/apm/agent/process/ProcessHelperTest.java +++ b/apm-agent-plugins/apm-process-plugin/src/test/java/co/elastic/apm/agent/process/ProcessHelperTest.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.TransactionUtils; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.sdk.weakconcurrent.WeakConcurrent; diff --git a/apm-agent-plugins/apm-quartz-job-plugin/apm-quartz-1-plugin/src/test/java/co/elastic/apm/agent/quartzjob/Quartz1JobTransactionNameInstrumentationTest.java b/apm-agent-plugins/apm-quartz-job-plugin/apm-quartz-1-plugin/src/test/java/co/elastic/apm/agent/quartzjob/Quartz1JobTransactionNameInstrumentationTest.java index 9070b85e0ff..6a4fe928f91 100644 --- a/apm-agent-plugins/apm-quartz-job-plugin/apm-quartz-1-plugin/src/test/java/co/elastic/apm/agent/quartzjob/Quartz1JobTransactionNameInstrumentationTest.java +++ b/apm-agent-plugins/apm-quartz-job-plugin/apm-quartz-1-plugin/src/test/java/co/elastic/apm/agent/quartzjob/Quartz1JobTransactionNameInstrumentationTest.java @@ -19,7 +19,7 @@ package co.elastic.apm.agent.quartzjob; import co.elastic.apm.agent.impl.ElasticApmTracer; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import org.quartz.Job; import org.quartz.JobDetail; diff --git a/apm-agent-plugins/apm-quartz-job-plugin/apm-quartz-2-plugin/src/test/java/co/elastic/apm/agent/quartzjob/Quartz2JobTransactionNameInstrumentationTest.java b/apm-agent-plugins/apm-quartz-job-plugin/apm-quartz-2-plugin/src/test/java/co/elastic/apm/agent/quartzjob/Quartz2JobTransactionNameInstrumentationTest.java index a2de6a889a7..4f1114588fc 100644 --- a/apm-agent-plugins/apm-quartz-job-plugin/apm-quartz-2-plugin/src/test/java/co/elastic/apm/agent/quartzjob/Quartz2JobTransactionNameInstrumentationTest.java +++ b/apm-agent-plugins/apm-quartz-job-plugin/apm-quartz-2-plugin/src/test/java/co/elastic/apm/agent/quartzjob/Quartz2JobTransactionNameInstrumentationTest.java @@ -19,7 +19,7 @@ package co.elastic.apm.agent.quartzjob; import co.elastic.apm.agent.impl.ElasticApmTracer; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import org.quartz.Job; import org.quartz.JobBuilder; diff --git a/apm-agent-plugins/apm-quartz-job-plugin/quartz-common/src/main/java/co/elastic/apm/agent/quartzjob/AbstractJobTransactionNameInstrumentation.java b/apm-agent-plugins/apm-quartz-job-plugin/quartz-common/src/main/java/co/elastic/apm/agent/quartzjob/AbstractJobTransactionNameInstrumentation.java index a2bbf4bcd4f..3ed3558b709 100644 --- a/apm-agent-plugins/apm-quartz-job-plugin/quartz-common/src/main/java/co/elastic/apm/agent/quartzjob/AbstractJobTransactionNameInstrumentation.java +++ b/apm-agent-plugins/apm-quartz-job-plugin/quartz-common/src/main/java/co/elastic/apm/agent/quartzjob/AbstractJobTransactionNameInstrumentation.java @@ -23,7 +23,7 @@ import co.elastic.apm.agent.impl.GlobalTracer; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.PrivilegedActionUtils; import co.elastic.apm.agent.util.VersionUtils; diff --git a/apm-agent-plugins/apm-quartz-job-plugin/quartz-common/src/test/java/co/elastic/apm/agent/quartzjob/AbstractJobTransactionNameInstrumentationTest.java b/apm-agent-plugins/apm-quartz-job-plugin/quartz-common/src/test/java/co/elastic/apm/agent/quartzjob/AbstractJobTransactionNameInstrumentationTest.java index 4e5fa2803cd..e2665cede6e 100644 --- a/apm-agent-plugins/apm-quartz-job-plugin/quartz-common/src/test/java/co/elastic/apm/agent/quartzjob/AbstractJobTransactionNameInstrumentationTest.java +++ b/apm-agent-plugins/apm-quartz-job-plugin/quartz-common/src/test/java/co/elastic/apm/agent/quartzjob/AbstractJobTransactionNameInstrumentationTest.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.TracerInternalApiUtils; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import org.junit.jupiter.api.AfterEach; diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMQIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMQIT.java index 9ee34783f59..f60da332e53 100644 --- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMQIT.java +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMQIT.java @@ -50,7 +50,7 @@ import co.elastic.apm.agent.impl.context.Message; import co.elastic.apm.agent.impl.transaction.AbstractSpan; import co.elastic.apm.agent.impl.transaction.Id; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.impl.transaction.Transaction; diff --git a/apm-agent-plugins/apm-redis-plugin/apm-redis-common/src/test/java/co/elastic/apm/agent/redis/AbstractRedisInstrumentationTest.java b/apm-agent-plugins/apm-redis-plugin/apm-redis-common/src/test/java/co/elastic/apm/agent/redis/AbstractRedisInstrumentationTest.java index a262d2cfd4b..87237dda144 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-redis-common/src/test/java/co/elastic/apm/agent/redis/AbstractRedisInstrumentationTest.java +++ b/apm-agent-plugins/apm-redis-plugin/apm-redis-common/src/test/java/co/elastic/apm/agent/redis/AbstractRedisInstrumentationTest.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.impl.context.Destination; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import org.junit.After; diff --git a/apm-agent-plugins/apm-scheduled-annotation-plugin/src/main/java/co/elastic/apm/agent/scheduled/ScheduledTransactionNameInstrumentation.java b/apm-agent-plugins/apm-scheduled-annotation-plugin/src/main/java/co/elastic/apm/agent/scheduled/ScheduledTransactionNameInstrumentation.java index fbfe6c2bd83..dfba2dd3bc2 100644 --- a/apm-agent-plugins/apm-scheduled-annotation-plugin/src/main/java/co/elastic/apm/agent/scheduled/ScheduledTransactionNameInstrumentation.java +++ b/apm-agent-plugins/apm-scheduled-annotation-plugin/src/main/java/co/elastic/apm/agent/scheduled/ScheduledTransactionNameInstrumentation.java @@ -23,7 +23,7 @@ import co.elastic.apm.agent.impl.ElasticApmTracer; import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.PrivilegedActionUtils; import net.bytebuddy.asm.Advice; diff --git a/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/AbstractScheduledInstrumentationTest.java b/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/AbstractScheduledInstrumentationTest.java index 19f03fa76d2..7503ada5cea 100644 --- a/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/AbstractScheduledInstrumentationTest.java +++ b/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/AbstractScheduledInstrumentationTest.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import java.util.List; diff --git a/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/AbstractScheduledTransactionNameInstrumentationTest.java b/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/AbstractScheduledTransactionNameInstrumentationTest.java index c1adbedd1b7..9ad8b35a749 100644 --- a/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/AbstractScheduledTransactionNameInstrumentationTest.java +++ b/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/AbstractScheduledTransactionNameInstrumentationTest.java @@ -18,7 +18,7 @@ */ package co.elastic.apm.agent.scheduled; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import org.junit.jupiter.api.Test; diff --git a/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/SpringScheduledTransactionNameInstrumentationTest.java b/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/SpringScheduledTransactionNameInstrumentationTest.java index c715e767a63..0f3e936d9a5 100644 --- a/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/SpringScheduledTransactionNameInstrumentationTest.java +++ b/apm-agent-plugins/apm-scheduled-annotation-plugin/src/test/java/co/elastic/apm/agent/scheduled/SpringScheduledTransactionNameInstrumentationTest.java @@ -18,7 +18,7 @@ */ package co.elastic.apm.agent.scheduled; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Transaction; import org.junit.jupiter.api.Test; import org.springframework.scheduling.annotation.Scheduled; diff --git a/apm-agent-plugins/apm-servlet-plugin/src/main/java/co/elastic/apm/agent/servlet/ServletApiAdvice.java b/apm-agent-plugins/apm-servlet-plugin/src/main/java/co/elastic/apm/agent/servlet/ServletApiAdvice.java index 77a06cb2b5c..9938d646247 100644 --- a/apm-agent-plugins/apm-servlet-plugin/src/main/java/co/elastic/apm/agent/servlet/ServletApiAdvice.java +++ b/apm-agent-plugins/apm-servlet-plugin/src/main/java/co/elastic/apm/agent/servlet/ServletApiAdvice.java @@ -24,7 +24,7 @@ import co.elastic.apm.agent.impl.context.Request; import co.elastic.apm.agent.impl.context.Response; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.sdk.state.GlobalVariables; diff --git a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/src/main/java/co/elastic/apm/agent/resttemplate/SpringRestTemplateAdvice.java b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/src/main/java/co/elastic/apm/agent/resttemplate/SpringRestTemplateAdvice.java index 15bdde6228e..0dd5e5a6739 100644 --- a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/src/main/java/co/elastic/apm/agent/resttemplate/SpringRestTemplateAdvice.java +++ b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/src/main/java/co/elastic/apm/agent/resttemplate/SpringRestTemplateAdvice.java @@ -21,7 +21,7 @@ import co.elastic.apm.agent.bci.TracerAwareInstrumentation; import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import net.bytebuddy.asm.Advice; import co.elastic.apm.agent.sdk.logging.Logger; diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/src/main/java/co/elastic/apm/agent/springwebclient/WebClientSubscriber.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/src/main/java/co/elastic/apm/agent/springwebclient/WebClientSubscriber.java index 4766f09b522..23f29c86a7c 100755 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/src/main/java/co/elastic/apm/agent/springwebclient/WebClientSubscriber.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/src/main/java/co/elastic/apm/agent/springwebclient/WebClientSubscriber.java @@ -21,7 +21,6 @@ import co.elastic.apm.agent.collections.WeakConcurrentProviderImpl; import co.elastic.apm.agent.impl.Tracer; import co.elastic.apm.agent.impl.context.web.ResultUtil; -import co.elastic.apm.agent.impl.transaction.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.sdk.weakconcurrent.WeakMap; import org.reactivestreams.Subscription; diff --git a/apm-agent-plugins/apm-struts-plugin/src/main/java/co/elastic/apm/agent/struts/ActionProxyAdvice.java b/apm-agent-plugins/apm-struts-plugin/src/main/java/co/elastic/apm/agent/struts/ActionProxyAdvice.java index 7cab058f367..c1517309d17 100644 --- a/apm-agent-plugins/apm-struts-plugin/src/main/java/co/elastic/apm/agent/struts/ActionProxyAdvice.java +++ b/apm-agent-plugins/apm-struts-plugin/src/main/java/co/elastic/apm/agent/struts/ActionProxyAdvice.java @@ -19,7 +19,7 @@ package co.elastic.apm.agent.struts; import co.elastic.apm.agent.impl.GlobalTracer; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.Transaction; import co.elastic.apm.agent.util.TransactionNameUtils; diff --git a/apm-agent-plugins/apm-urlconnection-plugin/src/main/java/co/elastic/apm/agent/urlconnection/HttpUrlConnectionInstrumentation.java b/apm-agent-plugins/apm-urlconnection-plugin/src/main/java/co/elastic/apm/agent/urlconnection/HttpUrlConnectionInstrumentation.java index fdc31281b2a..da142eaa9d3 100644 --- a/apm-agent-plugins/apm-urlconnection-plugin/src/main/java/co/elastic/apm/agent/urlconnection/HttpUrlConnectionInstrumentation.java +++ b/apm-agent-plugins/apm-urlconnection-plugin/src/main/java/co/elastic/apm/agent/urlconnection/HttpUrlConnectionInstrumentation.java @@ -22,7 +22,7 @@ import co.elastic.apm.agent.collections.WeakConcurrentProviderImpl; import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.impl.transaction.TraceContext; import co.elastic.apm.agent.sdk.state.CallDepth; diff --git a/apm-agent-plugins/apm-vertx/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/AbstractVertxWebClientHelper.java b/apm-agent-plugins/apm-vertx/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/AbstractVertxWebClientHelper.java index 107f751c8c3..d311732dd26 100644 --- a/apm-agent-plugins/apm-vertx/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/AbstractVertxWebClientHelper.java +++ b/apm-agent-plugins/apm-vertx/apm-vertx-common/src/main/java/co/elastic/apm/agent/vertx/AbstractVertxWebClientHelper.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.httpclient.HttpClientHelper; import co.elastic.apm.agent.impl.transaction.AbstractSpan; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.agent.impl.transaction.Span; import co.elastic.apm.agent.tracer.dispatch.TextHeaderSetter; import io.vertx.core.http.HttpClientRequest; diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/AbstractSpan.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/AbstractSpan.java index 2bc6570b17d..2767ee206c2 100644 --- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/AbstractSpan.java +++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/AbstractSpan.java @@ -157,6 +157,12 @@ public interface AbstractSpan> extends ElasticContext< */ Outcome getOutcome(); + /** + * Sets outcome + * + * @param outcome outcome + * @return this + */ T withOutcome(Outcome outcome); T withSync(boolean sync); diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Outcome.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Outcome.java index 2f23852a13c..a78146b57d3 100644 --- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Outcome.java +++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Outcome.java @@ -18,7 +18,23 @@ */ package co.elastic.apm.agent.tracer; -public interface Outcome { +public enum Outcome { - String name(); + SUCCESS("success"), + FAILURE("failure"), + UNKNOWN("unknown"); + + /** + * String value used for serialization + */ + private final String stringValue; + + Outcome(String stringValue) { + this.stringValue = stringValue; + } + + @Override + public String toString() { + return stringValue; + } } diff --git a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/tests/ExternalPluginTestApp.java b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/tests/ExternalPluginTestApp.java index a9cd1df9d12..1886148281f 100644 --- a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/tests/ExternalPluginTestApp.java +++ b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/tests/ExternalPluginTestApp.java @@ -20,7 +20,7 @@ import co.elastic.apm.agent.configuration.ServiceInfo; import co.elastic.apm.agent.impl.Tracer; -import co.elastic.apm.agent.impl.transaction.Outcome; +import co.elastic.apm.agent.tracer.Outcome; import co.elastic.apm.servlet.AbstractServletContainerIntegrationTest; import com.fasterxml.jackson.databind.JsonNode; import okhttp3.Response;