Skip to content

defaults

etrack.infra.defaults

infra/defaults: the library's composition root — what a provider is not handed, read from st.

e-track has no entrypoint: the host's code builds the providers. Each one takes keyword arguments and calls its function here once, at construction: the arguments given win, the environment fills the rest, and the whole is validated as the fields are. So OtlpDriver() reads ETRACK_OTLP_*, and OtlpDriver(targets=…) overrides one key.

anyio

anyio(**given: Unpack[AnyioConfig]) -> AnyioConfig

An AnyioAdapter's whole configuration: ETRACK_BUS_*, under what it was handed.

granian

granian(**given: Unpack[GranianConfig]) -> GranianConfig

A GranianAdapter's whole configuration: ETRACK_SERVER_*, under what it was handed.

http

http(**given: Unpack[HttpConfig]) -> HttpConfig

An HttpDriver's whole configuration: ETRACK_HTTP_*, under what it was handed.

live

live(**given: Unpack[LiveConfig]) -> LiveConfig

A LiveAdapter's whole configuration: ETRACK_LIVE_*, under what it was handed.

otlp

otlp(**given: Unpack[OtlpConfig]) -> OtlpConfig

An OtlpDriver's whole configuration: ETRACK_OTLP_*, under what it was handed.

prometheus

prometheus(
    **given: Unpack[PrometheusConfig],
) -> PrometheusConfig

A PrometheusAdapter's whole configuration: ETRACK_PROMETHEUS_*, under what it was handed.