micronaut
in the-benchmarker/web-frameworks#3592 for a benchmarking project. Since I'm not a java guy, could somebody check the implementation in https://github.com/the-benchmarker/web-frameworks/tree/master/java/micronaut
Hello Guys,,, . In Springboot, just by adding sleuth dependency , we can see 'traceId' and 'spanId' in STS console. I am trying to mimic similar functionality in micronaut using Intellij . I tried injecting dependency implementation "io.micronaut:micronaut-tracing" along with use of annotation 'io.micronaut.http.annotation.NewSpan' at controller. But i am not able to see 'traceId' in Intelli console ? do i have to override logback.xml file ?
For micronaut 2.2.1, i was able to get 'X-B3-TraceId' in ResponseHeader and logs by adding below code: - 1) logback.xml <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>false</withJansi>
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - [%X{X-B3-TraceId:-},%X{X-B3-SpanId:-}] %msg%n</pattern>
</encoder>
</appender>
2) build.gradle
implementation "io.micronaut:micronaut-tracing"
implementation 'io.opentracing.brave:brave-opentracing' 3) application.yml tracing:
zipkin:
enabled: true My project has KafkaListner. 1 weird issue which i saw was if i annotate my class with @kafkaListner then response header doesnot contain 'X-B3-TraceId'. When i move to to methodlevel then response header contains 'X-B3-TraceId'.
Hello all, I’m using declarative http client in micronaut to get call a REST web service.
As per the documentation, I can declare my httpclient as -
HttpResponse<Pet> getData(some query parameter);
Now I have two subclasses of Pet - Let’s say Dog and Cat having their specific member variables respectively
Now when my app calls this service it is returning an instance of Dog or Cat with Dog or cat attributes, such child object specific information(state of Dog or Cat) is getting lost at client side as return type is ‘Pet’…
can anyone assist here - would like to know How I can leverage httpclient to get child objects as response even though the declarative client is of parent type