ReqLLM.Telemetry.RequestSource protocol (ReqLLM v1.14.0)

View Source

Extracts the upstream server (address, port, path) from a request representation for the telemetry context's server map.

Implementations exist for Req.Request (the standard request path) and ReqLLM.Streaming.Fixtures.HTTPContext (the streaming-client wrapper). Anything else falls through to the Any implementation and returns %{}.

Summary

Types

t()

All the types that implement this protocol.

Functions

Returns the server map for source. Keys are atoms; absent fields are dropped. Returns %{} when the source carries no usable URL.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

server(source)

@spec server(t()) :: map()

Returns the server map for source. Keys are atoms; absent fields are dropped. Returns %{} when the source carries no usable URL.