-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
565 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.rebar3 | ||
_build | ||
_checkouts | ||
_vendor | ||
.eunit | ||
*.o | ||
*.beam | ||
*.plt | ||
*.swp | ||
*.swo | ||
.erlang.cookie | ||
ebin | ||
log | ||
erl_crash.dump | ||
.rebar | ||
logs | ||
.idea | ||
*.iml | ||
rebar3.crashdump | ||
*~ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# opentelemetry_beam | ||
|
||
Metrics collector to export statistics from the BEAM VM. | ||
|
||
The metrics and their names are heavily borrowed from [prometheus.erl](https://github.com/deadtrickster/prometheus.erl). | ||
|
||
After installing, setup the desired metrics in your application behaviour before your | ||
top-level supervisor starts. Make sure the API and SDK applications are started before | ||
your application. | ||
|
||
```erlang | ||
opentelemetry_beam_metrics:setup(), | ||
... | ||
``` | ||
|
||
Metrics that are based on microstate accounting need to be enabled explicitly with the `msacc` setting in the `opt_in` option: | ||
|
||
```erlang | ||
opentelemetry_beam_metrics:setup(#{opt_in => #{msacc => true}}), | ||
... | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
%%-*-Erlang-*- | ||
[{kernel, | ||
[{logger_level, debug}, | ||
{logger, | ||
[{handler, default, logger_std_h, | ||
#{level => debug, | ||
formatter => | ||
{logger_formatter, | ||
#{single_line => true, | ||
legacy_header => false, | ||
template => [time," ",pid," ",level,": ",msg,"\n"] | ||
}}, | ||
config => | ||
#{sync_mode_qlen => 10000, | ||
drop_mode_qlen => 10000, | ||
flush_qlen => 10000} | ||
} | ||
} | ||
]} | ||
]}, | ||
|
||
{opentelemetry_experimental, | ||
[{readers, | ||
[ | ||
#{module => otel_metric_reader_periodic, | ||
config => #{export_interval_ms => 1000, | ||
exporter => {otel_metric_exporter_console, undefined}}} | ||
]} | ||
]} | ||
]. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
%%-*-Erlang-*- | ||
{erl_opts, [debug_info]}. | ||
{deps, [ | ||
{opentelemetry_api, "~> 1.3.0"}, | ||
{opentelemetry_api_experimental, "~> 0.5.1"} | ||
]}. | ||
|
||
{plugins, [rebar3_fmt]}. | ||
|
||
{xref_checks, [undefined_function_calls, undefined_functions, | ||
deprecated_function_calls, deprecated_functions]}. | ||
{xref_ignores, []}. | ||
|
||
%% development setting | ||
{shell, [{config, "priv/dev.config"}]}. |
15 changes: 15 additions & 0 deletions
15
instrumentation/opentelemetry_beam/src/opentelemetry_beam.app.src
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{application, opentelemetry_beam, | ||
[{description, "OpenTelemetry BEAM VM Instrumentation"}, | ||
{vsn, "0.1.0"}, | ||
{registered, []}, | ||
{applications, | ||
[kernel, | ||
stdlib, | ||
opentelemetry_api, | ||
opentelemetry_api_experimental | ||
]}, | ||
{env,[]}, | ||
{modules, []}, | ||
{licenses, ["Apache-2.0"]}, | ||
{links, []} | ||
]}. |
Oops, something went wrong.