Tapper v0.6.2 Tapper.Application View Source
Tapper main application; configures and starts application supervisor.
Automatically started when Tapper is included as dependency.
Configuration
Looks for configuration under :tapper key:
| key | type | purpose |
|---|---|---|
system_id | String.t | unknown used in annotations; default Endpoint in default service_nameThis application's id; used for |
ip | tuple | if none.{127.0.0.1}This application's principle IPV4 or IPV6 address, as 4- or 8-tuple of ints; defaults to IP of first non-loopback interface, or |
port | integer | The application's principle port, e.g. HTTP port 80; defaults to 0 |
| reporter | atom | {atom, any} | function/1 | Module implementing Tapper.Reporter.Api <sup>[1]</sup>, or function of arity 1 to use for reporting spans; defaults to Tapper.Reporter.Console. |
| server_trace | atom | Logger level to log server traces at, or false (default false) |
All keys support the Phoenix-style {:system, var} format<sup>[2]</sup>, to allow lookup from shell environment variables, e.g. {:system, "PORT"} to read PORT environment variable.
Config values will be converted to the expected type, principally so that string values can be handled from environment variables:
ipis expected in dotted IPV4 or colon IPV6 notation, see Erlang'sinet:parse_address/1reportercan be specified as a string which will be converted to an atom, following Elixir's module name rules.
Example
In config.exs etc.:
config :tapper,
system_id: "my-cool-svc",
reporter: Tapper.Reporter.Zipkin,
port: {:system, "PORT"}<sup>[1]</sup> If the reporter is given as {module, arg} it is expected to specify an OTP server to be started under Tapper's main supervisor.<br/>
<sup>[2]</sup> Tapper uses the DeferredConfig
library to resolve all configuration under the :tapper key, so see its documention for more options.
Link to this section Summary
Functions
Callback implementation for Application.start/2.
Link to this section Functions
Callback implementation for Application.start/2.