The validated result of the options OpentelemetryStatifier.setup/1,
OpentelemetryStatifier.Persistence.setup/1 and
OpentelemetryStatifier.Oban.setup/1 take, carried through
:telemetry.attach/4 as each handler's Config argument (the family's
pattern for setup-time options).
Three keys are recognised:
:record_datamodel_values- defaults tofalse. Whentrue,OpentelemetryStatifier.Attributesrecords the datamodel values an event carries (:new_value,:prior_valueand:datamodel) as span-event attributes rendered withinspect/1; whenfalse, they are left out.:table- the name of the ETS span table the handlers read and write. Defaults toOpentelemetryStatifier.SpanTable, the named table theOpentelemetryStatifier.SpanTableprocess creates when the application starts and sweeps on a timer. Any other name must name a table that already exists, created withOpentelemetryStatifier.SpanTable.new_table/1; the timed sweep runs over the default table only.:adapter_calls-:nested_only(the default) or:all. With:nested_only, an adapter call span is emitted only inside an enclosing span; with:all, every adapter call span is emitted. OnlyOpentelemetryStatifier.Persistence.setup/1reads it.
An unknown key is rejected rather than ignored: a typo'd
record_datamodel_value silently doing nothing is exactly the failure
the project's cardinality policy cannot afford.
Summary
Types
Functions
Validates a keyword list of setup options into a t().
Returns {:error, {:invalid_options, :not_a_keyword_list}} when opts is
not even a keyword list, {:error, {:unknown_options, keys}} when it
contains keys outside :record_datamodel_values, :table and
:adapter_calls, and
{:error, {:invalid_option, key, value}} when a recognised key holds a
value of the wrong shape.