Settings API - Span service detection configuration schema table

  • Published Sep 25, 2025

Span service detection configuration (builtin:span-service-detection-config)

Configure a list of span service detection rules which are evaluated in order.

When the first rule matches, the service detection will proceed. Subsequent rules will not be evaluated.

Note: This config applies only to spans captured by OneAgent.

Schema IDSchema groupsScope
builtin:span-service-detection-config
  • group:service-detection
environment
GETManagedhttps://{your-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:span-service-detection-config
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/settings/schemas/builtin:span-service-detection-config
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:span-service-detection-config

Authentication

To execute this request, you need an access token with Read settings (settings.read) scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

PropertyTypeDescriptionRequired
Enabled
enabled
boolean

If this is true, the rule will be evaluated.

required
Rule
rule
Rule-required
The Rule object
PropertyTypeDescriptionRequired
Rule name
ruleName
text-required
Technology
technology
text-optional
Extractions (Optional)
extractions
Extraction[]

Specify a list of extractions that are inherently bound to the rule they are defined in.

Each extraction is composed of at least one transformation but it can also be constructed from multiple chained transformations.

If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.

required
Service detection
serviceDetection
ServiceDetection-required
Service method detection
serviceMethodDetectionRule
ServiceMethodDetectionRule[]

Specify a list of rules which are evaluated in order. When the first rule matches, the service detection will proceed. Subsequent rules will not be evaluated.

required
Default method rule
defaultMethodRule
DefaultMethodRule

Choose whether the span service detection rule should detect a service call or not in case there are no matching service method detection rules but the service detection rule matches the input.

required
Conditions
conditions
Set<Condition>

Specify all conditions which should be evaluated for this rule. A rule is applied if all of the listed conditions match.

required
The Extraction object
PropertyTypeDescriptionRequired
Id
uniqueId
text

This unique identifier can be used to reference to the result of the extraction in later steps (f.ex. Service detection & Service method detection)

The unique identifier must start with a letter and allows the usage of numbers and the following special characters [. _ -]

required
Value source
valueSource
ValueSource-required
Transformations
transformations
ExtractionType[]-required
The ServiceDetection object
PropertyTypeDescriptionRequired
Output
outputType
enum

No service

Any input matching the current rule would not be detected as a service.

Service id and name

The service id is constructed from a set of id contributors. The service name is specified as a format string with placeholders, where each placeholder refers to any of the id contributors.

Each service id contributor induces the condition that its input is available. If it is not available, the rule is considered not matching, the rule is not applied, and ruleset evaluation continues.

  • NO_SERVICE
  • SERVICE_ID_AND_NAME
required
Service id contributors
id
Set<ServiceIdContributor>-required
Service name
serviceName
text

Prefixes: [SpanAttribute, Extraction, ResourceAttribute] i.e. {SpanAttribute:http.url}, {Extraction:my_variable}, {ResourceAttribute:service.name}

Well-known placeholders: {SpanName}, {SpanKind}, {InstrumentationScopeName}, {InstrumentationScopeVersion}

Span attributes must be allow-listed (<your-dynatrace-url>//ui/settings/builtin:span-attribute "Visit Span attribute page") in order to be used as a service name
Resource attributes must be allow-listed (<your-dynatrace-url>//ui/settings/builtin:resource-attribute "Visit Resource attribute page") in order to be used as a service name

required
The ServiceMethodDetectionRule object
PropertyTypeDescriptionRequired
Rule name
methodRuleName
text-required
Method conditions
conditions
Set<Condition>

Specify conditions which should be evaluated for this rule. A rule is evaluated if all of the specified conditions match.

required
Output
outputType
enum

No service

Any input matching the current rule would not be detected at the node.

Method id and name

The method id is constructed from a set of id contributors. The method name is specified as a format string with placeholders, where each placeholder refers to any of the id contributors.

Each method id contributor induces the condition that its input is available. If it is not available, the rule is considered not matching, the rule is not applied, and ruleset evaluation continues.

  • NO_SERVICE
  • METHOD_ID_AND_NAME
required
Method id contributors
id
Set<MethodIdContributor>-required
Method name
methodName
text

Prefixes: [SpanAttribute, Extraction, ResourceAttribute] i.e. {SpanAttribute:http.url}, {Extraction:my_variable}, , {ResourceAttribute:method.name}

Well-known placeholders: {SpanName}, {SpanKind}, {InstrumentationScopeName}, {InstrumentationScopeVersion}

Span attributes must be allow-listed (<your-dynatrace-url>//ui/settings/builtin:span-attribute "Visit Span attribute page") in order to be used as a method name
Resource attributes must be allow-listed (<your-dynatrace-url>//ui/settings/builtin:resource-attribute "Visit Resource attribute page") in order to be used as a method name

required
The DefaultMethodRule object
PropertyTypeDescriptionRequired
Output
outputType
enum
  • NO_SERVICE
  • METHOD_ID_AND_NAME
required
Id
id
text-required
Name
name
text-required
The ValueSource object
PropertyTypeDescriptionRequired
Source
source
enum
  • SPAN_NAME
  • SPAN_ATTRIBUTE
  • INSTRUMENTATION_SCOPE_NAME
  • INSTRUMENTATION_SCOPE_VERSION
  • RESOURCE_ATTRIBUTE
required
Span attribute key
attributeKey
text-required
Resource attribute key
resourceAttributeKey
text-required
The ExtractionType object
PropertyTypeDescriptionRequired
Extract
type
enum

Before (marker)

Select the part of a longer string that comes before the given marker string. The marker string is not part of the returned result. If the marker is not found in the input, the resulting value will be empty.
Example: Before("/") on input "AC/DC" returns "AC"

After (marker)

Select the part of a longer string that comes after the given marker string. The marker string is not part of the returned result. If the marker is not found in the input, the resulting value will be empty.
Example: After("/") on input "AC/DC" returns "DC"

Between (marker_1, marker_2)

Select the part of a longer string that lies between the marker string 1 and marker string 2 (first occurrence of marker string 1, and first occurrence of marker string 2 after marker string 1). The marker strings are not part of the returned result. If any marker is not found in the input, the resulting value will be empty.
Example: Between("AC", "DC") on input "AC/DC" returns "/"

SplitAndSelect (marker, selectAtIndex)

The longer string is split into a list of substrings identified by the given marker string. The selectAtIndex parameter allows to pick one of the substrings in the produced list. If the marker is not found in the input, the resulting list will only contain the original value. SelectAtIndex is 1 based, i.e. the first item has index 1.
Example: SplitAndSelect("/", 2) on input "AC/DC" returns "DC"

  • BEFORE
  • AFTER
  • BETWEEN
  • SPLIT_AND_SELECT
required
Marker
marker
text-required
Marker_2
marker2
text-required
selectAtIndex
splitAndSelectMarker
text-required
The ServiceIdContributor object
PropertyTypeDescriptionRequired
Source
source
enum
  • SPAN_NAME
  • SPAN_KIND
  • SPAN_ATTRIBUTE
  • INSTRUMENTATION_SCOPE_NAME
  • INSTRUMENTATION_SCOPE_VERSION
  • PG_ID
  • EXTRACTION_VALUE
  • RESOURCE_ATTRIBUTE
required
Key
sourceKey
text-required
Key
resourceAttributeKey
text-required
Extraction id
extractionValue
text-required
The Condition object
PropertyTypeDescriptionRequired
Source
source
enum
  • SPAN_NAME
  • SPAN_KIND
  • SPAN_ATTRIBUTE
  • INSTRUMENTATION_SCOPE_NAME
  • INSTRUMENTATION_SCOPE_VERSION
  • RESOURCE_ATTRIBUTE
  • SPAN_EVENT
required
Event conditions
eventConditions
Set<EventCondition>

Specify event conditions which should be evaluated for this rule. A rule is applied if all of the specified conditions match.

required
Key
sourceKey
text-required
Key
resourceAttributeKey
text-required
Data Type
dataType
enum
  • STRING
  • INTEGER
  • FLOAT
  • BOOLEAN
required
Comparison Type
stringComparisonType
enum
  • EQUALS
  • DOES_NOT_EQUAL
  • CONTAINS
  • DOES_NOT_CONTAIN
  • STARTS_WITH
  • DOES_NOT_START_WITH
  • ENDS_WITH
  • DOES_NOT_END_WITH
required
Comparison Type
attrKeyStringComparisonType
enum

Note: Exists/Does not exist ignores any type information i.e. the condition only checks for the existence/non-existence of the attribute key

  • EQUALS
  • DOES_NOT_EQUAL
  • CONTAINS
  • DOES_NOT_CONTAIN
  • STARTS_WITH
  • DOES_NOT_START_WITH
  • ENDS_WITH
  • DOES_NOT_END_WITH
  • EXISTS
  • DOES_NOT_EXIST
required
Comparison Type
numComparisonType
enum

Note: Exists/Does not exist ignores any type information i.e. the condition only checks for the existence/non-existence of the attribute key

  • EQUALS
  • DOES_NOT_EQUAL
  • GREATER_THAN
  • NOT_GREATER_THAN
  • LOWER_THAN
  • NOT_LOWER_THAN
  • GREATER_THAN_OR_EQUAL
  • NOT_GREATER_THAN_OR_EQUAL
  • LOWER_THAN_OR_EQUAL
  • NOT_LOWER_THAN_OR_EQUAL
  • EXISTS
  • DOES_NOT_EXIST
required
Comparison Type
boolComparisonType
enum
  • EQUALS
  • DOES_NOT_EQUAL
required
Comparison Type
attrKeyBoolComparisonType
enum

Note: Exists/Does not exist ignores any type information i.e. the condition only checks for the existence/non-existence of the attribute key

  • EQUALS
  • DOES_NOT_EQUAL
  • EXISTS
  • DOES_NOT_EXIST
required
Value
boolValue
enum
  • TRUE
  • FALSE
required
Value
intValue
integer-required
Values
intValues
set

If regular comparison type i.e. Equals is used, then any of the listed values should match for the condition to be evaluated to true

If negated comparison type i.e. Does not equal is used, then none of the listed values should match for the condition to be evaluated to true

required
Value
floatValue
float-required
Values
floatValues
set

If regular comparison type i.e. Equals is used, then any of the listed values should match for the condition to be evaluated to true

If negated comparison type i.e. Does not equal is used, then none of the listed values should match for the condition to be evaluated to true

required
Values
strValues
set

If regular comparison type i.e. Equals is used, then any of the listed values should match for the condition to be evaluated to true

If negated comparison type i.e. Does not equal is used, then none of the listed values should match for the condition to be evaluated to true

required
Values
spanKindValue
Set<SpanKind>
  • SPAN_KIND_INTERNAL
  • SPAN_KIND_SERVER
  • SPAN_KIND_CLIENT
  • SPAN_KIND_PRODUCER
  • SPAN_KIND_CONSUMER
required
Case sensitive
caseSensitive
boolean

Affects value(s)

required
The MethodIdContributor object
PropertyTypeDescriptionRequired
Source
source
enum
  • SPAN_NAME
  • SPAN_KIND
  • SPAN_ATTRIBUTE
  • INSTRUMENTATION_SCOPE_NAME
  • INSTRUMENTATION_SCOPE_VERSION
  • EXTRACTION_VALUE
  • RESOURCE_ATTRIBUTE
required
Key
sourceKey
text-required
Key
resourceAttributeKey
text-required
Extraction id
extractionValue
text-required
The EventCondition object
PropertyTypeDescriptionRequired
Source
source
enum
  • SPAN_EVENT_NAME
  • SPAN_EVENT_ATTRIBUTE
required
Key
sourceKey
text-required
Data Type
dataType
enum
  • STRING
  • INTEGER
  • FLOAT
  • BOOLEAN
required
Comparison Type
stringComparisonType
enum
  • EQUALS
  • DOES_NOT_EQUAL
  • CONTAINS
  • DOES_NOT_CONTAIN
  • STARTS_WITH
  • DOES_NOT_START_WITH
  • ENDS_WITH
  • DOES_NOT_END_WITH
required
Comparison Type
attrKeyStringComparisonType
enum

Note: Exists/Does not exist ignores any type information i.e. the condition only checks for the existence/non-existence of the attribute key

  • EQUALS
  • DOES_NOT_EQUAL
  • CONTAINS
  • DOES_NOT_CONTAIN
  • STARTS_WITH
  • DOES_NOT_START_WITH
  • ENDS_WITH
  • DOES_NOT_END_WITH
  • EXISTS
  • DOES_NOT_EXIST
required
Comparison Type
numComparisonType
enum

Note: Exists/Does not exist ignores any type information i.e. the condition only checks for the existence/non-existence of the attribute key

  • EQUALS
  • DOES_NOT_EQUAL
  • GREATER_THAN
  • NOT_GREATER_THAN
  • LOWER_THAN
  • NOT_LOWER_THAN
  • GREATER_THAN_OR_EQUAL
  • NOT_GREATER_THAN_OR_EQUAL
  • LOWER_THAN_OR_EQUAL
  • NOT_LOWER_THAN_OR_EQUAL
  • EXISTS
  • DOES_NOT_EXIST
required
Comparison Type
attrKeyBoolComparisonType
enum

Note: Exists/Does not exist ignores any type information i.e. the condition only checks for the existence/non-existence of the attribute key

  • EQUALS
  • DOES_NOT_EQUAL
  • EXISTS
  • DOES_NOT_EXIST
required
Value
boolValue
enum
  • TRUE
  • FALSE
required
Value
intValue
integer-required
Values
intValues
set

If regular comparison type i.e. Equals is used, then any of the listed values should match for the condition to be evaluated to true

If negated comparison type i.e. Does not equal is used, then none of the listed values should match for the condition to be evaluated to true

required
Value
floatValue
float-required
Values
floatValues
set

If regular comparison type i.e. Equals is used, then any of the listed values should match for the condition to be evaluated to true

If negated comparison type i.e. Does not equal is used, then none of the listed values should match for the condition to be evaluated to true

required
Values
strValues
set

If regular comparison type i.e. Equals is used, then any of the listed values should match for the condition to be evaluated to true

If negated comparison type i.e. Does not equal is used, then none of the listed values should match for the condition to be evaluated to true

required
Case sensitive
caseSensitive
boolean

Affects value(s)

required