Span settings
OneAgent version 1.215+ Dynatrace version 1.216+
Dynatrace automatically captures all OpenTracing and OpenTelemetry spans, but you can control and adapt how OpenTelemetry and OpenTracing spans are combined with OneAgent data into PurePath® distributed traces.
The span settings are available at Settings > Server-side service monitoring. You can define rules to:
- Store and mask only specific attributes—Attribute capturing
- Exclude specific spans—Span capturing
- Define spans that should be considered as entry points—Span entry points
- Enable context propagation for certain spans—Span context propagation
For details, see the sections that follow.
Attributes
Dynatrace automatically captures all OpenTelemetry attributes. If you want to prevent the accidental storage of personal data, you can exclude certain attribute keys for which the values must not be persisted. By omitting attributes containing personal data, you can meet your organization's privacy requirements and control the scope of stored monitoring data.
To configure attribute storage and masking settings for your environment
- Go to Settings.
- Select Server-side service monitoring > Attribute capturing.
- optional To change the default OpenTelemetry attribute persistence, go to Preferences.
- To store all attributes except the ones in the Blocked attributes list, select Allow all attributes
- To block all attributes except the ones in the Allowed attributes list, select Block all attributes
Only one setting preference is possible.
- Add an attribute name to the attribute list.
- On the Attribute capturing page, select Blocked attributes or Allowed attributes.
Allowed attributes list Dynatrace recommends a few basic attributes to generally be included, such as
service.name
orservice.version
. For ease of use, Dynatrace comes with a default configuration that can be adjusted. - Select Add item to add a new key to the attribute list and enter the key.
- Select Save changes.
- On the Attribute capturing page, select Blocked attributes or Allowed attributes.
- Perform the following actions to mask a stored attribute value.
- On the Attribute capturing page, select Attribute data masking.
- Select Add item to add a new key to the masked attributed list.
- Enter a stored value key and select an option from the Masking dropdown list. To learn more about masking options, see OpenTelemetry traces.
- Select Save changes.
You can then find the attribute key on the Distributed traces page on the Summary tab.
Span capture
All detected OpenTelemetry and OpenTracing spans are captured by default. This means that every detected span is added to distributed traces. This gives code-level visibility along with span attributes, even for technologies not supported by OneAgent out of the box.
You can create request attributes based on spans to segment the distributed traces.
We recommend that you exclude spans for technologies supported out of the box by OneAgent for Java and Go.
To control your span capturing
-
Go to Settings > Server-side service monitoring > Span capturing.
-
Select Add item.
-
Enter a Rule name.
-
In the Rule action list, decide whether you want to Ignore or Capture spans matching the criteria you're about to define.
-
Select Add item.
-
You can control span capturing based on the value of the following sources:
- Attribute
- Instrumentation scope name,
OpenTelemetry
- Instrumentation scope version
- Span kind—for example,
server
- Span name
-
Select the Comparison type—for example, Contains or Equals.
-
Enter the value for the source you specified earlier.
-
By default, the search for key and value is not case sensitive. Turn on Case sensitive if you want your rule to consider key and value case.
-
Select Save changes.
Span entry points
By default:
- OpenTelemetry/OpenTracing span kinds
server
andconsumer
start new distributed traces automatically. This means that all OneAgent sensors contribute to that distributed trace and a default service is created for the distributed trace. - OpenTelemetry/OpenTracing span kinds
client
,internal
, andproducer
don't start new distributed trace automatically.
You can choose to start distributed traces based on client
, internal
, and producer
span kinds, and to opt out for server
and consumer
span kinds, based on various span details.
To control your span entry points
- Go Settings > Server-side service monitoring > Span entry points
- Select Add item.
- Enter a Rule name.
- In the Rule action list, specify Create entry point or Do not create entry point for spans matching the criteria you're about to define.
- Select Add item.
- You can control span entry points based on the value of the following sources:
- Attribute
- Instrumentation scope name,
OpenTelemetry
- Instrumentation scope version
- Span kind—for example,
server
- Span name
- Select the Comparison type—for example, Contains or Equals.
- Enter the value for the source you specified earlier.
- By default, the search for key and value is not case sensitive. Turn on Case sensitive if you want your rule to consider key and value case.
- Select Save changes.
Span context propagation
Context propagation enables you to connect distributed traces through OpenTelemetry/OpenTracing. You can connect distributed traces through any protocol and propagate the inject and extract usage to the Dynatrace PurePath® distributed traces context.
To reduce the risk of context propagation conflicts with built-in sensors, context propagation is disabled by default and is limited to spans matching the criteria of your choice.
To define rules to enable context propagation for specific spans
- Go Settings > Server-side service monitoring > Span context propagation
- Select Add item.
- Enter a Rule name.
- In the Rule action list, specify Propagate or Do not propagate span context for spans matching the criteria you're about to define.
- Select Add item.
- You can control span context propagation based on the value of the following sources
- Attribute
- Instrumentation scope name,
OpenTelemetry
- Instrumentation scope version
- Span kind—for example,
server
- Span name
- Select the Comparison type—for example, Contains or Equals.
- Add the value for the source you specified earlier.
- By default, the search for key and value is not case sensitive. Turn on Case sensitive if you want your rule to consider key and value case.
- Select Save changes.