Service Detection v2 (SDv2) allows you to define services based on resource attributes. You can use the default Dynatrace detection rules and also define your own custom rules.
This page describes service detection for SDv2, how to use default detection rules, and how to create your own custom rules.
Since the introduction of Unified Services, Dynatrace has provided several default service detection rules.
Priority
Condition
Service name
1
adobe.em.tier
, adobe.em.env_type
, adobe.em.program
attributes present
{adobe.em.tier}-{adobe.em.env_type}-{adobe.em.program}
2
k8s.workload.name
attribute present
{k8s.workload.name}
3
dt.kubernetes.workload.name
attribute present
{dt.kubernetes.workload.name}
4
istio.canonical_service
attribute present
{istio.canonical_service}
5
service.name
attribute present
{service.name}
The service ID is a unique identifier, such as SERVICE-649B4E44CBA804F4
, that is the result of hashing the service name string and service splitting attributes, when applicable.
Detection rules are customized in Settings > Process and contextualize > Services > Service detection.
In Service detection, select Add rule.
Fill in the following optional and required fields:
Rule name: required A user-defined name for the rule.
Description: optional A human-readable descriptor of the rule.
Matching condition: required A DQL matcher. If the matching condition applies, the rule is evaluated.
Service name template: required The name that you want the service to have.
You can use plain text, or resource attributes surrounded by curly braces ({}
).
In order for the rule to be applied, the span must have all of the specified resource attributes.
Additional service detection attributes: optional Additional attribute(s) used to detect and split services without affecting the generated name.
Each attribute consists of a resource attribute specified without curly braces, e.g. service.name
or k8s.workload.name
.
Up to 10 additional service detection attributes can be applied.
To save, select Save changes.
You can re-order custom rules.
You can also edit a custom rule.
To delete a custom rule
You can delete only custom rules, not the built-in rules.