pruned_traces
Creates, updates, deletes, gets or lists a pruned_traces resource.
Overview
| Name | pruned_traces |
| Type | Resource |
| Id | datadog.apm.pruned_traces |
Fields
The following fields are returned by SELECT queries:
- get_pruned_trace_by_id
| Name | Datatype | Description |
|---|---|---|
id | string | The full 128-bit trace ID, encoded as a 32-character hexadecimal string. (example: 0000000000000000abc1230000000000) |
attributes | object | The attributes of a pruned trace returned by the Get pruned trace by ID endpoint. |
type | string | The type of the pruned trace resource. The value is always pruned_trace. (pruned_trace) (example: pruned_trace) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_pruned_trace_by_id | select | trace_id | expand_span_id, time_hint, force_source, include_path, tag_include, tag_exclude, only_service_entry_spans | Retrieve a pruned, hierarchical view of an APM trace by its trace ID.<br />The trace is summarized as a tree of spans rooted at the trace root and reduced in size<br />to keep rendering large traces in the UI practical.<br />This endpoint is rate limited to 60 requests per minute per organization. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
trace_id | string | The trace ID. Accepts either a 32-character hexadecimal string (128-bit trace ID) or a decimal string of up to 39 digits. (example: 0000000000000000abc1230000000000) |
expand_span_id | integer (int64) | Span ID to expand and preserve in the pruned tree even when its branch would normally be summarized. (example: 9876543210987655000) |
force_source | string | Force the trace to be loaded from a specific source. When unset, the API picks the source automatically. (example: driveline) |
include_path | array | Restrict the pruned tree to spans matching the given key:value pairs. Values may be passed as repeated query parameters. (example: [service:web-store]) |
only_service_entry_spans | boolean | When set to true, only service entry spans are included in the pruned tree. (example: false) |
tag_exclude | array | Regex patterns of tag keys whose values must be excluded from the pruned spans. Values may be passed as repeated query parameters. (example: [^_dd.]) |
tag_include | array | Regex patterns of tag keys whose values must be included in the pruned spans. Values may be passed as repeated query parameters. (example: [^http.]) |
time_hint | integer (int32) | Optional Unix time hint, in seconds, used to optimize the lookup of the trace in long-term storage. (example: 1716800000) |
SELECT examples
- get_pruned_trace_by_id
Retrieve a pruned, hierarchical view of an APM trace by its trace ID.<br />The trace is summarized as a tree of spans rooted at the trace root and reduced in size<br />to keep rendering large traces in the UI practical.<br />This endpoint is rate limited to 60 requests per minute per organization.
SELECT
id,
attributes,
type
FROM datadog.apm.pruned_traces
WHERE trace_id = '{{ trace_id }}' -- required
AND expand_span_id = '{{ expand_span_id }}'
AND time_hint = '{{ time_hint }}'
AND force_source = '{{ force_source }}'
AND include_path = '{{ include_path }}'
AND tag_include = '{{ tag_include }}'
AND tag_exclude = '{{ tag_exclude }}'
AND only_service_entry_spans = '{{ only_service_entry_spans }}'
;