Try it free

Comparison of Service Detection v2 and Service Detection v1 (Services Classic)

  • Dynatrace Classic
  • Explanation
  • 3-min read
  • Published Nov 09, 2026

The Dynatrace platform offers two service detection approaches: Service Detection v2 (SDv2) and Service Detection v1 (SDv1). Use this page to decide which approach fits your workload.

In most cases, SDv2 is the recommended approach. SDv2 is the only option for OpenTelemetry services and the recommended default for Kubernetes and AWS Lambda. SDv1 remains the right choice in specific cases, for example, for workload types that host multiple applications in a single process.

Service detection in SDv2 and SDv1

SDv2 and SDv1 differ in the signals they evaluate to detect a service.

SDv2 detects services through attribute-based rules evaluated against incoming spans. Built-in rules cover common sources, such as OpenTelemetry and Kubernetes, and you can add your own service detection rules when required. Because service detection rules rely on resource attributes, such as service.name or k8s.workload.name, SDv2 treats OpenTelemetry and OneAgent data the same way. For OneAgent-monitored workloads, SDv2 maps each process to one service.

SDv1 is the original service detection for OneAgent-instrumented processes. SDv1 detects services from technology-specific details in the span, such as the invoked Java classes or the web application context. Then it sorts services into several service types: web request services, web services, database services, messaging services, remote services, background activities, and custom services. Because of this, SDv1 can split one process into multiple services, for example, one service per deployed web application.

Comparison at a glance

AspectSDv2SDv1
Service detectionRule-based. Attribute-based rules are evaluated against every span.Technology-specific. Detection is based on code-level content and anchored to a process group of a OneAgent-instrumented process.
Data sourcesOpenTelemetry and OneAgentOneAgent-instrumented processes
Service granularityOne service per processOne process can be split into multiple services
Service namingDerived from resource attributes and customizable through attribute-based rules that apply consistently across every span.Built-in and custom service naming rules that set the display name on the service entity only.
Custom service definitionsThe class or method you define becomes a span on the service it runs in. No separate service is created.The class or method you define becomes the entry point of a separate custom service.

When to use Service Detection v2

Choose SDv2 for the following use cases:

  • OpenTelemetry: SDv2 is the only option for OpenTelemetry services. OpenTelemetry instrumentation always uses SDv2, regardless of the OneAgent activation.
  • Kubernetes: SDv2 is the recommended default for OneAgent-monitored services running in Kubernetes.
  • AWS Lambda: SDv2 is the recommended default for OneAgent-monitored AWS Lambda functions.
  • Web servers and single-service processes Early Access: SDv2 is available for OneAgent-monitored workloads where each process runs exactly one service. Examples include web servers (such as NGINX, Apache HTTP Server, or IIS) and containerized services on AWS ECS, Google Cloud Run, or Azure Container Apps.

Across all these workloads, SDv2 provides one naming model: service names come from resource attributes, so spans, logs, and metrics use the same name, and you maintain detection and naming through attribute-based rules instead of per-technology configuration.

For OneAgent-monitored workloads, you activate SDv2 manually for each deployment scenario. For details, see Configure service detection for OneAgent in Service Detection v2 (Services Classic).

When to use Service Detection v1

Keep SDv1 for the following use cases:

  • Application servers and multi-service processes: Use SDv1 when a single process runs multiple applications, for example, a JVM on IBM WebSphere, Oracle WebLogic, another J2EE server with several deployed applications, or Adobe ColdFusion with multiple contexts. SDv1 detects a separate service for each application.

    SDv2 doesn't work for this use case because it maps the entire process to a single service, and the applications can't be distinguished.

  • Background or scheduled workloads with no inbound request: Use SDv1 for workloads that are timer-, cron-, or thread-triggered.

    SDv2 doesn't work for this use case because detection is built around inbound request spans.

  • Mainframe workloads: SDv1 remains the recommended approach for mainframe workloads.

  • Dependencies on SDv1 custom services or service IDs: Keep SDv1 until you've updated everything that references those custom services or service IDs.

    Because SDv2 assigns new service IDs and SDv1 custom services become spans on the service they run in, custom services no longer have their own service ID. For details, see Migration considerations.

Migration considerations

When you move a workload from SDv1 to SDv2, note the following:

  • Expect service IDs to change: SDv2 detects new services with new service IDs. Update everything that references your SDv1 services by ID, including SLOs, dashboards, notebooks, alerting and anomaly detection configurations, and API-based automations. Historical data is retained under the IDs of SDv1 services and is not carried over to the new SDv2 services.
  • Roll out gradually: When you activate SDv2 for OneAgent, use a matching condition to limit it to a subset of your workloads, for example, a test namespace or a non-production host group. Compare the detected services with what you had in SDv1, and only then widen the condition step by step. For details, see Configure service detection for OneAgent in Service Detection v2 (Services Classic).
  • Recheck your custom services: In SDv2, a custom service definition does not create its own service. The class or method you defined becomes a span on the service it runs in, so any references to the SDv1 custom service stop working. For details, see Custom service behavior in SDv1 and SDv2.

FAQ

Can SDv1 and SDv2 run at the same time in one environment?

Yes. Service detection is set per workload, not per environment. Workloads that match the SDv2 matching condition in the service detection rule use SDv2, and all other OneAgent-monitored workloads keep using SDv1. For example, you can use SDv2 for a Kubernetes cluster and keep SDv1 for application servers on other hosts. OpenTelemetry data always uses SDv2.

When services from both approaches call each other, the trace connects them across the boundary, so you see the full call chain.

Can I switch back from SDv2 to SDv1?

Yes. To switch back, change the matching condition of the relevant service detection rule so that the workload no longer matches. OneAgent then uses SDv1 again for that workload.

When you switch back:

  • SDv1 detects services again using the same service IDs as before, as long as the SDv1 service detection rules haven't changed. Data recorded before the switch is again attached to those services.
  • Data recorded while the workload used SDv2 stays with the SDv2 services. This data is not moved to the SDv1 services.
  • For the period the workload used SDv2, the SDv1 services have no data.
What happens to historical data and SLO history after migration to SDv2?

Historical data stays with the SDv1 services and remains available for the configured retention period. This data is not moved to the new SDv2 services.

Related topics

  • Service Detection v2 (Services Classic)
  • Service Detection v1 (Services Classic)
Related tags
Application Observability