-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instrument: exometer report #4326
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
704bfe5
to
ba9fb25
Compare
ba9fb25
to
9e6f551
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
9e6f551
to
1825f7d
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/instrument #4326 +/- ##
===================================================
Coverage 84.43% 84.43%
===================================================
Files 551 551
Lines 33854 33853 -1
===================================================
+ Hits 28583 28585 +2
+ Misses 5271 5268 -3 ☔ View full report in Codecov by Sentry. |
1825f7d
to
7abfc5c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
41505dd
to
6176728
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
6176728
to
e8b78af
Compare
This comment was marked as outdated.
This comment was marked as outdated.
e8b78af
to
905c3ee
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This way the options can be passed directly to the modules.
Config options: - default values for 'connect_timeout', 'interval' and 'port' are same as before; - 'prefix' and 'env_prefix' are not defined by default; - 'api_key' has the default value of '' because it is mandatory in exometer_report_graphite; - 'host' is mandatory. Config format: - In TOML, 'instrumentation.exometer.report.graphite' is a list - After processing, [instrumentation, exometer, report] becomes a map with auto-generated reporter names as keys. Such format allows easy mapping to the Exometer reporter names. In the current implementation, failing to start is an unrecoverable error, but this shouldn't happen in typical cases, e.g. with connectivity issues.
They are handled by mongoose_instrument now
Otherwise, if you start Module:start_link(...) with async_helper, the helper wouldn't wait for it to terminate when calling 'stop'. As a result subsequent tests might fail to initialize if they use Module as well.
- Add API: start, stop, subscribe, get_metric - Unsubscription is automatic when the subscriber goes down
- Test more options including prefixes - Check both global and host-type metrics
6e44198
to
2b08cc0
Compare
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 2b08cc0 small_tests_25 / small_tests / 2b08cc0 small_tests_26 / small_tests / 2b08cc0 small_tests_26_arm64 / small_tests / 2b08cc0 ldap_mnesia_25 / ldap_mnesia / 2b08cc0 ldap_mnesia_26 / ldap_mnesia / 2b08cc0 dynamic_domains_mysql_redis_26 / mysql_redis / 2b08cc0 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 2b08cc0 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 2b08cc0 internal_mnesia_26 / internal_mnesia / 2b08cc0 dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 2b08cc0 pgsql_cets_26 / pgsql_cets / 2b08cc0 mysql_redis_26 / mysql_redis / 2b08cc0 pgsql_mnesia_25 / pgsql_mnesia / 2b08cc0 mssql_mnesia_26 / odbc_mssql_mnesia / 2b08cc0 pgsql_mnesia_26 / pgsql_mnesia / 2b08cc0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I have no comments 👍
The goal is to configure exometer reporters in
mongooseim.toml
instead ofapp.config
, and to usemongoose_instrument
instead of the obsoletemongoose_metrics
.In TOML,
instrumentation.exometer.report.graphite
is a list of sections, e.g.:So far only
graphite
is supported, but others likestatsd
can be added later if necessary.After processing, the resulting
[instrumentation, exometer, report]
option is map with auto-generated reporter names as keys. Such format allows easy mapping to the Exometer reporter names.The example configuration mentioned above results in the following map:
Accepted options are same as before, and their defaults are as they were in the default
app.config
.Other changes
start
andstop
callbacks inmongoose_instrument
.async_helper
. Otherwise, if you startModule:start_link(...)
withasync_helper
, the helper wouldn't wait for it to terminate when callingstop
. As a result, subsequent tests might fail to initialize if they useModule
as well.Notes
exometer_*
libraries are forked underesl
, and they got quite old when compared with upstream. We could consider updating them.api_key
option has the""
default, but it could be optional for consistency. This would require a small modification inexometer_report_graphite
though. We could do it separately, but for me it's very minor.