Defining dependencies

In Cortex, you have the ability to define outgoing dependencies on other entities. Cortex can also automatically discover dependencies for some integrations. Having dependencies defined powers the ability to notify owners when a dependency deprecates its API or makes backwards incompatible changes, and the ability to visualize dependencies in a relationship graph.

Incoming dependencies are inferred based the outgoing dependency definitions.

Visualize dependencies in the relationship graph

In Cortex, you can visualize dependencies using the relationship graph at Tools > Relationship graphs. See the Relationship graph documentation for more information.

Automated dependency notifications

This feature is available in beta. Please reach out to your Cortex Customer Success Manager for access.

When a dependency deprecates its API or makes backwards incompatible changes, Cortex surfaces these issues via these methods:

  • Breaking API changes are listed in your Cortex workspace under Settings > Breaking API changes.

  • Cortex attempts to automatically make comments on PRs containing breaking OpenAPI changes that have downstream dependencies that Cortex knows about.

  • If a breaking change is merged to the default branch, Cortex alerts dependency owners via Slack that a breaking change was merged.

Discovery

Cortex can automatically discover dependencies from your integrations:

How to define dependencies

You can define dependencies manually via an entity's YAML descriptor, via the Cortex UI (if UI editing is enabled), or via the API.

Your user or API key need the Edit entities permission.

Define dependencies in the Cortex UI

  1. Navigate to the entity where you need to define a dependency.

  2. In the upper right corner of the entity details page, click Configure entity.

  3. Click the Hierarchy tab.

  4. In the Dependencies block, click +Add entity.

  5. In the dropdown menu, choose an entity.

  6. Optionally, select an endpoint.

  7. Click Add.

Set an endpoint for a dependency

Before you can select an endpoint from the dropdown when manually defining a dependency, that endpoint must be defined as a path in the entity's YAML file. See the example below:

openapi: 3.0.1
info:
  title: Endpoint Example Service
  description: "This is an example"
  x-cortex-tag: endpoint-example-service
  x-cortex-type: service
paths:
  /hello/world:
    get:
      description: Some description
      requestBody:
        description: optional
      responses:
        "200":
          description: optional
      deprecated: false
  /another/path:
    put:
      deprecated: false

In the UI, the paths will appear in the Endpoint dropdown:

Sync dependencies

Cortex syncs AWS dependencies every day at 8:00 a.m. UTC. All other dependencies sync at 12:00 a.m. UTC.

If you need to sync dependencies manually:

  1. Navigate to Tools > Relationship graphs.

  2. In the upper right corner of the page, click the menu icon, then click Sync dependencies.

Troubleshooting and FAQ

What if I have multiple dependency sources?

When leveraging multiple dependency sources (such as Datadog and a catalog entity's YAML), all the sources will be merged together and deduplicated.

For example, if an entity YAML indicates X->Y and Datadog indicates X->Y and X->Z, we will have two edges presented (X->Y and X->Z).

Last updated

Was this helpful?