opencensus_honeycomb v0.2.0 Opencensus.Honeycomb.Config
Configuration.
Out of the box, we supply a default value for everything except write_key
. To override the
defaults, set the application environment in config/config.exs
using keys from t/0
:
config :opencensus,
reporters: [{Opencensus.Honeycomb.Reporter, []}],
send_interval_ms: 1000
config :opencensus_honeycomb,
dataset: "opencensus",
service_name: "your_app",
write_key: System.get_env("HONEYCOMB_WRITEKEY")
If you're using Mix
, you probably won't need to use effective/0
, get/0
, and put/1
.
Link to this section Summary
Types
The module and keyword arguments for your Opencensus.Honeycomb.Decorator
implementation.
Our configuration struct.
Functions
Get the effective configuration, using default values where necessary.
Get the application configuration without using default values.
Inserts into the application configuration.
Put to the application configuration.
Link to this section Types
decorator()
The module and keyword arguments for your Opencensus.Honeycomb.Decorator
implementation.
Our configuration struct.
api_endpoint
: the API endpoint (default:"https://api.honeycomb.io")
batch_size
: the write key (default:100)
dataset
: the dataset (default:"opencensus")
decorator
: the decorator module and arguments (default:nil)
service_name
: the service name (default:"-"
write_key
: the write key (default:nil)
A write_key
of nil
disables sending to Honeycomb.
Link to this section Functions
effective()
effective() :: t()
effective() :: t()
Get the effective configuration, using default values where necessary.
get()
get() :: t()
get() :: t()
Get the application configuration without using default values.
into(fields)
Inserts into the application configuration.
Returns the result of get/0
, not effective/0
.
Does not replace fields that are not specified. To "delete" a field from the config so the
default takes effect in effective/0
, set it to nil
. Consider put/1
, instead.
Crashes with a KeyError
if any keys are invalid; see Kernel.struct!/2
.
put(config)
Put to the application configuration.
Returns the result of get/0
, not effective/0
.
When called with a map, replaces known fields that are not specified with nil
. Does not
delete or modify unknown keys present in the application configuration.
Crashes with a KeyError
if any keys are invalid; see Kernel.struct!/2
.