Packages

OpenTelemetry instrumentation for the Nova web framework

Current section

Files

Jump to
opentelemetry_nova src otel_nova_prom_handler.erl
Raw

src/otel_nova_prom_handler.erl

-module(otel_nova_prom_handler).
-export([init/2]).
init(Req0, State) ->
Body = otel_nova_prom_exporter:get_metrics(),
Req = cowboy_req:reply(200, #{
<<"content-type">> => <<"text/plain; version=0.0.4; charset=utf-8">>
}, Body, Req0),
{ok, Req, State}.