runtime

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 3 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTraceId added in v0.20.0

func GetTraceId(ctx context.Context) string

GetTraceId returns the X-trace-id from the last response. If no trace-id can be found, it returns an empty string. Prerequisite is, that WithCaptureHTTPResponse was executed before. It reads the X-trace-id header from the attached http response within the context.

func WithCaptureHTTPRequest added in v0.12.0

func WithCaptureHTTPRequest(parent context.Context, req **http.Request) context.Context

WithCaptureHTTPRequest adds the raw HTTP request retrieval annotation to the parent context. After the request has completed, the req parameter will contain the raw HTTP request made to the API.

func WithCaptureHTTPResponse

func WithCaptureHTTPResponse(parent context.Context, resp **http.Response) context.Context

WithCaptureHTTPResponse adds the raw HTTP response retrieval annotation to the parent context. The resp parameter will contain the raw HTTP response after the request has completed.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL