inspectIT / inspectit-ocelot

inspectIT Ocelot - Java agent for collecting application performance, tracing and behavior data
http://www.inspectit.rocks/
Apache License 2.0
204 stars 69 forks source link

feat: print rule dependency tree in debug log level #1466

Closed mariusoe closed 2 years ago

mariusoe commented 2 years ago

This change is Reviewable

codecov[bot] commented 2 years ago

Codecov Report

Merging #1466 (8106816) into master (cc6f1ed) will increase coverage by 0.11%. The diff coverage is 100.00%.

:exclamation: Current head 8106816 differs from pull request most recent head 2a5e352. Consider uploading reports for the commit 2a5e352 to get more accurate results

@@             Coverage Diff              @@
##             master    #1466      +/-   ##
============================================
+ Coverage     79.01%   79.12%   +0.11%     
- Complexity     2225     2238      +13     
============================================
  Files           228      228              
  Lines          7236     7269      +33     
  Branches        859      866       +7     
============================================
+ Hits           5717     5751      +34     
+ Misses         1162     1160       -2     
- Partials        357      358       +1     
Impacted Files Coverage Δ
...n/config/InstrumentationConfigurationResolver.java 97.87% <100.00%> (+0.62%) :arrow_up:
...ctit/ocelot/core/opentelemetry/DynamicSampler.java 60.00% <0.00%> (-30.00%) :arrow_down:
...n/java/rocks/inspectit/ocelot/agent/AgentMain.java 48.33% <0.00%> (+0.88%) :arrow_up:
...in/java/rocks/inspectit/ocelot/core/AgentImpl.java 68.52% <0.00%> (+7.41%) :arrow_up:
mariusoe commented 2 years ago

The log output looks like the following now:

2022-06-10 15:59:25,486 DEBUG 3493   --- [inspectIT] [       Thread-0] i.c.InstrumentationConfigurationResolver : ------------------------------------------------------------
Rule Dependency-Tree
------------------------------------------------------------
Used Rules
+--- r_apacheclient_http_metric
|    +--- r_apacheclient_extract_details
|    |    +--- r_http_parametrize_path
|    |    |    \--- r_http_parametrize_path_remove_ids
|    |    \--- r_apacheclient_detect_entry
|    \--- r_http_client_record_metric_on_method
|         +--- r_http_client_record_metric
|         \--- r_http_capture_method_duration
|              \--- r_capture_method_duration_conditional
|                   \--- r_capture_method_entry_timestamp_conditional
+--- r_apacheclient_propagation
|    \--- r_apacheclient_detect_entry
+--- r_apacheclient_servicegraph_propagation
|    \--- r_servicegraph_prepare_down_propagation
+--- r_apacheclient_servicegraph_record
|    +--- r_apacheclient_extract_details
|    |    +--- r_http_parametrize_path
|    |    |    \--- r_http_parametrize_path_remove_ids
|    |    \--- r_apacheclient_detect_entry
|    +--- r_servicegraph_outbound_record_method
|    |    +--- r_servicegraph_outbound_record_metric
|    |    \--- r_servicegraph_capture_method_duration
|    |         \--- r_capture_method_duration_conditional
|    |              \--- r_capture_method_entry_timestamp_conditional
|    \--- r_apacheclient_detect_entry
+--- r_apacheclient_tracing
|    +--- r_apacheclient_extract_details
|    |    +--- r_http_parametrize_path
|    |    |    \--- r_http_parametrize_path_remove_ids
|    |    \--- r_apacheclient_detect_entry
|    +--- r_http_tracing_span_name_default
|    \--- r_http_client_tracing_default_attributes
|         \--- r_http_tracing_default_attributes
|              \--- r_tracing_global_attributes
|                   +--- r_tracing_exception_attributes
|                   \--- r_tracing_fqn_attribute
+--- r_httpurlconnection_down_propagation
|    \--- r_httpurlconnection_detect_entry
+--- r_httpurlconnection_http_metric
|    +--- r_http_client_record_metric
|    +--- r_capture_method_duration_conditional
|    |    \--- r_capture_method_entry_timestamp_conditional
|    +--- r_httpurlconnection_extract_details
|    |    +--- r_httpurlconnection_extract_request_details
|    |    |    +--- r_httpurlconnection_detect_entry
|    |    |    \--- r_http_parametrize_path
|    |    |         \--- r_http_parametrize_path_remove_ids
|    |    \--- r_httpurlconnection_extract_response_details
|    |         \--- r_httpurlconnection_detect_entry
|    \--- r_httpurlconnection_detect_end
|         \--- r_httpurlconnection_detect_entry
+--- r_httpurlconnection_servicegraph_propagation
|    \--- r_servicegraph_prepare_down_propagation
+--- r_httpurlconnection_servicegraph_record
|    +--- r_servicegraph_outbound_record_method
|    |    +--- r_servicegraph_outbound_record_metric
|    |    \--- r_servicegraph_capture_method_duration
|    |         \--- r_capture_method_duration_conditional
|    |              \--- r_capture_method_entry_timestamp_conditional
|    +--- r_httpurlconnection_extract_request_details
|    |    +--- r_httpurlconnection_detect_entry
|    |    \--- r_http_parametrize_path
|    |         \--- r_http_parametrize_path_remove_ids
|    \--- r_httpurlconnection_detect_end
|         \--- r_httpurlconnection_detect_entry
+--- r_httpurlconnection_tracing_end
|    +--- r_http_tracing_span_name_default
|    +--- r_httpurlconnection_extract_request_details
|    |    +--- r_httpurlconnection_detect_entry
|    |    \--- r_http_parametrize_path
|    |         \--- r_http_parametrize_path_remove_ids
|    +--- r_httpurlconnection_detect_end
|    |    \--- r_httpurlconnection_detect_entry
|    +--- r_http_client_tracing_default_attributes
|    |    \--- r_http_tracing_default_attributes
|    |         \--- r_tracing_global_attributes
|    |              +--- r_tracing_exception_attributes
|    |              \--- r_tracing_fqn_attribute
|    \--- r_httpurlconnection_extract_response_details
|         \--- r_httpurlconnection_detect_entry
+--- r_httpurlconnection_tracing_start
|    +--- r_http_tracing_span_name_default
|    +--- r_httpurlconnection_extract_request_details
|    |    +--- r_httpurlconnection_detect_entry
|    |    \--- r_http_parametrize_path
|    |         \--- r_http_parametrize_path_remove_ids
|    \--- r_httpurlconnection_detect_start
|         \--- r_httpurlconnection_detect_entry
+--- r_httpurlconnection_up_propagation
|    \--- r_httpurlconnection_detect_entry
+--- r_jdbc_prepared_sql_stop_propagation
|    \--- r_jdbc_detect_entry
+--- r_jdbc_query_metric_preparedstatement
|    \--- r_jdbc_query_metric_defaults
|         +--- r_capture_method_duration_conditional
|         |    \--- r_capture_method_entry_timestamp_conditional
|         +--- r_jdbc_extract_url
|         |    \--- r_jdbc_detect_entry
|         \--- r_jdbc_detect_entry
+--- r_jdbc_query_metric_statement_execute
|    \--- r_jdbc_query_metric_defaults
|         +--- r_capture_method_duration_conditional
|         |    \--- r_capture_method_entry_timestamp_conditional
|         +--- r_jdbc_extract_url
|         |    \--- r_jdbc_detect_entry
|         \--- r_jdbc_detect_entry
+--- r_jdbc_query_metric_statement_executeBatch
|    \--- r_jdbc_query_metric_defaults
|         +--- r_capture_method_duration_conditional
|         |    \--- r_capture_method_entry_timestamp_conditional
|         +--- r_jdbc_extract_url
|         |    \--- r_jdbc_detect_entry
|         \--- r_jdbc_detect_entry
+--- r_jdbc_servicegraph_record
|    +--- r_servicegraph_outbound_record_method
|    |    +--- r_servicegraph_outbound_record_metric
|    |    \--- r_servicegraph_capture_method_duration
|    |         \--- r_capture_method_duration_conditional
|    |              \--- r_capture_method_entry_timestamp_conditional
|    +--- r_jdbc_extract_url
|    |    \--- r_jdbc_detect_entry
|    \--- r_jdbc_detect_entry
+--- r_jdbc_tracing_preparedstatement
|    \--- r_jdbc_tracing_defaults
|         +--- r_tracing_global_attributes
|         |    +--- r_tracing_exception_attributes
|         |    \--- r_tracing_fqn_attribute
|         +--- r_jdbc_extract_url
|         |    \--- r_jdbc_detect_entry
|         \--- r_jdbc_detect_entry
+--- r_jdbc_tracing_statement_execute
|    \--- r_jdbc_tracing_defaults
|         +--- r_tracing_global_attributes
|         |    +--- r_tracing_exception_attributes
|         |    \--- r_tracing_fqn_attribute
|         +--- r_jdbc_extract_url
|         |    \--- r_jdbc_detect_entry
|         \--- r_jdbc_detect_entry
+--- r_jdbc_tracing_statement_executeBatch
|    \--- r_jdbc_tracing_defaults
|         +--- r_tracing_global_attributes
|         |    +--- r_tracing_exception_attributes
|         |    \--- r_tracing_fqn_attribute
|         +--- r_jdbc_extract_url
|         |    \--- r_jdbc_detect_entry
|         \--- r_jdbc_detect_entry
+--- r_servletapi_downPropagation
|    \--- r_servletapi_detect_entry
+--- r_servletapi_http_metric
|    +--- r_http_server_record_metric_on_method
|    |    +--- r_http_server_record_metric
|    |    \--- r_http_capture_method_duration
|    |         \--- r_capture_method_duration_conditional
|    |              \--- r_capture_method_entry_timestamp_conditional
|    \--- r_servletapi_extract_details
|         +--- r_servletapi_detect_entry
|         \--- r_http_parametrize_path
|              \--- r_http_parametrize_path_remove_ids
+--- r_servletapi_servicegraph_propagation
|    \--- r_servicegraph_prepare_up_propagation
+--- r_servletapi_servicegraph_record
|    \--- r_servicegraph_inbound_record_method
|         +--- r_servicegraph_inbound_record_metric
|         \--- r_servicegraph_capture_method_duration
|              \--- r_capture_method_duration_conditional
|                   \--- r_capture_method_entry_timestamp_conditional
+--- r_servletapi_servlet_filter_upPropagation
+--- r_servletapi_servletresponse_upPropagation
\--- r_servletapi_tracing
     +--- r_http_tracing_span_name_default
     +--- r_http_server_tracing_default_attributes
     |    \--- r_http_tracing_default_attributes
     |         \--- r_tracing_global_attributes
     |              +--- r_tracing_exception_attributes
     |              \--- r_tracing_fqn_attribute
     +--- r_custom_rule
     \--- r_servletapi_extract_details
          +--- r_servletapi_detect_entry
          \--- r_http_parametrize_path
               \--- r_http_parametrize_path_remove_ids
Unused Rules
+--- r_capture_method_duration
|    \--- r_capture_method_duration_conditional
|         \--- r_capture_method_entry_timestamp_conditional
+--- r_method_metric
|    \--- r_capture_method_duration
|         \--- r_capture_method_duration_conditional
|              \--- r_capture_method_entry_timestamp_conditional
\--- r_trace_method
     \--- r_tracing_global_attributes
          +--- r_tracing_exception_attributes
          \--- r_tracing_fqn_attribute