0

Using Kamon in a scala play 2.6 project it seems that calls into play.core.server.AkkaHttpServer are traced automatically via instrumentation added via aspect j.

Example

A route /blogposts/ is traced. But further calls inside e.g BlogPostService.getNewest and so on are not.

Question

How would one extend this tracing to other functions calls? Is it needed to create spans manually? Or can further classes and their function be added to tracing via a different mechanism (config, own aspects etc.)?

Th 00 mÄ s
  • 3,776
  • 1
  • 27
  • 46

1 Answers1

0

There are multiple options to have tracing in arbitrary function calls. One would be to use aspects to weave in any needed tracing functionality. That would best be used if you have one functionality e.g outgoing http requests via WSClient that needs tracing all the time. Kamon Play does this already for WSClient.

For all other tracing needs you are best off to handle tracing the same like logging. Yes, adding individual calls to tracing functionality is some extra work but to some extend thats the expected workflow to in the end arrive at logical segments in trace without having every function call traced (to granular).

Th 00 mÄ s
  • 3,776
  • 1
  • 27
  • 46