service introspection plugin
Plugin Overview
The service_introspection_plugin is used to publish RPC communication link requests, responses, and metadata (such as sequence numbers, timestamps, service names, etc.) as Topic messages to specified topics, facilitating service tracking and issue diagnosis.
The plugin configuration options are as follows:
Node |
Type |
Optional |
Default |
Description |
|---|---|---|---|---|
mode |
string |
Optional |
full |
Plugin operation mode |
rpc_serialization_type |
string |
Optional |
json |
RPC data serialization type |
client_info_topic_name |
string |
Required |
“” |
Client info publication topic |
server_info_topic_name |
string |
Required |
“” |
Server info publication topic |
Usage notes:
modespecifies the plugin operation mode. Valid values aremeta,hybrid, andfull, withfullas the default. These modes represent:metamode: Records only metadata such as client and server IDs, timestamps, etc.hybridmode: Records client metadata, request and response data, and server metadata.fullmode: Records client metadata, request and response data, server metadata, request and response data.
rpc_serialization_typespecifies the RPC data serialization type. Valid values arejsonandauto, withjsonas the default. Ifautois selected, the serialization type (protobuf or ros2) will be automatically determined based on the request data.client_info_topic_nameandserver_info_topic_namespecify the client info publication topic name and server info publication topic name, respectively. If both are set to the same topic name, information will be published through a single publisher. If they are set to different topic names, information will be published through two separate publishers.
Example Configuration
The following is a simple example configuration:
aimrt:
plugin:
plugins:
- name: service_introspection_plugin
path: ./libaimrt_service_introspection_plugin.so
options:
client_info_topic_name: /service_introspection
server_info_topic_name: /service_introspection
mode: full
rpc_serialization_type: json
rpc:
backends:
- type: local
clients_options:
- func_name: "(.*)"
enable_backends: [local]
enable_filters: [service_introspection]
servers_options:
- func_name: "(.*)"
enable_backends: [local]
enable_filters: [service_introspection]
# ...
```