-
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 router and remove global spirals (S2S/component) #4319
Conversation
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 #4319 +/- ##
======================================================
- Coverage 84.41% 84.41% -0.01%
======================================================
Files 551 551
Lines 33840 33848 +8
======================================================
+ Hits 28567 28572 +5
- Misses 5273 5276 +3 ☔ View full report in Codecov by Sentry. |
582afa8
to
f8ae4b6
Compare
f8ae4b6
to
980ee28
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.
Because S2S always returns {done, Acc}, it has to be disabled for this test to work. I think this is a bit forced, but at least the event is properly tested.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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 in general. I added a few minor questions and notes.
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.
d85d90a
to
118bf12
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.
simple_message was removed from all_tests because it was already contained in the connections_info testcase. Because of that, the S2S connection was already up, and the expected number of events was different for both of those cases.
118bf12
to
ece3536
Compare
This comment was marked as outdated.
This comment was marked as outdated.
ece3536
to
bff7daa
Compare
This comment was marked as outdated.
This comment was marked as outdated.
bff7daa
to
cf1c165
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.
After removing the last global metric, we need to switch this suite to use instrumentation, because otherwise ther would be nothing to report to the Graphite mock.
f193cb0
to
30e684c
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.
This comment was marked as outdated.
This comment was marked as outdated.
6d28edf
to
578bd1b
Compare
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 578bd1b small_tests_25 / small_tests / 578bd1b small_tests_26 / small_tests / 578bd1b small_tests_26_arm64 / small_tests / 578bd1b ldap_mnesia_25 / ldap_mnesia / 578bd1b ldap_mnesia_26 / ldap_mnesia / 578bd1b domain_isolation_SUITE:two_domains:routing_one2one_message_to_another_domain_gets_dropped{error,{test_case_failed,"Incorrect number of instrumentation events - matched: 0, expected: 1"}} domain_isolation_SUITE:end_per_suite{error,{test_case_failed,"Instrumentation events that were logged, but not tested:\n[{router_stanza_dropped,#{host_type => <<\"localhost\">>}}]\nYou need to test them with instrument_helper:assert/3"}} dynamic_domains_mysql_redis_26 / mysql_redis / 578bd1b dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 578bd1b dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 578bd1b internal_mnesia_26 / internal_mnesia / 578bd1b pubsub_SUITE:tree+basic:subscribe_options_separate_request_test{error,{{badmatch,false},
[{pubsub_tools,check_response,2,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,444}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,434}]},
{pubsub_tools,receive_and_check_response,4,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,424}]},
{pubsub_SUITE,'-subscribe_options_separate_request_test/1-fun-2-',2,
[{file,"/home/circleci/project/big_tests/tests/pubsub_SUITE.erl"},
{line,436}]},
{escalus_story,story,4,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} pgsql_mnesia_25 / pgsql_mnesia / 578bd1b dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 578bd1b mysql_redis_26 / mysql_redis / 578bd1b pgsql_cets_26 / pgsql_cets / 578bd1b pgsql_mnesia_26 / pgsql_mnesia / 578bd1b mssql_mnesia_26 / odbc_mssql_mnesia / 578bd1b ldap_mnesia_26 / ldap_mnesia / 578bd1b internal_mnesia_26 / internal_mnesia / 578bd1b |
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
This PR removes global spirals and changes
routingErrors
metric intorouter_no_route_found
instrumentation event.The
router_no_route_found
event is a bit useless, as it will happen if none of the routing modules have routed a stanza (returned{done, Acc}
), but S2S, as the last router, always tries to route a message and returnsdone
. If it can't find the recipient, it sends the error stanzas on its own. So for this event to occur, S2S has to be disabled - and this is how I tested it.I wasn't sure how to handle the metrics to be similar to C2S ones. There are two issues that we can still decide to change in this PR:
_in/_out
convention from Instrument/hook handlers: c2s #4310, but transport metrics for C2S,(which are more similar to the ones from this PR) use_received/_sent
convention from Add C2S TCP/TLS listener instrumentation metrics #4304. I think it's best to either change them to use_in/_out
as well, or I can change the names to_received/_sent
in this PR.c2s/s2s/component
.