instrument_metrics_exporter_console (instrument v1.0.0)
View SourceConsole exporter for metrics.
Exports metrics to stdout for debugging and development.
Example Usage
%% Register with default options
instrument_metrics_exporter:register(instrument_metrics_exporter_console:new()),
%% Register with options
instrument_metrics_exporter:register(instrument_metrics_exporter_console:new(#{
format => json, %% json | text (default: text)
output => standard_io %% standard_io | standard_error | {file, Path}
})),
Summary
Functions
Exports metrics to the console.
Initializes the exporter.
Shuts down the exporter.
Creates a new console exporter configuration with defaults.
Creates a new console exporter configuration.
Functions
-spec exporter_export([map()], #state{format :: text | json, output :: standard_io | standard_error | {file, file:io_device()}}) -> {ok, #state{format :: text | json, output :: standard_io | standard_error | {file, file:io_device()}}} | {error, term(), #state{format :: text | json, output :: standard_io | standard_error | {file, file:io_device()}}}.
Exports metrics to the console.
-spec exporter_init(map()) -> {ok, #state{format :: text | json, output :: standard_io | standard_error | {file, file:io_device()}}} | {error, term()}.
Initializes the exporter.
-spec exporter_shutdown(#state{format :: text | json, output :: standard_io | standard_error | {file, file:io_device()}}) -> ok.
Shuts down the exporter.
Creates a new console exporter configuration with defaults.
Creates a new console exporter configuration.