3

We are building a web-app using Micronaut (v1.2.0) which will be deployed in a Kubernetes cluster (we are using Istio as the service-mesh).

We would like to instrument the critical method calls so that they can generate their own spans within a HTTP request span context. For this we are using the Micronaut OpenTracing support and Jaeger integration.

The following dependencies are included in the pom.xml

...
    <dependency>
      <groupId>io.micronaut</groupId>
      <artifactId>micronaut-tracing</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.jaegertracing</groupId>
      <artifactId>jaeger-thrift</artifactId>
      <scope>runtime</scope>
    </dependency>
...

Have implemented Filter method with @ContinueSpan (also tried the same with @NewSpan) as shown below

@Filter("/**")
public class TraceTestFilter implements HttpServerFilter {

  @Override
  public Publisher<MutableHttpResponse<?>> doFilter(
      HttpRequest<?> request, ServerFilterChain chain) {

    return testMethodTracing(request, chain);
  }

  @ContinueSpan
  public Publisher<MutableHttpResponse<?>> testMethodTracing(
      HttpRequest<?> request, ServerFilterChain chain) {

        // Details ommitted here
  }
}

The following is maintained in the application-k8s.yml (also have an application.yml with the same settings)

---
tracing:
  jaeger:
    enabled: true
    sampler:
      probability: 1
    sender:
      agentHost: jaeger-agent.istio-system
      agentPort: 5775

However we only see the trace entries that are generated by Istio (Envoy proxies) but we don't see the details of the method calls itself.

Any ideas as to what could be going wrong here?

mithrandir
  • 1,323
  • 4
  • 18
  • 39

2 Answers2

0

Istio have this feature called Distributed Tracing, which enables users to track requests in mesh that is distributed across multiple services. This can be used to visualize request latency, serialization and parallelism.

For this to work Istio uses Envoy Proxy - Tracing feature.

You can deploy Bookinfo Application and see how Trace context propagation works.

Crou
  • 10,232
  • 2
  • 26
  • 31
0

If you have the same issue explained in this ticket, you need to wait for the next release of micronaut or use the workaround mentioned by micronaut guys there.

https://github.com/micronaut-projects/micronaut-core/issues/2209

setiabb
  • 529
  • 1
  • 5
  • 13