-
Notifications
You must be signed in to change notification settings - Fork 428
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/hooks #4289
Instrument/hooks #4289
Conversation
ldap_mnesia_25 / ldap_mnesia / af5d56e dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / af5d56e pgsql_mnesia_25 / pgsql_mnesia / af5d56e pgsql_mnesia_26 / pgsql_mnesia / af5d56e dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / af5d56e pgsql_cets_26 / pgsql_cets / af5d56e dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / af5d56e internal_mnesia_26 / internal_mnesia / af5d56e ldap_mnesia_26 / ldap_mnesia / af5d56e mysql_redis_26 / mysql_redis / af5d56e mssql_mnesia_26 / odbc_mssql_mnesia / af5d56e dynamic_domains_mysql_redis_26 / mysql_redis / af5d56e small_tests_25 / small_tests / af5d56e small_tests_26 / small_tests / af5d56e small_tests_26_arm64 / small_tests / af5d56e |
af5d56e
to
38aa588
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/instrument #4289 +/- ##
======================================================
+ Coverage 84.52% 84.74% +0.21%
======================================================
Files 556 557 +1
Lines 33899 33908 +9
======================================================
+ Hits 28653 28735 +82
+ Misses 5246 5173 -73 ☔ View full report in Codecov by Sentry. |
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.
Move the mongoose_metrics:filter_hook/2 logic to is_instrumented/2
A few tests checked that the same hook could have both global and host-type handlers. This is not the intended behaviour, and results in an error log. One extra test was added for this case, while the remaining tests were amended to test the usual case: a hook is either global or per-host-type (not both).
Remove all_metrics_are_global when it is no longer needed.
Config needs to exist until mongoose_instrument is stopped.
Hooks are instrumented, and instrumentation needs a real host type Btw, using host types that are not configured could cause issues in the future, but fixing this would require a lot of changes.
These hooks were used only for instrumentation, and they are redundant, because mongoose_instrument has flush events with the same data. Also, the MUC hook was not instrumented for some reason.
8981b86
to
4c4d89d
Compare
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 4c4d89d small_tests_25 / small_tests / 4c4d89d small_tests_26 / small_tests / 4c4d89d small_tests_26_arm64 / small_tests / 4c4d89d ldap_mnesia_25 / ldap_mnesia / 4c4d89d ldap_mnesia_26 / ldap_mnesia / 4c4d89d dynamic_domains_mysql_redis_26 / mysql_redis / 4c4d89d dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 4c4d89d dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 4c4d89d pgsql_cets_26 / pgsql_cets / 4c4d89d internal_mnesia_26 / internal_mnesia / 4c4d89d dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 4c4d89d mysql_redis_26 / mysql_redis / 4c4d89d pgsql_mnesia_25 / pgsql_mnesia / 4c4d89d pgsql_mnesia_26 / pgsql_mnesia / 4c4d89d mssql_mnesia_26 / odbc_mssql_mnesia / 4c4d89d |
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. Thanks for the changes.
The main goal is to use
mongoose_instrument
instead ofmongoose_metrics
for the automatic hook metrics.Main changes:
gen_hook
is using a newmongoose_instrument_hooks
module to set up, tear down and execute events.hook_HOOKNAME
, e.g.hook_filter_packet
.mam*_flush_messages
hooks, which are removed, because they were used only for instrumentation, and provided no value, because these operations are already instrumented.Other minor changes are described in commit messages.