pub fn try_init() -> Result<Guard, Error>
Expand description

Initialize a global subscriber which sends traces to Axiom.

It uses the environment variables AXIOM_TOKEN and optionally AXIOM_URL to configure the endpoint. If you want to manually set these, see Builder.

Errors

Returns an error if the initialization was unsuccessful, likely because a global subscriber was already installed or AXIOM_TOKEN is not set or invalid.