Join us at the Dash conference! July 16-17, NYC

Resource/Trace doesn't show up under correct service

When using a custom instrumentation of your application, if you notice any resources/traces in the Datadog UI that aren’t coupled the service you expect, the most likely scenario is explained below.

A resource is connected to a service by more than the service Name - it is also done via the Name of the top-level span of the trace. This means that a service requires a top level name to be consistent across your resources.
See this in the following image in the address bar:

APM service Name
  1. The service name that is defined for all of these resources (The name selected from the services page in the UI).

  2. The top level name that was applied for each resource during custom instrumentation.

If any resource displays in the UI under another service, despite having the same service name, it is important to ensure that the top level name is the same as the other resources within the expected service.

For example, if you have a resource with a service named tornado-notification with a top level name of tornado.notify, any resource that had both this service Name and top level Name applied would display under this service. However, if you have a resource that has a service name of tornado-notification with a top level name of web_identification, this resource won’t be available under the existing tornado-notification | tornado.notify service in the UI.

These resources, with a top level name of web_identification still appear in the Datadog Application, and can be viewed under the traces section of the APM navigation menu.

An example of modifying the top level name for Python can be found below:

   @tracer.wrap('tornado.notify', service='tornado-notification')
    def notify(self):
        # do something

This function explicitly sets both the service name and Top Level Name, being tornado-notification and tornado.notify respectively.

More examples and documentation can be found on our language-specific instrumentation documentation pages:

Table of Contents