-
-
Save tsloughter/7ff0ce8bfb0a884560de82e6b2a331a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start(_StartType, _StartArgs) -> | |
application:load(opentelemetry), | |
application:set_env(opentelemetry, sampler, {always_on, #{}}), | |
application:set_env(opentelemetry, processors, [{otel_batch_processor, #{exporter => {otel_exporter_stdout, []}, | |
exporting_timeout_ms => 100, | |
scheduled_delay_ms => timer:seconds(5)}}]), | |
{ok, _} = application:ensure_all_started(opentelemetry), | |
{ok, _} = application:ensure_all_started(opentelemetry_api), | |
otel_batch_processor:set_exporter(otel_exporter_stdout, []), | |
true = opentelemetry:register_application_tracer(otel_example), | |
% otel_batch_processor:set_exporter(opentelemetry_exporter, #{protocol => http_protobuf, | |
% endpoints => [ | |
% {http, "localhost", 9090, []}], | |
% scheduled_delay_ms => 10000}), | |
otel_example_sup:start_link(). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment