How dependencies are listed under Observability > APM > Dependencies

Kibana version: 8.7.1
Elasticsearch version: 8.7.1
APM Server version: 8.7.1
APM Agent language and version: Java, 1.42.0
Fresh install or upgraded from other version? Fresh Install

In APM>Services, I have bunch of services and Keycloak is listed as one of the service. I have another service which performs authentication using keycloak and contacts other applications. When I go to APM > Services > MyService > Transactions, I could see list of services that were involved in the transaction(Keycloak is part of that transaction). After upgrading Keycloak from 11 to 20, I couldn't see Keycloak service in that transaction list and authentication URL which actually belongs to Keycloak is shown under different service.
My question: How URLS are mapped to service ?

My expectation: Services under Timeline should list Keycloak as separate service.
Actual behaviour: Keycloak service is not getting listed separately and it's url's are getting listed as part of different service.

Steps to reproduce:

  1. Java apm agent is setup using below params
 -Delastic.apm.enabled=True -Delastic.apm.server_url=http://127.0.0.1:8203 
-Delastic.apm.span_min_duration=10ms -Delastic.apm.exit_span_min_duration=10ms 
-Delastic.apm.span_stack_trace_min_duration=500ms -Delastic.apm.use_elastic_traceparent_header=false   
-javaagent:/opt/apm/elastic-apm-agent-1.42.0.jar 
-Delastic.apm.service_name=keycloak -Delastic.apm.trace_methods=org.*,com.*

Hi @dev19 ,

I'd liek to clarify whether I understand your problem correctly. My understanding is the following:

  • You are running keycloak as a service instrumented with the elastic-apm-agent
  • You are running other applications which connect to Keycloak via a Keycloak Java Client (?) also instrumented with the elastic-apm-agent
  • Prior to your keycloak upgrade, you would always see two spans for interactions of your services with keycloak:
    • a client span from the calling service
    • a corresponding server span (transaction) from keycloak processing the request
  • After your upgrade you are
    • Not seeing any transactions anymore on the "Keycloak" service
    • In your traces of your other services, you only see the client-spans of keycloak calls, the corresponding transactions are missing

If my understanding is correct, this seems to me like Keycloak switched to an HTTP server implementation which is not part of the supported technologies.

A simple workaround might be to use the OpenTelemetry java agent on keycloak instead. Apparently Keycloak supports the OpenTelemetry java agent.

Therefore I'd recommend you to try the OpenTelemetry agent, you can find a guide here on how to ingest its data to elastic.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.