These are chat archives for spring-cloud/spring-cloud

Feb 2019
Chandrakanth Reddy
Feb 15 03:22
I've a method in jersey with return type ResponseBuilder, I want to convert that method to Spring boot, How can I do that?
Method looks some thing like this public ResponseBuilder createResponse(String lang, String name){ ResponseBuilder rb = Response.status(Status.Ok); return rb;}
Davin Kevin
Feb 15 06:59

Hi everyone.

I am using Spring-Cloud-Sleuth (through Spring Cloud GCP) to forward headers (X-B3) between my micro-services using Spring-webflux everywhere. In one of them, the HTTP call is made from a different thread (inside a spring batch job, async, triggered by a rest endpoint). It seems the headers are not forwarded in this case. Is it normal for you to see this kind of behavior?


Feb 15 08:05
I think it's referred.Because the tracing route is DAG.It means all spans should travel back in a sequence.If you want to know async call's referrence,u should get spanId making another tag to refer it.
Maxime Menard
Feb 15 11:16
Hi all, question for spring-cloud-gateway, is it possible to use ReadBodyPredicateFactory in a .yml config file instead of code ? I can't find any documentation on it
Sven Sander
Feb 15 14:37
Hello together
I'm currently getting familiar with spring-cloud-contract. I use the central contracts approach described in the documentation and it works so far. Only thing that bothers me a bit are the packages the generated test classes reside. They are produced by using the base class package first, concatinated with the whole groupId/artifactId of the server (since this is the path the contracts are in) which is very long and not really matching the expectations. It works; so this is more a cosmetic issue. Is there a way to change that? Haven't found anything.
Spencer Gibb
Feb 15 15:30
@mmenard-bbc no it's not
Marcin Grzejszczak
Feb 15 16:52
@davinkevin it depends. Either we have no instrumented it or maybe from the process perspective it just can't work
@yarodinD you can override them
basePackageForTests: Specifies the base package for all generated tests. If not set, the value is picked from baseClassForTests’s package and from `packageWithBaseClasses. If neither of these values are set, then the value is set to
Feb 15 17:46
Hi guys, just a quick question. I am disabling the trace endpoint and its filter, but it seems eureka is looking for a filter that matches "webRequestLoggingFilter". I am creating a dummy version that will just log the request when one comes along, but I was wondering if internally Eureka is doing something with all the info stored in the TraceRepository or if its safe to just replace it with the new one
Sven Sander
Feb 15 20:21
@marcingrzejszczak Yes, I know. But this property is still treated as a prefix, appended by the path of the contract itself. Same behaviour like with the Baseclass. The path of the contract itself already constitutes the correct package name, therefore an empty prefix would be nice, but setting the basePackageForTests to empty causes spring-cloud-contract to use the default: as a prefix before my own package name.
Marcin Grzejszczak
Feb 15 22:32
I don't understand what you're saying
Sven Sander
Feb 15 23:36
Ok, an example. Using contracts from a central repository as described in all contracts are in a directory consisting of the maven group and artifact Ids of the server (in the documentation the server has com.example:server.
When the maven plugin from spring-cloud-contract pulls that contract and creates the tests from it, this folder becomes the package name. If a basePackageForTests or packageWithBaseClasses is set (let's say to "com.example.server.mytest.TestBase", I get a package like this: "". Clear now what I mean?