Documentation
¶
Overview ¶
Package httpclient provides a shared resty HTTP client factory with optional OpenTelemetry tracing. Whether to instrument is decided by package otelenv, the same predicate the tracer provider in package observability uses, so a transport can never emit spans the provider is not exporting (or stay silent while it is).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a resty client with the default 30s timeout and optional OTel transport instrumentation.
func NewWithTimeout ¶
NewWithTimeout creates a resty client with a custom timeout and optional OTel transport instrumentation.
func StdHTTPClient ¶
StdHTTPClient returns a standard *http.Client with the shared instrumented transport. No timeout is set because this client is used for SSE/streaming requests where the context deadline controls cancellation.
Types ¶
This section is empty.