Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions content/en/tracing/services/renaming_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ further_reading:
text: "Inferred services"
---

{{< callout url="https://www.datadoghq.com/product-preview/renaming-rules-for-inferred-entities" d_target="#signupModal" btn_hidden="false" header="Join the preview for renaming rules for inferred entities!" >}}
{{< /callout >}}

## Overview

In Datadog, you can rename inferred entities, including datastores and queues, to make them easier to identify and manage. Renaming rules let you override the `peer.service` tag on spans with custom names, or generate names dynamically using tags and regular expressions. This functionality applies across all of APM, not only in the [Software Catalog][3]. After a rule is created, the updated names appear consistently in service maps, Trace Explorer, monitors, dashboards, and any other APM view.
Expand All @@ -27,36 +24,35 @@ You must have the `apm_service_renaming_write` permission to create renaming rul

## Create a renaming rule

### Step 1: Select entities to rename
### Step 1: Select renaming action and entities to target

1. In Datadog, navigate to **APM > Settings > Service Renaming** and click **+ Add Rule**.
1. In Datadog, navigate to **APM > Software Catalog > Manage > Manage Renaming Rules** and click **+ Add Rule**.

Alternatively, navigate to **APM > Software Catalog** and click on a service to open the service side panel. From there, click **Service Page > Service Renaming**.

{{< img src="tracing/services/renaming_rules/service-side-panel.png" alt="The side panel for a particular service, showing the Service Page dropdown menu with a Service Renaming option" style="width:100%;" >}}

1. Choose a renaming action you want to perform for your new renaming rule.
1. You can select to split a single entity, rename an entity, merge multiple entites together, or rename several entities.

1. Use the search bar to select the entities you want to rename.
1. You can select one or more entities, but all must be of the same type (service, datastore, or queue).
1. As you select entities, a span query is built in the background. To edit the query, select the code icon to the right of the search bar.
1. As you select entities, a span query is built in the background. To edit the query, select **Build Advanced Query**.

{{< img src="tracing/services/renaming_rules/create-service-rename-rule-search.png" alt="Step 1 in the Create Service Rename Rule UI, prompting the user to filter and select the entities to rename" style="width:100%;" >}}

### Step 2: Choose a rename method
### Step 2: Specify new entity name

1. In the text box, enter a unique name for the selected entity (or entities). Alternatively, use tag values with the `{{tagName}}` syntax to rename based on an entity's tags.
1. If tag values follow a pattern, apply a regular expression to extract only the portion you want in the name.

{{< img src="tracing/services/renaming_rules/create-service-rename-rule-tags.png" alt="Step 2 in the Create Service Rename Rule UI, prompting the user to choose how to rename the selected entities" style="width:100%;" >}}


### Step 3: Name your rule and review

1. Enter a descriptive name for the renaming rule so you can identify it later.
1. Optionally, enter a descriptive name for the renaming rule so you can identify it later.
1. Review and save your renaming rule.

**Note:** Rules are processed at intake and applied to data as it comes in. Changes affect only spans ingested while a rule is active, and past data is not updated retroactively. Deleting or modifying a rule stops it from applying to new data, but does not revert names on previously ingested data.

{{< img src="tracing/services/renaming_rules/create-service-rename-rule-reviewandsave.png" alt="The final step of the Create Service Rename Rule UI, prompting the user to review and save their renaming rule" style="width:100%;" >}}

## Further reading

Expand Down
Loading