Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectTracing ¶
func InjectTracing(c *resty.Client)
InjectTracing injects, should keep singleton in one resty.Client.
Example ¶
client := resty.New() otelresty.InjectTracing(client) // pretend this to be a trace context, passed as parameter. ctx := context.Background() resp, err := client. R(). // !!! make sure you called set context to pass trace context to middleware. SetContext(ctx). Get("https://example.com/api/resource/4396") // handle response and error _, _ = resp, err
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.