APM Spans do not show cust code

Kibana version: v8.10.4

Elasticsearch version: v8.10.4

APM Server version: v8.10.4

APM Agent language and version: NodeJS, Node 20, version 4.1.0

Browser version: Firefox 119.0

Original install method (e.g. download page, yum, deb, from source, etc.) and version: Elastic cloud deployment

Fresh install or upgraded from other version? Fresh install

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

No specific changes

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

APM Traces do not include function calls from the NodeJS project.


(Anonymized for obvious reasons)

HTTP calls and database calls are properly shown in spans, however all code references, such as functions are not shown.

The running code does include source maps.

Steps to reproduce:
Reproduction is a clean install of elastic cloud and setting up a nodejs application plus monitoring.

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

If any more info is required I'd be happy to provide!

Hi @NIelsVM. Thanks for the question.

I think this is a misunderstanding. It sounds like the APM agent is operating as expected. The APM agent does not create tracing spans for any/every JavaScript function call. Spans are only created for (a) specific interesting events in libraries that the APM agent instruments (for example, http client/server requests, database calls, etc.) and (b) for manual instrumentation (using the Elastic APM agent's API or the OpenTelemetry Tracing API).

I should say that our Universal Profiler -- Universal Profiling - continuous profiling that just works | Elastic -- does provide function-level profiling.

Ah okay thank you Trent! I think I got confused due to this screenshot:

Here it looks like there are functions being logged but I guess they are endpoints on microservices that are called.

I will look into the Universal Profiling feature!

Yes, those are endpoints and/or manual instrumentations on a number of services in a distributed trace -- i.e. a trace that went through a number of separate services, implemented in different languages.

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