APM tracing with ZUUL (Netflix OSS)

Kibana version: 7.0.1

Elasticsearch version: 7.0.1

APM Server version: 7.0.1

APM Agent language and version: apm agent 1.7.0 on java 10

I have some micro-services with netflix OSS service. When I use ZUUL the APM can't differentiate between different request.

There are some possible workaround for differentiate ZuulController requests?

Regards,

How would you ideally like the transactions to be named after?

You can use the public API to manually name the transactions: https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-set-name

The problem is that ZuulController is the class where all requests are going on. There are a lot of different request addressed to different micro-services.

So you're saying, for example, we can add a transaction.setName before zuulController call for naming all request. Rigth?

Thanks

Yes, for example in a filter or an interceptor

How would you ideally like the transactions to be named after?

I have not an easy answer for that, at zuulController level We have not much information.
For example the URL path could be useful but in our case We use UIDs in some URL paths, for us it will be a problem, but could be an approach.

The rest of request (outside zuulController) apm instrumentation give us the java method, that's perfect but i'm not sure if it is possible

Could you have a look at the use_path_as_transaction_name and url_groups options? Would that be sufficient for your purposes?

Note that currently, the ZuulController transaction name would take precedence, even when enabling these options. I have created https://github.com/elastic/apm-agent-java/issues/838 to change that.

I did some probes. With use_path_as_transaction_name transactions has not distributed tracing.


PD thanks for open git issue!

use_path_as_transaction_name does not affect distributed tracing. Are you sure DT worked for this particular transaction when use_path_as_transaction_name was false?

url_path-->
image
Through ZuulController -->
image

Full path
(first screen)
/platform-notification-service/v1/api/notifications/search/findByUserIdAndNotificationTypeAndNotificationStatus?userId=44929069-0cd3-4022-95ef-8e2dfa501943&notificationType=NOTIFICATION&notificationStatus=PENDING&projection=full&sort=creationDate,desc&size=50&page=0

(second screen)
platform-notification-service/v1/api/notifications/search/findByUserIdAndNotificationTypeAndNotificationStatus?userId=54e0364c-1846-4497-9e92-b1f2aa807b11&notificationType=ALERT&notificationStatus=VIEWED&projection=full&sort=creationDate,desc&size=48&page=0

GET-->
image

99.9% of request sampled (with use_path_as_transaction_name) are flagged as OPTIONS only the last one is GET but even this one has not DT

The expected behaviour is same requests grouped in ZuulController sampled as path?

The first request is an HTTP OPTIONS request. It does, in fact, not call the platform-notification-service.

I've edited last post

Only after https://github.com/elastic/apm-agent-java/issues/838 is resolved the path would take precedence over the ZuulController name, even if use_path_as_transaction_name=true.