Collector. Config
(collector v0.1.1)
Copy Markdown
Where events go and what they say about the app. Everything has a
default, the DSN included: set COLLECTOR_DSN in the environment, or
configure it yourself:
config :collector, dsn: System.get_env("MY_COLLECTOR_DSN")The DSN, from the project's setup page in Collector, is where Collector
runs plus the project's key, in one URL:
https://clt_…@app.clt.chrom.ar. A port and a path are fine too
(http://clt_…@localhost:4000, https://clt_…@example.com/collector).
Options:
:dsn— defaults to theCOLLECTOR_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 toCOLLECTOR_KEY, the endpoint tohttps://app.clt.chrom.ar. 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> Collector.Config.parse_dsn("https://clt_abc@example.com:8443/collector/")
{:ok, "clt_abc", "https://example.com:8443/collector"}