• /
  • Log in
  • Free account

NerdGraph tutorial: Understand entity relationships and dependencies

One way to understand how your entities relate to each other is using our NerdGraph API. You can use the relatedEntities field to see how pairs of entities interact and how they're related. This can help troubleshoot upstream and downstream services and understand how minor issues may have larger repercussions, similar to how service maps can be used.

To learn general information about entities, their relationships, and how to use them, see Entities.

Relationship types

Relationship types provide additional information about how two entities are related. The supported relationship types are:

Type

Description

CALLS

The relationship between one service or application calling another. Used to display upstream and downstream services.

CONTAINS

The relationship and hierarchical use cases common to modern and cloud infrastructure. For example, this could indicate that the HOST contains a container.

HOSTS

The relationship between an application or process and the system it runs on.

SERVES

The relationship between a back-end application and the browser application it returns in the response.

is

The relationship between an entity captured as a separate entity by another telemetry data source in addition to the one you are currently viewing.

Read relationships of an entity

You can use NerdGraph to return the relationships between your monitored entities. The following example shows how to query an entity by its specific GUID, using the NerdGraph GraphiQL explorer. For more information, see Use NerdGraph to query entities.

query{
  actor{
    entity(guid: YOUR_ENTITY_GUID){
      name
      relatedEntities {
        results {
          source {
            entity {
              guid
              name
            }
          }
          target {
            entity {
              guid
              name
            }
          }
          type
        }
      }
    }
  }
}

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.