-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression in spring-scheduling span name (#5436)
- Loading branch information
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ntation/spring/spring-scheduling-3.1/javaagent/src/test/java/EnhancedClassTaskConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import java.util.concurrent.CountDownLatch; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.scheduling.annotation.EnableScheduling; | ||
import org.springframework.scheduling.annotation.Scheduled; | ||
|
||
@Configuration | ||
@EnableScheduling | ||
public class EnhancedClassTaskConfig { | ||
|
||
private final CountDownLatch latch = new CountDownLatch(1); | ||
|
||
@Scheduled(fixedRate = 5000) | ||
public void run() { | ||
latch.countDown(); | ||
} | ||
|
||
@Bean | ||
public CountDownLatch countDownLatch() { | ||
return latch; | ||
} | ||
} |