Example business transaction configurations

Examples of how to correlate logically-related traces with business transactions in Splunk Observability Cloud.

This page describes example business transaction rule configurations and their use cases.

Rule that groups traces that include a service

How to configure a business transaction rule that groups traces that include a service.

This example business transaction rule:

  • Groups every trace that includes the service service.example.

  • Creates a distinct business transaction for every endpoint on the service.

  • Names business transactions according to the service:endpoint syntax, which uses the service and endpoint name from the matched service span.

You can use this rule to track every endpoint separately in scenarios where each endpoint represents a distinct business process. This rule automatically generates a business transaction for every available service:endpoint combination so that you don't need to specify a rule for every business transaction.

  1. From the Splunk Observability Cloud main menu, select Settings, then APM business transactions.
  2. Select New Rule.
  3. For Rule Type, select Service.
  4. Under Match criteria, select service.example from the Service drop-down menu.
  5. Under Naming, confirm that the Business transaction name is set to Matched service:endpoint. If it isn't, select it from the drop-down menu.
  6. Select Create to save your changes and create the rule.
  7. View the list of rules to confirm that the rule you just created is turned on. If it isn't, use the toggle next to the rule name to turn on the rule.
  8. To evaluate a trace against the rule set and generate a name for the business transaction, copy and paste a trace ID into the Rule Tester field.
  9. By default, the newest rule has the highest priority. This means Splunk APM applies the new rule before applying any other rules. If there are other rules you want to apply first, adjust the priority of the new rule.
  10. Select Save Changes to apply the new rule and priority list.

Rule that groups relevant endpoints

How to configure a business transaction rule that groups related endpoints from a service.

This example business transaction rule groups related endpoints from a service.

You can use this example rule to monitor endpoints that represent the same business process. In this example, you have a service named service.example and the endpoints /checkout/v1/, /checkout/v2/, and /checkout/, which all correspond to the same checkout process in the backend.

  1. From the Splunk Observability Cloud main menu, select Settings, then APM business transactions.
  2. Select New Rule.
  3. For Rule Type, select Service.
  4. Under Match criteria:
    1. Select service.example from the Service drop-down menu.
    2. Select /checkout/v1/, /checkout/v2/, and /checkout/ in the drop-down menu.
  5. Under Naming, set the Business transaction name to Custom name. Under String, enter checkout.
  6. Select Create to save your changes and create the rule.
  7. View the list of rules to confirm that the rule you just created is turned on. If it isn't, use the toggle next to the rule name to turn on the rule.
  8. To evaluate a trace against the rule set and generate a name for the business transaction, copy and paste a trace ID into the Rule Tester field.
  9. By default, the newest rule has the highest priority. This means Splunk APM applies the new rule before applying any other rules. If there are other rules you want to apply first, adjust the priority of the new rule.
  10. Select Save Changes to apply the new rule and priority list.

Access the list of business transactions in the APM landing page or APM service map. You should now see a business transaction named checkout, which corresponds to all traces that involve the endpoints /checkout/v1/, /checkout/v2/, and /checkout/ in the service service.example, provided no higher priority rule matches the trace.

Rule that generates a business transaction on an endpoint only if it is at the root of a trace

How to configure a business transaction rule that generates a transaction based on a specific endpoint name, but only if that endpoint is at the root of the trace.

This business transaction rule generates a transaction based on a specific endpoint name, but only if that endpoint is at the root of the trace.

Suppose you have a service named service.example, and you want to track whenever the trace starts from the /addtocart/ endpoint. You can use this rule to track traces based on which endpoint was called at the very beginning, rather than somewhere in the middle.

  1. From the Splunk Observability Cloud main menu, select Settings, then APM business transactions.
  2. Select New Rule.
  3. For Rule Type, select Service.
  4. Under Match criteria:
    1. Select service.example from the Service drop-down menu.
    2. Select /addtocart/ from the drop-down menu.
  5. Check the box corresponding to Apply only if service and endpoints are at root of trace. This setting ensures that this rule will only be triggered if the service/endpoint combination is at the beginning of the trace.
  6. Under Naming, confirm that the Business transaction name is set to Matched service:endpoint. If it isn't, select it from the drop-down menu.
  7. Select Create to save your changes and create the rule.
  8. View the list of rules to confirm that the rule you just created is turned on. If it isn't, use the toggle next to the rule name to turn on the rule.
  9. To evaluate a trace against the rule set and generate a name for the business transaction, copy and paste a trace ID into the Rule Tester field.
  10. By default, the newest rule has the highest priority. This means Splunk APM applies the new rule before applying any other rules. If there are other rules you want to apply first, adjust the priority of the new rule.
  11. Select Save Changes to apply the new rule and priority list.

Access the list of business transactions in the APM landing page or APM service map. You should now see a business transaction named service.example:/addtocart/, which represents the traces that begin with a span corresponding to the service service.example and endpoint /addtocart/.