godo.Insights.GetTrace()
Generated on 5 Nov 2026
from godo version
v1.236.0
Usage
client.Insights.GetTrace(ctx context.Context, region string, traceID string, opt *godo.TraceGetOptions) (*godo.Trace, *godo.Response, error)Description
GetTrace retrieves a trace and its spans by trace ID. A trace is only
resolvable in the region that ingested it, and only spans that started within
the lookup window are returned. Trace.Truncated reports whether the trace has
more spans than were returned.
This method sends a GET request to /v2/insights/query/{}/traces/{}.
Parameters
regionstring requiredtraceIDstring requiredopt*godo.TraceGetOptions
Fields of godo.TraceGetOptions
TraceGetOptions narrows the lookup window for GetTrace. Both bounds accept
the same relative and absolute formats as TracesTimeBound. The window
defaults to the last seven days and must not exceed seven days.
FromstringTostring
Returns
- *godo.Trace
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit information.- error
Non-nil when the request fails. API errors are returned as
*godo.ErrorResponse.
Fields of godo.Trace
Trace is a single trace and its spans, ordered by start time.
TraceIDstringSpans[]godo.TraceSpanTruncatedbool
Request Sample
More Information
See GET /v2/insights/query/{}/traces/{} in the API reference for additional detail on responses, headers, parameters, and more.
See the Go package documentation for the source of this method.