• Home
  • Dynatrace API
  • Environment
  • Settings
  • Schemas
  • Span service detection configuration

Settings API - Span service detection configuration schema table

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
Retrieve schema via Settings API
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

PropertyLabelTypeDescriptionRequired
enabledEnabledboolean

If this is true, the rule will be evaluated.

required
ruleRuleRule-required

Request body objects

The ExtractionType object
PropertyLabelTypeDescriptionRequired
typeExtractenum

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"

required
markerMarkertext-required
marker2Marker_2text-required
splitAndSelectMarkerselectAtIndextext-required
The ValueSource object
PropertyLabelTypeDescriptionRequired
sourceSourceenum-required
attributeKeySpan attribute keytext-required
resourceAttributeKeyResource attribute keytext-required
The Extraction object
PropertyLabelTypeDescriptionRequired
uniqueIdIdtext

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
valueSourceValue sourceValueSource-required
transformationsTransformationslist-required
The EventCondition object
PropertyLabelTypeDescriptionRequired
sourceSourceenum-required
sourceKeyKeytext-required
dataTypeData Typeenum-required
stringComparisonTypeComparison Typeenum-required
attrKeyStringComparisonTypeComparison Typeenum

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

required
numComparisonTypeComparison Typeenum

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

required
attrKeyBoolComparisonTypeComparison Typeenum

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

required
boolValueValueenum-required
intValueValueinteger-required
intValuesValuesset

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
floatValueValuefloat-required
floatValuesValuesset

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
strValuesValuesset

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
caseSensitiveCase sensitiveboolean

Affects value(s)

required
The Condition object
PropertyLabelTypeDescriptionRequired
sourceSourceenum-required
eventConditionsEvent conditionsset

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

required
sourceKeyKeytext-required
resourceAttributeKeyKeytext-required
dataTypeData Typeenum-required
stringComparisonTypeComparison Typeenum-required
attrKeyStringComparisonTypeComparison Typeenum

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

required
numComparisonTypeComparison Typeenum

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

required
boolComparisonTypeComparison Typeenum-required
attrKeyBoolComparisonTypeComparison Typeenum

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

required
boolValueValueenum-required
intValueValueinteger-required
intValuesValuesset

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
floatValueValuefloat-required
floatValuesValuesset

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
strValuesValuesset

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
spanKindValueValuesset-required
caseSensitiveCase sensitiveboolean

Affects value(s)

required
The ServiceIdContributor object
PropertyLabelTypeDescriptionRequired
sourceSourceenum-required
sourceKeyKeytext-required
resourceAttributeKeyKeytext-required
extractionValueExtraction idtext-required
The MethodIdContributor object
PropertyLabelTypeDescriptionRequired
sourceSourceenum-required
sourceKeyKeytext-required
resourceAttributeKeyKeytext-required
extractionValueExtraction idtext-required
The ServiceDetection object
PropertyLabelTypeDescriptionRequired
outputTypeOutputenum

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.

required
idService id contributorsset-required
serviceNameService nametext

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 in order to be used as a service name
Resource attributes must be allow-listed in order to be used as a service name

required
The DefaultMethodRule object
PropertyLabelTypeDescriptionRequired
outputTypeOutputenum-required
idIdtext-required
nameNametext-required
The ServiceMethodDetectionRule object
PropertyLabelTypeDescriptionRequired
methodRuleNameRule nametext-required
conditionsMethod conditionsset

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

required
outputTypeOutputenum

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.

required
idMethod id contributorsset-required
methodNameMethod nametext

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 in order to be used as a method name
Resource attributes must be allow-listed in order to be used as a method name

required
The Rule object
PropertyLabelTypeDescriptionRequired
ruleNameRule nametext-required
technologyTechnologytext-optional
extractionsExtractions (Optional)list

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
serviceDetectionService detectionServiceDetection-required
serviceMethodDetectionRuleService method detectionlist

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
defaultMethodRuleDefault method ruleDefaultMethodRule

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
conditionsConditionsset

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

required