---
title: Guide to key transactions
source: https://docs.newrelic.com/docs/apm/transactions/key-transactions/introduction-key-transactions
---

Key transactions are a way for engineering teams to create custom level monitoring on their most meaningful transactions. The APM monitoring tools of New Relic help you swiftly detect and solve problems before they impact your users by reporting on _all transactions_. But sometimes the information that is essential to running your digital business isn't the most highly trafficked.  This is where key transactions can help you track essential transactions you want to monitor and manage—regardless of the overall application throughput.

## Key transactions in practice

Let's think about a scenario where a customer logs in to your e-commerce application to purchase a phone. The customer experiences slow response when they try load the plans page and browse the services. This results in the customer leaving the site and abandoning the purchase. Your `PlanService` microservice team needs to quickly identify the root cause of this slowdown and fix it to avoid losing more customers.

Your team starts by identifying `PlanService`'s most important business transaction: `getPlans` (which loads the plans page). Then, you need to make `getPlans` a key transaction, apply relevant tags, and analyze it within the context of the greater [entity ecosystem](https://docs.newrelic.com/docs/new-relic-solutions/new-relic-one/core-concepts/what-entity-new-relic/).

You can learn more about transactions and if your framework supports them in our [APM docs](https://docs.newrelic.com/docs/apm/transactions/intro-transactions/transactions-new-relic-apm/).

**Create key transactions**

To make `getPlans` a key transaction:

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > APM & Services**.
2.  Go to **Transactions** in the left navigation.
3.  Select the `getPlans` transaction.
4.  Select **Make key transaction** in the transaction details view. You can also automate this step by using the REST API to both create and stop tracking key transactions.

    ![A screenshot decpicting how to create a key transaction](https://docs.newrelic.com/images/apm_screenshot-full_make-a-key-transaction.webp "Create a key transaction")

    After you create key transactions, they become part of the New Relic entity ecosystem. You can see all the transactions, including the `getPlans` key transaction you just created, under the **entity list view**.

**Rename a key transaction**

Let's say you want to rename your key transaction to make it more accurate or easier to filter, here's how:

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Key transactions**.
2.  From the index, select the key transaction you want to rename.
3.  Choose **Application** in the settings area from the left navigation.
4.  Enter a new name for the transaction, then save.

**Change Apdex settings**

You can set a custom [Apdex threshold](https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/apdex-measuring-user-satisfaction) for a key transaction if it is a [web transaction](https://docs.newrelic.com/docs/new-relic-solutions/get-started/glossary/#transaction). Apdex is not applicable for [non-web-transactions](https://docs.newrelic.com/docs/new-relic-solutions/get-started/glossary/#non-web-transaction).

> #### ⚠️ IMPORTANT
>
> Key transaction Apdex settings override the T value set for that app. This can mean, for example, that a key transaction could be reported as **Satisfied** but a different transaction in the same app with the same response time could be **Frustrated**.

To change a key transaction's Apdex threshold:

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Key transactions**.
2.  From the index, select the **key transaction** you want to rename.
3.  Choose Application in the settings area from the left navigation.
4.  Enter a new value in seconds under the **Apdex T** heading, then save.

    The Apdex threshold affects how key transaction traces are created.

**Delete key transactions**

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Key transactions**.
2.  From the index, select the Key Transaction you want to delete.
3.  Choose **Application** in the settings area from the left navigation.
4.  Select **stop tracking** key transaction.

    New Relic automatically deletes any associated alerts and events for the deleted key transaction.

## Tag key transactions

In APM, you can organize and filter the key transactions so you can quickly determine the teams, environments, or the priority levels, by adding a **tag** to your [key transactions](https://docs.newrelic.com/docs/apm/transactions/key-transactions/introduction-key-transactions/). These tags also provide context so you can isolate the issue when you get an alert notification.

Tags are metadata associated with transactions. They're useful for applying to transactions that have things in common. For example, you might apply a `checkout` tag to all key transactions that are part of the checkout process. Then you can filter by `checkout` to see all of those transactions in one place.

In our scenario, the `PlanService` microservice team is trying to identify slowdowns at checkout and they might want to easily filter by `environment` or `accountid` so they can identify problems and find fast solutions.

**Assign tags**

To assign a tag to a key transaction:

1.  Go to **[one.newrelic.com](https://one.newrelic.com/all-capabilities)** and select a key transaction.

2.  Near the entity's name at the top of the page, select the **See metadata and manage tags** menu.

3.  In the **Add a new tag...** field of the pop-up menu, add a tag with this format: `accountId: 123456789`.

    ![A screenshot depicting how to tag a key transaction](https://docs.newrelic.com/images/apm_screenshot-full_tag-a-key-transaction.webp "Tag a key transaction")

4.  For APM agents, if you want to use those tags in NRQL queries, restart your service.

**Filter tags**

To filter key transactions by tags:

1.  Go to **[one.newrelic.com](https://one.newrelic.com/all-capabilities)**.
2.  Click the **Filter by ...** field to see a dropdown of available attributes and tags or enter a tag you want to filter by, such as `accountId: 123456789`.

## Group key transactions and create alerts

After you've created a key transaction you can increase its visibility by connecting it to our alerts tools and workloads.

**Add your key transaction to a workload**

In New Relic, you can use workloads to group together entities that make up a specific business service. This grouping makes it easier to isolate and troubleshoot issues. Add your key transactions to workloads along with the related services and hosts, so you can get an aggregated view of the health and activity of the entities that make up your stack.

This example screenshot shows a comprehensive workload view of the `getPlans` key transaction with all the other related entities.

![A screenshot depiciting workloads and key transactions](https://docs.newrelic.com/images/apm_screenshot-full_workloads-and-key-transactions.webp "Workloads and key transactions")

**Set up alerts for a key transaction**

Now that your key transaction is part of a workload and tagged, the next step is to create alerts so you're notified when there is any unusual behavior in your transaction. You can set up both [static alerts](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/get-started/your-first-nrql-condition/#static-threshold) and [anomaly alerts](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/get-started/your-first-nrql-condition/#anomaly-threshold) on key transactions using the powerful and flexible [NRQL alerting system](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions/) and now you can also add your key transactions to dashboards. If you want to set up alerts or add the key transactions to dashboards, you can do so directly from the key transaction charts by clicking the ellipsis.

**Create service levels for key transactions.**

In addition to alert thresholds, you can also measure the performance from your application users' point of view. To do this, set up [service levels](https://docs.newrelic.com/docs/service-level-management/intro-slm/) against the business key transactions.

## Use key transactions in context

After you've created a key transaction, added tags, created workloads, and set up alerts, you can start to analyze your data in context with other entities that you monitor. Once you understand its role within your wider system you can take any additional steps to improve uptime and reliability.

**Analyze deviations with New Relic Lookout**

To quickly analyze deviations in all your key transactions, you can start with New Relic [Lookout](https://docs.newrelic.com/docs/new-relic-solutions/new-relic-one/core-concepts/new-relic-lookout-monitor-your-estate-glance/). This provides a real-time view of your transactions across all your accounts, highlighting changes in all of your telemetry. In this example, you can see the `getPlans` transaction shows an increase in response time:

![A screenshot depicting New Relic Lookout and key transactions.](https://docs.newrelic.com/images/apm_screenshot-full_lookout-and-key-transactions.webp "New Relic Lookout and key transactions")

**Understand impact through service maps**

To understand the complete impact of the `getPlans` transaction performance degradation, you can use a [service map](https://docs.newrelic.com/docs/new-relic-solutions/new-relic-one/ui-data/service-maps/introduction-service-maps/). You can visualize the health of all the other connected entities like the originating service, hosts, databases, and other key transactions.

![A screenshot depicting service level maps and key transactions](https://docs.newrelic.com/images/apm_screenshot-full_service-maps-and-key-transactions.webp "Service maps and key transactions")

**Track changes**

To track the impact of any change event, such as code deployments, configuration changes, and business events, you can use the [change tracking markers](https://docs.newrelic.com/docs/change-tracking/change-tracking-view-analyze/) on the key transaction charts. This helps you drill down further in the trace to troubleshoot the changes that are causing issues.

In this screenshot, you can see a spike in the `getPlans` transaction time right after a deployment for optimizing a database query. This helps you trace back the problem to the deployment. In this example, when we reverted the change, the transaction time went back to normal and the plans page started loading quickly.

![A screenshot depicting change tracking and key transactions](https://docs.newrelic.com/images/apm_screenshot-full_key-transactions-track-changes.webp "Key transactions and change tracking")
