Tlm. Config
(tlm v0.1.0)
Copy Markdown
Where events go and what they say about the app. Everything has a
default, the DSN included: set TLM_DSN in the environment, or
configure it yourself:
config :tlm, dsn: System.get_env("MY_TLM_DSN")The DSN, from the project's setup page in Tlm, is where Tlm
runs plus the project's key, in one URL:
https://tlm_…@tlm.hullop.com. A port and a path are fine too
(http://tlm_…@localhost:4000, https://tlm_…@example.com/tlm).
Options:
:dsn— defaults to theTLM_DSNenvironment variable. Without a DSN or a key nothing is sent, which keeps dev and test quiet.:keyand:endpoint— the two halves of a DSN, for when you'd rather set them apart. The key defaults toTLM_KEY, the endpoint tohttps://tlm.hullop.com. A DSN wins over both.:environment— defaults to the Mix environment the app was built in (prodin a release).:release— defaults to the release version (RELEASE_VSN).:in_app— the applications whose code is "yours". Defaults to the root applications: those no other loaded application depends on.
Summary
Functions
The current settings, read from the application environment.
Whether module belongs to the app itself rather than a dependency.
Whether a DSN is configured but can't be parsed.
Splits a DSN into the key and the endpoint, or says why it can't.
Functions
The current settings, read from the application environment.
Whether module belongs to the app itself rather than a dependency.
Whether a DSN is configured but can't be parsed.
Splits a DSN into the key and the endpoint, or says why it can't.
iex> Tlm.Config.parse_dsn("https://tlm_abc@example.com:8443/tlm/")
{:ok, "tlm_abc", "https://example.com:8443/tlm"}