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 mod_ping #4288

Merged
merged 4 commits into from
Jun 12, 2024
Merged

Instrument mod_ping #4288

merged 4 commits into from
Jun 12, 2024

Conversation

jacekwegr
Copy link
Contributor

@jacekwegr jacekwegr commented May 24, 2024

This PR adds instrumentation to mod_ping.

One important change is the merging of two events (ping_response_time and ping_response) into one, as they were always invoked simultaneously.

The measurement of time in mod_ping_response does not use mongoose_instrument:span because the time measurement is done through hooks.

@mongoose-im

This comment was marked as outdated.

Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.75%. Comparing base (6b83ced) to head (2e7b823).
Report is 34 commits behind head on feature/instrument.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/instrument    #4288      +/-   ##
======================================================
- Coverage               84.75%   84.75%   -0.01%     
======================================================
  Files                     556      556              
  Lines                   33888    33884       -4     
======================================================
- Hits                    28723    28717       -6     
- Misses                   5165     5167       +2     

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

@jacekwegr jacekwegr marked this pull request as ready for review May 24, 2024 13:50
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

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

It looks good in general, but I think we should consistently remove all mongoose_metricd checks form our tests. That was one of the intentions of the instrumentation rework - by removing the dependency on exometer, we would be able to switch it off in the future.

big_tests/tests/mod_ping_SUITE.erl Outdated Show resolved Hide resolved
@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 12, 2024

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


small_tests_25 / small_tests / 2e7b823
Reports root / small


small_tests_26_arm64 / small_tests / 2e7b823
Reports root / small


small_tests_26 / small_tests / 2e7b823
Reports root / small


ldap_mnesia_25 / ldap_mnesia / 2e7b823
Reports root/ big
OK: 2284 / Failed: 1 / User-skipped: 905 / Auto-skipped: 5

bosh_SUITE:essential:accept_higher_hold_value
{error,
  {{assertEqual,
     [{module,bosh_SUITE},
      {line,265},
      {expression,"get_bosh_sessions ( )"},
      {expected,[]},
      {value,
        [{bosh_session,<<"52c0fb22073c6506d39992ab4610d43b9ea1413e">>,
           <9341.10203.0>}]}]},
   [{bosh_SUITE,accept_higher_hold_value,1,
      [{file,"/home/circleci/project/big_tests/tests/bosh_SUITE.erl"},
       {line,265}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1291}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1223}]}]}}

Report log


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 2e7b823
Reports root/ big
OK: 4622 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / 2e7b823
Reports root/ big
OK: 4589 / Failed: 0 / User-skipped: 138 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 2e7b823
Reports root/ big
OK: 2308 / Failed: 1 / User-skipped: 905 / Auto-skipped: 0

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_1051@localhost/res1">>},
        {<<"id">>,<<"840f2bde-2ae5-4057-abe0-35e4ce5c5fb6">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"6078c59e-67f3-4456-bdf0-fd8202f180c4">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_1051@localhost/res1' id='840f2bde-2ae5-4057-abe0-35e4ce5c5fb6' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='6078c59e-67f3-4456-bdf0-fd8202f180c4'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/project/big_tests/tests/jingle_SUITE.erl"},
       {line,390}]},
    {jingle_SUITE,
      '-resp_...

Report log


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


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 2e7b823
Reports root/ big
OK: 4622 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 2e7b823
Reports root/ big
OK: 4619 / Failed: 0 / User-skipped: 108 / Auto-skipped: 0


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


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


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


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


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


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

Copy link
Member

@chrzaszcz chrzaszcz 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 👍

@chrzaszcz chrzaszcz merged commit 7b2ab42 into feature/instrument Jun 12, 2024
4 checks passed
@chrzaszcz chrzaszcz deleted the instrument-mod-ping branch June 12, 2024 11:49
@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.

3 participants