Convert Spring Scheduling groovy tests to java (#9806)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
This commit is contained in:
parent
42de8966b7
commit
818ff6fcbe
|
@ -1,163 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
import io.opentelemetry.api.trace.StatusCode
|
|
||||||
import io.opentelemetry.instrumentation.test.AgentInstrumentationSpecification
|
|
||||||
import io.opentelemetry.semconv.SemanticAttributes
|
|
||||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext
|
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class SpringSchedulingTest extends AgentInstrumentationSpecification {
|
|
||||||
|
|
||||||
def "schedule one time test"() {
|
|
||||||
setup:
|
|
||||||
def context = new AnnotationConfigApplicationContext(OneTimeTaskConfig)
|
|
||||||
def task = context.getBean(OneTimeTask)
|
|
||||||
|
|
||||||
task.blockUntilExecute()
|
|
||||||
|
|
||||||
expect:
|
|
||||||
assert task != null
|
|
||||||
assertTraces(0) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
def "schedule trigger test according to cron expression"() {
|
|
||||||
setup:
|
|
||||||
def context = new AnnotationConfigApplicationContext(TriggerTaskConfig)
|
|
||||||
def task = context.getBean(TriggerTask)
|
|
||||||
|
|
||||||
task.blockUntilExecute()
|
|
||||||
|
|
||||||
expect:
|
|
||||||
assert task != null
|
|
||||||
assertTraces(1) {
|
|
||||||
trace(0, 1) {
|
|
||||||
span(0) {
|
|
||||||
name "TriggerTask.run"
|
|
||||||
hasNoParent()
|
|
||||||
attributes {
|
|
||||||
"job.system" "spring_scheduling"
|
|
||||||
"code.namespace" "TriggerTask"
|
|
||||||
"code.function" "run"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def "schedule interval test"() {
|
|
||||||
setup:
|
|
||||||
def context = new AnnotationConfigApplicationContext(IntervalTaskConfig)
|
|
||||||
def task = context.getBean(IntervalTask)
|
|
||||||
|
|
||||||
task.blockUntilExecute()
|
|
||||||
|
|
||||||
expect:
|
|
||||||
assert task != null
|
|
||||||
assertTraces(1) {
|
|
||||||
trace(0, 1) {
|
|
||||||
span(0) {
|
|
||||||
name "IntervalTask.run"
|
|
||||||
hasNoParent()
|
|
||||||
attributes {
|
|
||||||
"job.system" "spring_scheduling"
|
|
||||||
"code.namespace" "IntervalTask"
|
|
||||||
"code.function" "run"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def "schedule lambda test"() {
|
|
||||||
setup:
|
|
||||||
def context = new AnnotationConfigApplicationContext(LambdaTaskConfig)
|
|
||||||
def configurer = context.getBean(LambdaTaskConfigurer)
|
|
||||||
|
|
||||||
configurer.singleUseLatch.await(2000, TimeUnit.MILLISECONDS)
|
|
||||||
|
|
||||||
expect:
|
|
||||||
assertTraces(1) {
|
|
||||||
trace(0, 1) {
|
|
||||||
span(0) {
|
|
||||||
name "LambdaTaskConfigurer\$\$Lambda.run"
|
|
||||||
hasNoParent()
|
|
||||||
attributes {
|
|
||||||
"job.system" "spring_scheduling"
|
|
||||||
"code.namespace" { it.startsWith("LambdaTaskConfigurer\$\$Lambda") }
|
|
||||||
"code.function" "run"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
context.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
// by putting the scheduled method directly on the TaskConfig, this verifies the case where the
|
|
||||||
// class is enhanced and so has a different class name, e.g. TaskConfig$$EnhancerByCGLIB$$b910c4a9
|
|
||||||
def "schedule enhanced class test"() {
|
|
||||||
setup:
|
|
||||||
def context = new AnnotationConfigApplicationContext(EnhancedClassTaskConfig)
|
|
||||||
def latch = context.getBean(CountDownLatch)
|
|
||||||
|
|
||||||
latch.await(5, TimeUnit.SECONDS)
|
|
||||||
|
|
||||||
expect:
|
|
||||||
assertTraces(1) {
|
|
||||||
trace(0, 1) {
|
|
||||||
span(0) {
|
|
||||||
name "EnhancedClassTaskConfig.run"
|
|
||||||
hasNoParent()
|
|
||||||
attributes {
|
|
||||||
"job.system" "spring_scheduling"
|
|
||||||
"code.namespace" "EnhancedClassTaskConfig"
|
|
||||||
"code.function" "run"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def "task with error test"() {
|
|
||||||
setup:
|
|
||||||
def context = new AnnotationConfigApplicationContext(TaskWithErrorConfig)
|
|
||||||
def task = context.getBean(TaskWithError)
|
|
||||||
|
|
||||||
task.blockUntilExecute()
|
|
||||||
|
|
||||||
expect:
|
|
||||||
assert task != null
|
|
||||||
assertTraces(1) {
|
|
||||||
trace(0, 2) {
|
|
||||||
span(0) {
|
|
||||||
name "TaskWithError.run"
|
|
||||||
hasNoParent()
|
|
||||||
status StatusCode.ERROR
|
|
||||||
attributes {
|
|
||||||
"job.system" "spring_scheduling"
|
|
||||||
"code.namespace" "TaskWithError"
|
|
||||||
"code.function" "run"
|
|
||||||
}
|
|
||||||
event(0) {
|
|
||||||
eventName "$SemanticAttributes.EXCEPTION_EVENT_NAME"
|
|
||||||
attributes {
|
|
||||||
"$SemanticAttributes.EXCEPTION_TYPE" IllegalStateException.getName()
|
|
||||||
"$SemanticAttributes.EXCEPTION_MESSAGE" "failure"
|
|
||||||
"$SemanticAttributes.EXCEPTION_STACKTRACE" String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
span(1) {
|
|
||||||
name "error-handler"
|
|
||||||
childOf(span(0))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,184 @@
|
||||||
|
/*
|
||||||
|
* Copyright The OpenTelemetry Authors
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1;
|
||||||
|
|
||||||
|
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat;
|
||||||
|
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
|
||||||
|
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies;
|
||||||
|
|
||||||
|
import io.opentelemetry.api.common.AttributeKey;
|
||||||
|
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
|
||||||
|
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component.IntervalTask;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component.OneTimeTask;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component.TaskWithError;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component.TriggerTask;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config.EnhancedClassTaskConfig;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config.IntervalTaskConfig;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config.LambdaTaskConfig;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config.OneTimeTaskConfig;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config.TaskWithErrorConfig;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config.TriggerTaskConfig;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.service.LambdaTaskConfigurer;
|
||||||
|
import io.opentelemetry.sdk.trace.data.StatusData;
|
||||||
|
import io.opentelemetry.semconv.SemanticAttributes;
|
||||||
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||||
|
|
||||||
|
class SpringSchedulingTest {
|
||||||
|
|
||||||
|
@RegisterExtension
|
||||||
|
private static final InstrumentationExtension testing = AgentInstrumentationExtension.create();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void scheduleOneTimeTest() throws InterruptedException {
|
||||||
|
try (AnnotationConfigApplicationContext context =
|
||||||
|
new AnnotationConfigApplicationContext(OneTimeTaskConfig.class)) {
|
||||||
|
OneTimeTask task = context.getBean(OneTimeTask.class);
|
||||||
|
task.blockUntilExecute();
|
||||||
|
|
||||||
|
assertThat(task).isNotNull();
|
||||||
|
assertThat(testing.waitForTraces(0)).isEmpty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void scheduleCronExpressionTest() throws InterruptedException {
|
||||||
|
try (AnnotationConfigApplicationContext context =
|
||||||
|
new AnnotationConfigApplicationContext(TriggerTaskConfig.class)) {
|
||||||
|
TriggerTask task = context.getBean(TriggerTask.class);
|
||||||
|
task.blockUntilExecute();
|
||||||
|
|
||||||
|
assertThat(task).isNotNull();
|
||||||
|
testing.waitAndAssertTraces(
|
||||||
|
trace ->
|
||||||
|
trace.hasSpansSatisfyingExactly(
|
||||||
|
span ->
|
||||||
|
span.hasName("TriggerTask.run")
|
||||||
|
.hasNoParent()
|
||||||
|
.hasAttributesSatisfyingExactly(
|
||||||
|
equalTo(AttributeKey.stringKey("job.system"), "spring_scheduling"),
|
||||||
|
equalTo(
|
||||||
|
AttributeKey.stringKey("code.namespace"),
|
||||||
|
TriggerTask.class.getName()),
|
||||||
|
equalTo(AttributeKey.stringKey("code.function"), "run"))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void scheduleIntervalTest() throws InterruptedException {
|
||||||
|
try (AnnotationConfigApplicationContext context =
|
||||||
|
new AnnotationConfigApplicationContext(IntervalTaskConfig.class)) {
|
||||||
|
IntervalTask task = context.getBean(IntervalTask.class);
|
||||||
|
task.blockUntilExecute();
|
||||||
|
|
||||||
|
assertThat(task).isNotNull();
|
||||||
|
testing.waitAndAssertTraces(
|
||||||
|
trace ->
|
||||||
|
trace.hasSpansSatisfyingExactly(
|
||||||
|
span ->
|
||||||
|
span.hasName("IntervalTask.run")
|
||||||
|
.hasNoParent()
|
||||||
|
.hasAttributesSatisfyingExactly(
|
||||||
|
equalTo(AttributeKey.stringKey("job.system"), "spring_scheduling"),
|
||||||
|
equalTo(
|
||||||
|
AttributeKey.stringKey("code.namespace"),
|
||||||
|
IntervalTask.class.getName()),
|
||||||
|
equalTo(AttributeKey.stringKey("code.function"), "run"))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void scheduleLambdaTest() throws InterruptedException {
|
||||||
|
try (AnnotationConfigApplicationContext context =
|
||||||
|
new AnnotationConfigApplicationContext(LambdaTaskConfig.class)) {
|
||||||
|
LambdaTaskConfigurer configurer = context.getBean(LambdaTaskConfigurer.class);
|
||||||
|
configurer.singleUseLatch.await(2000, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
|
assertThat(configurer).isNotNull();
|
||||||
|
testing.waitAndAssertTraces(
|
||||||
|
trace ->
|
||||||
|
trace.hasSpansSatisfyingExactly(
|
||||||
|
span ->
|
||||||
|
span.hasName("LambdaTaskConfigurer$$Lambda.run")
|
||||||
|
.hasNoParent()
|
||||||
|
.hasAttributesSatisfyingExactly(
|
||||||
|
equalTo(AttributeKey.stringKey("job.system"), "spring_scheduling"),
|
||||||
|
equalTo(AttributeKey.stringKey("code.function"), "run"),
|
||||||
|
satisfies(
|
||||||
|
AttributeKey.stringKey("code.namespace"),
|
||||||
|
codeNamespace ->
|
||||||
|
codeNamespace
|
||||||
|
.isNotBlank()
|
||||||
|
.startsWith(
|
||||||
|
LambdaTaskConfigurer.class.getName()
|
||||||
|
+ "$$Lambda")))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void scheduleEnhancedClassTest() throws InterruptedException {
|
||||||
|
try (AnnotationConfigApplicationContext context =
|
||||||
|
new AnnotationConfigApplicationContext(EnhancedClassTaskConfig.class)) {
|
||||||
|
CountDownLatch latch = context.getBean(CountDownLatch.class);
|
||||||
|
latch.await(5, TimeUnit.SECONDS);
|
||||||
|
|
||||||
|
assertThat(latch).isNotNull();
|
||||||
|
testing.waitAndAssertTraces(
|
||||||
|
trace ->
|
||||||
|
trace.hasSpansSatisfyingExactly(
|
||||||
|
span ->
|
||||||
|
span.hasName("EnhancedClassTaskConfig.run")
|
||||||
|
.hasNoParent()
|
||||||
|
.hasAttributesSatisfyingExactly(
|
||||||
|
equalTo(AttributeKey.stringKey("job.system"), "spring_scheduling"),
|
||||||
|
equalTo(
|
||||||
|
AttributeKey.stringKey("code.namespace"),
|
||||||
|
EnhancedClassTaskConfig.class.getName()),
|
||||||
|
equalTo(AttributeKey.stringKey("code.function"), "run"))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void taskWithErrorTest() throws InterruptedException {
|
||||||
|
try (AnnotationConfigApplicationContext context =
|
||||||
|
new AnnotationConfigApplicationContext(TaskWithErrorConfig.class)) {
|
||||||
|
TaskWithError task = context.getBean(TaskWithError.class);
|
||||||
|
task.blockUntilExecute();
|
||||||
|
|
||||||
|
assertThat(task).isNotNull();
|
||||||
|
testing.waitAndAssertTraces(
|
||||||
|
trace ->
|
||||||
|
trace.hasSpansSatisfyingExactly(
|
||||||
|
span ->
|
||||||
|
span.hasName("TaskWithError.run")
|
||||||
|
.hasNoParent()
|
||||||
|
.hasStatus(StatusData.error())
|
||||||
|
.hasAttributesSatisfyingExactly(
|
||||||
|
equalTo(AttributeKey.stringKey("job.system"), "spring_scheduling"),
|
||||||
|
equalTo(
|
||||||
|
AttributeKey.stringKey("code.namespace"),
|
||||||
|
TaskWithError.class.getName()),
|
||||||
|
equalTo(AttributeKey.stringKey("code.function"), "run"))
|
||||||
|
.hasEventsSatisfyingExactly(
|
||||||
|
event ->
|
||||||
|
event
|
||||||
|
.hasName(SemanticAttributes.EXCEPTION_EVENT_NAME)
|
||||||
|
.hasAttributesSatisfying(
|
||||||
|
equalTo(
|
||||||
|
SemanticAttributes.EXCEPTION_TYPE,
|
||||||
|
IllegalStateException.class.getName()),
|
||||||
|
equalTo(SemanticAttributes.EXCEPTION_MESSAGE, "failure"),
|
||||||
|
satisfies(
|
||||||
|
SemanticAttributes.EXCEPTION_STACKTRACE,
|
||||||
|
value -> value.isInstanceOf(String.class)))),
|
||||||
|
span -> span.hasName("error-handler").hasParent(trace.getSpan(0))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component;
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
@ -3,6 +3,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component;
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -3,6 +3,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component;
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
@ -3,6 +3,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component;
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
@ -3,6 +3,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config;
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
|
@ -3,6 +3,9 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config;
|
||||||
|
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component.IntervalTask;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
@ -3,6 +3,9 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config;
|
||||||
|
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.service.LambdaTaskConfigurer;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
@ -3,6 +3,9 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config;
|
||||||
|
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component.OneTimeTask;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
@ -3,7 +3,10 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config;
|
||||||
|
|
||||||
import io.opentelemetry.instrumentation.testing.GlobalTraceUtil;
|
import io.opentelemetry.instrumentation.testing.GlobalTraceUtil;
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component.TaskWithError;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.TaskScheduler;
|
import org.springframework.scheduling.TaskScheduler;
|
|
@ -3,6 +3,9 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.config;
|
||||||
|
|
||||||
|
import io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.component.TriggerTask;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
@ -3,6 +3,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
package io.opentelemetry.javaagent.instrumentation.spring.scheduling.v3_1.spring.service;
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import org.springframework.scheduling.annotation.SchedulingConfigurer;
|
import org.springframework.scheduling.annotation.SchedulingConfigurer;
|
||||||
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
Loading…
Reference in New Issue