Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Tracing services

Updated on November 15, 2021

You can use the Tracer to monitor any active requestor session. However, a service usually runs in a new requestor session with a requestor ID that is not created until the service begins processing. At that point, the processing that the service performs in that requestor session occurs so quickly (in less than one second), that it can be hard to catch the event to trace it.

In this situation, it is recommended that you use the Trace Open Rule feature to trace the service rule. You can use this feature to trace a service request that is invoked from an external client application.

The ability to trace services comes with a performance impact even when you are not actively tracing, therefore it is recommended that you disable service tracing in production environments and during performance testing unless you are troubleshooting a related issue.

Service rule tracing is only enabled in environments where the trace/cluster/ServiceRuleWatchMaxProductionLevel Dynamic System Settings is greater than or equal to the production level. By default, trace/cluster/ServiceRuleWatchMaxProductionLevel is set to 4, which means that the ability to trace service rules would not work in a production level 5 environment until trace/cluster/ServiceRuleWatchMaxProductionLevel is increased to 5.

  • Owning Ruleset: Pega-RulesEngine
  • Setting Purpose: trace/cluster/ServiceRuleWatchMaxProductionLevel
  • Value: <greater than or equal to the production level, for example, 5>

To use the Trace Open Rule feature to trace and debug a service rule:

  1. Open the service rule by performing one of the following tasks:
    • In the developer toolbar of Dev Studio, click Tracer.
    • In the developer toolbar of App Studio, click Tracer.
  2. Click ActionsTrace. The Tracer tool window opens.
  3. Click Settings to open the Tracer Settings window.
  4. In the Event Types to Trace section, select Services.
  5. In the Rulesets to Trace section, select the rulesets that contain the service rule and service activity.
  6. Click OK to close the Tracer Settings window.
  7. Run the rule.
  8. Watch the Tracer window as the rule runs. The window includes lines for the start and end of each service rule execution, lines for the start and end of request mapping, lines for the start and end of response mapping, and (if these options are selected in the Tracer Settings panel) lines for the start and end of parse rules, XML Stream rules, and HTML rules.
Result:

The Tracer offers the following trace options for services:

  • Services – The Tracer adds steps for when the service invocation begins and ends. Nested within those steps are entries that show when the inbound data mapping begins and ends, and when the outbound data mapping begins and ends.
  • Parse Rules  – The Tracer adds steps when a parse rule (delimited, structured, or XML) begins and ends processing.
  • Stream Rules   – The Tracer adds steps when an HTML rule or XML Stream rule begins and ends processing.
  • Cluster-wide tracing of service rules

    You can trace service rules across a cluster. Cluster-wide tracing makes it easier for you to troubleshoot services in clustered configurations where a load balancer dynamically assigns service requests to nodes in the cluster. This functionality is especially useful for debugging mobile applications, RESTful Web Services, and other stateless service executions.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us