Skip to content
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/hook handlers: auth - register #4301

Merged
merged 10 commits into from
Jun 17, 2024

Conversation

chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented Jun 13, 2024

The goal is to use mongoose_instrument for user registration metrics instead of handlers updating mongoose_metrics.

  • Use eparate events are used for regular and anonymous users.
  • instrumentation callback is added to mongoose_gen_auth.
  • accounts_SUITE and anonymous_SUITE are updated, and they cover all events. This means that metrics_register_SUITE can be removed.
  • anonymous_purge operation is now instrumented, so this hook doesn't need its instrumentation event anymore.
  • no hooks are removed, because although register_user has no handlers, it looks useful for purposes other than instrumentation.

@chrzaszcz chrzaszcz changed the base branch from feature/instrument to instrument/hook-handlers-privacy June 13, 2024 12:47
@mongoose-im

This comment was marked as outdated.

Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.76%. Comparing base (f5b57d4) to head (d2ab907).

Additional details and impacted files
@@                 Coverage Diff                 @@
##           feature/instrument    #4301   +/-   ##
===================================================
  Coverage               84.76%   84.76%           
===================================================
  Files                     557      557           
  Lines                   33873    33881    +8     
===================================================
+ Hits                    28711    28719    +8     
  Misses                   5162     5162           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from instrument/hook-handlers-privacy to feature/instrument June 13, 2024 13:05
@chrzaszcz chrzaszcz force-pushed the instrument/hook-handlers-auth branch from ddda747 to eeeed78 Compare June 14, 2024 11:04
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 14, 2024

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / eeeed78
Reports root/ big
OK: 457 / Failed: 0 / User-skipped: 41 / Auto-skipped: 0


small_tests_25 / small_tests / eeeed78
Reports root / small


small_tests_26 / small_tests / eeeed78
Reports root / small


small_tests_26_arm64 / small_tests / eeeed78
Reports root / small


ldap_mnesia_25 / ldap_mnesia / eeeed78
Reports root/ big
OK: 2290 / Failed: 1 / User-skipped: 905 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


ldap_mnesia_26 / ldap_mnesia / eeeed78
Reports root/ big
OK: 2290 / Failed: 1 / User-skipped: 905 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


dynamic_domains_mysql_redis_26 / mysql_redis / eeeed78
Reports root/ big
OK: 4588 / Failed: 1 / User-skipped: 138 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / eeeed78
Reports root/ big
OK: 4621 / Failed: 1 / User-skipped: 105 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / eeeed78
Reports root/ big
OK: 4618 / Failed: 1 / User-skipped: 108 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


pgsql_cets_26 / pgsql_cets / eeeed78
Reports root/ big
OK: 4519 / Failed: 1 / User-skipped: 174 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / eeeed78
Reports root/ big
OK: 4621 / Failed: 1 / User-skipped: 105 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


internal_mnesia_26 / internal_mnesia / eeeed78
Reports root/ big
OK: 2430 / Failed: 1 / User-skipped: 765 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


pgsql_mnesia_25 / pgsql_mnesia / eeeed78
Reports root/ big
OK: 5013 / Failed: 1 / User-skipped: 112 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


mysql_redis_26 / mysql_redis / eeeed78
Reports root/ big
OK: 4992 / Failed: 1 / User-skipped: 133 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


pgsql_mnesia_26 / pgsql_mnesia / eeeed78
Reports root/ big
OK: 5013 / Failed: 1 / User-skipped: 112 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


mssql_mnesia_26 / odbc_mssql_mnesia / eeeed78
Reports root/ big
OK: 5010 / Failed: 1 / User-skipped: 115 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log

@chrzaszcz chrzaszcz changed the title Instrument/hook handlers: auth Instrument/hook handlers: auth - register Jun 14, 2024
@chrzaszcz chrzaszcz marked this pull request as ready for review June 14, 2024 12:32
- 'register' used the hook-related metric;
- 'unregister' didn't have any metrics.
It already has the 'auth_anonymous_unregister_user' event.
Note: no hooks are removed - even for remove_user, which has no
handlers now. The hook seems to be useful not only for instrumentation.
They are now covered by the events checked in accounts_SUITE
@chrzaszcz chrzaszcz force-pushed the instrument/hook-handlers-auth branch from eeeed78 to d2ab907 Compare June 14, 2024 14:29
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 14, 2024

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / d2ab907
Reports root/ big
OK: 457 / Failed: 0 / User-skipped: 41 / Auto-skipped: 0


small_tests_25 / small_tests / d2ab907
Reports root / small


small_tests_26 / small_tests / d2ab907
Reports root / small


small_tests_26_arm64 / small_tests / d2ab907
Reports root / small


ldap_mnesia_25 / ldap_mnesia / d2ab907
Reports root/ big
OK: 2290 / Failed: 1 / User-skipped: 905 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


ldap_mnesia_26 / ldap_mnesia / d2ab907
Reports root/ big
OK: 2290 / Failed: 1 / User-skipped: 905 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / d2ab907
Reports root/ big
OK: 4621 / Failed: 1 / User-skipped: 105 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / d2ab907
Reports root/ big
OK: 4621 / Failed: 1 / User-skipped: 105 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


dynamic_domains_mysql_redis_26 / mysql_redis / d2ab907
Reports root/ big
OK: 4588 / Failed: 1 / User-skipped: 138 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


internal_mnesia_26 / internal_mnesia / d2ab907
Reports root/ big
OK: 2430 / Failed: 1 / User-skipped: 765 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


pgsql_cets_26 / pgsql_cets / d2ab907
Reports root/ big
OK: 4519 / Failed: 1 / User-skipped: 174 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / d2ab907
Reports root/ big
OK: 4618 / Failed: 1 / User-skipped: 108 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


pgsql_mnesia_25 / pgsql_mnesia / d2ab907
Reports root/ big
OK: 5013 / Failed: 1 / User-skipped: 112 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


mysql_redis_26 / mysql_redis / d2ab907
Reports root/ big
OK: 4992 / Failed: 1 / User-skipped: 133 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


pgsql_mnesia_26 / pgsql_mnesia / d2ab907
Reports root/ big
OK: 5013 / Failed: 1 / User-skipped: 112 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log


mssql_mnesia_26 / odbc_mssql_mnesia / d2ab907
Reports root/ big
OK: 5010 / Failed: 1 / User-skipped: 115 / Auto-skipped: 0

ct_framework:error_in_suite
{error,'metrics_register_SUITE cannot be compiled or loaded'}

Report log

Copy link
Contributor

@JanuszJakubiec JanuszJakubiec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@JanuszJakubiec JanuszJakubiec merged commit 2cf5fb9 into feature/instrument Jun 17, 2024
4 checks passed
@JanuszJakubiec JanuszJakubiec deleted the instrument/hook-handlers-auth branch June 17, 2024 10:13
@jacekwegr jacekwegr added this to the 6.3.0 milestone Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants