Documentation
¶
Overview ¶
Package httpclient provides a shared resty HTTP client factory with optional OpenTelemetry tracing. OTel transport instrumentation activates only when OTEL_EXPORTER_OTLP_ENDPOINT is set, aligned with the trace hook in plugins/hooks/trace/.
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 OTel transport instrumentation. No timeout is set because this client is used for SSE/streaming requests where the context deadline controls cancellation. otelhttp resolves the TracerProvider from the request context at call time (not construction time), so it works regardless of init order.
Types ¶
This section is empty.