Support Spring @Cacheable
See original GitHub issueHi Team, First, thank you for the incredible work you’ve done on this amazing project.
Describe the bug
When using Spring @Cacheable annotation within a redis implementation, I can’t see any span reported to zipkin.
Spring Cloud : 2.2.6.RELEASE
Spring-Boot : 2.3.5.RELEASE
Sample Here a sample and simple code for Cacheable usage The main controller…
@RequestMapping(value = "/user/v1/{idUser}",
produces = { "application/json" },
method = RequestMethod.GET)
public ResponseEntity<String> getUser(Integer idUser) {
Optional<String> userInformation = myService.getUserName(idUser);
return userInformation.isEmpty() ? ResponseEntity.noContent().build() : ResponseEntity.ok(userInformation.get());
}
The service…
@Cacheable(value = "myCacheNameInRedis")
public Optional<String> getUserName(Integer idUser) {
//call repository with idUser;
}
Dependencies used :
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
Thank you
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
A Guide To Caching in Spring - Baeldung
A Guide To Caching in Spring · 1. The Cache Abstraction? · 2. Getting Started · 3. Enable Caching · 4. Use Caching...
Read more >32. Caching - Spring
The Spring Framework provides support for transparently adding caching to an application. At its core, the abstraction applies caching to methods, ...
Read more >Spring Caching | Java Development Journal
Spring 3.1 introduced support for transparently adding caching into an existing Spring application. Similar to the transaction support, ...
Read more >Spring Boot Caching 101 - Auth0
This method-level annotation lets Spring Boot know that the return value of the annotated method can be cached. Each time a method marked...
Read more >Implementing a Cache with Spring Boot - Reflectoring
The Spring cache abstraction gives us the possibility to use an abstract API to access the cache. Our business code can use this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi team,
just some words to tell you that, this error is due to a custom LettuceFactory and we did not add BraveTracing when creating it.
Have nice day folks
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.