Format service-hierarchy.md (#12110)
This commit is contained in:
parent
d8921d5256
commit
65a5b4484c
|
|
@ -11,36 +11,111 @@ There 2 ways to detect the connections:
|
|||
If you want to customize it according to your own needs, please refer to [Service Hierarchy Configuration](service-hierarchy-configuration.md).
|
||||
|
||||
### Automatically Matching
|
||||
|
||||
| Upper layer | Lower layer | Matching rule |
|
||||
|------------------|-------------|-------------------------------------------------------------------|
|
||||
| GENERAL | K8S_SERVICE | [GENERAL On K8S_SERVICE](#general-on-k8s_service) |
|
||||
| GENERAL | APISIX | [GENERAL On APISIX](#general-on-apisix) |
|
||||
| VIRTUAL_DATABASE | MYSQL | [VIRTUAL_DATABASE On MYSQL](#virtual_database-on-mysql) |
|
||||
| VIRTUAL_DATABASE | POSTGRESQL | [VIRTUAL_DATABASE On POSTGRESQL](#virtual_database-on-postgresql) |
|
||||
| VIRTUAL_DATABASE | CLICKHOUSE | [VIRTUAL_DATABASE On CLICKHOUSE](#virtual_database-on-clickhouse) |
|
||||
| VIRTUAL_MQ | RABBITMQ | [VIRTUAL_MQ On RABBITMQ](#virtual_mq-on-rabbitmq) |
|
||||
| VIRTUAL_MQ | ROCKETMQ | [VIRTUAL_MQ On K8S_SERVICE](#virtual_mq-on-rocketmq) |
|
||||
| VIRTUAL_MQ | KAFKA | [VIRTUAL_MQ On KAFKA](#virtual_mq-on-kafka) |
|
||||
| VIRTUAL_MQ | RABBITMQ | [VIRTUAL_MQ On RABBITMQ](#virtual_mq-on-rabbitmq) |
|
||||
| VIRTUAL_MQ | PULSAR | [VIRTUAL_MQ On PULSAR](#virtual_mq-on-pulsar) |
|
||||
| MESH | MESH_DP | [MESH On MESH_DP](#mesh-on-mesh_dp) |
|
||||
| MESH | K8S_SERVICE | [MESH On K8S_SERVICE](#mesh-on-k8s_service) |
|
||||
| MESH_DP | K8S_SERVICE | [MESH_DP On K8S_SERVICE](#mesh_dp-on-k8s_service) |
|
||||
| GENERAL | K8S_SERVICE | [GENERAL On K8S_SERVICE](#general-on-k8s_service) |
|
||||
| GENERAL | APISIX | [GENERAL On APISIX](#general-on-apisix) |
|
||||
| MYSQL | K8S_SERVICE | [MYSQL On K8S_SERVICE](#mysql-on-k8s_service) |
|
||||
| POSTGRESQL | K8S_SERVICE | [POSTGRESQL On K8S_SERVICE](#postgresql-on-k8s_service) |
|
||||
| SO11Y_OAP | K8S_SERVICE | [SO11Y_OAP On K8S_SERVICE](#so11y_oap-on-k8s_service) |
|
||||
| VIRTUAL_DATABASE | MYSQL | [VIRTUAL_DATABASE On MYSQL](#virtual_database-on-mysql) |
|
||||
| VIRTUAL_DATABASE | POSTGRESQL | [VIRTUAL_DATABASE On POSTGRESQL](#virtual_database-on-postgresql) |
|
||||
| CLICKHOUSE | K8S_SERVICE | [CLICKHOUSE On K8S_SERVICE](#clickhouse-on-k8s_service) |
|
||||
| NGINX | K8S_SERVICE | [NGINX On K8S_SERVICE](#nginx-on-k8s_service) |
|
||||
| APISIX | K8S_SERVICE | [APISIX On K8S_SERVICE](#apisix-on-k8s_service) |
|
||||
| ROCKETMQ | K8S_SERVICE | [ROCKETMQ On K8S_SERVICE](#rocketmq-on-k8s_service) |
|
||||
| RABBITMQ | K8S_SERVICE | [RABBITMQ On K8S_SERVICE](#rabbitmq-on-k8s_service) |
|
||||
| KAFKA | K8S_SERVICE | [KAFKA On K8S_SERVICE](#kafka-on-k8s_service) |
|
||||
| VIRTUAL_MQ | RABBITMQ | [VIRTUAL_MQ On RABBITMQ](#virtual_mq-on-rabbitmq) |
|
||||
| VIRTUAL_MQ | ROCKETMQ | [VIRTUAL_MQ On K8S_SERVICE](#virtual_mq-on-rocketmq) |
|
||||
| VIRTUAL_MQ | KAFKA | [VIRTUAL_MQ On KAFKA](#virtual_mq-on-kafka) |
|
||||
| VIRTUAL_MQ | RABBITMQ | [VIRTUAL_MQ On RABBITMQ](#virtual_mq-on-rabbitmq) |
|
||||
| CLICKHOUSE | K8S_SERVICE | [CLICKHOUSE On K8S_SERVICE](#clickhouse-on-k8s_service) |
|
||||
| VIRTUAL_DATABASE | CLICKHOUSE | [VIRTUAL_DATABASE On CLICKHOUSE](#virtual_database-on-clickhouse) |
|
||||
| PULSAR | K8S_SERVICE | [PULSAR On K8S_SERVICE](#pulsar-on-k8s_service) |
|
||||
| VIRTUAL_MQ | PULSAR | [VIRTUAL_MQ On PULSAR](#virtual_mq-on-pulsar) |
|
||||
| SO11Y_OAP | K8S_SERVICE | [SO11Y_OAP On K8S_SERVICE](#so11y_oap-on-k8s_service) |
|
||||
|
||||
- The following sections will describe the **default matching rules** in detail and use the `upper-layer On lower-layer` format.
|
||||
- The example service name are based on SkyWalking [Showcase](https://github.com/apache/skywalking-showcase) default deployment.
|
||||
- In SkyWalking the service name could be composed of `group` and `short name` with `::` separator.
|
||||
|
||||
#### GENERAL On K8S_SERVICE
|
||||
- Rule name: `lower-short-name-remove-ns`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName.substring(0, l.shortName.lastIndexOf('.')) }`
|
||||
- Description: GENERAL.service.shortName == K8S_SERVICE.service.shortName without namespace
|
||||
- Matched Example:
|
||||
- GENERAL.service.name: `agent::songs`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::songs.sample-services`
|
||||
|
||||
#### GENERAL On APISIX
|
||||
- Rule name: `lower-short-name-remove-ns`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName.substring(0, l.shortName.lastIndexOf('.')) }`
|
||||
- Description: GENERAL.service.shortName == APISIX.service.shortName without namespace
|
||||
- Matched Example:
|
||||
- GENERAL.service.name: `agent::frontend`
|
||||
- APISIX.service.name: `APISIX::frontend.sample-services`
|
||||
|
||||
|
||||
#### VIRTUAL_DATABASE On MYSQL
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_DATABASE.service.shortName remove port == MYSQL.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_DATABASE.service.name: `mysql.skywalking-showcase.svc.cluster.local:3306`
|
||||
- MYSQL.service.name: `mysql::mysql.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_DATABASE On POSTGRESQL
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_DATABASE.service.shortName remove port == POSTGRESQL.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_DATABASE.service.name: `psql.skywalking-showcase.svc.cluster.local:5432`
|
||||
- POSTGRESQL.service.name: `postgresql::psql.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_DATABASE On CLICKHOUSE
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_DATABASE.service.shortName remove port == CLICKHOUSE.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_DATABASE.service.name: `clickhouse.skywalking-showcase.svc.cluster.local:8123`
|
||||
- CLICKHOUSE.service.name: `clickhouse::clickhouse.skywalking-showcase`
|
||||
|
||||
|
||||
#### VIRTUAL_MQ On ROCKETMQ
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_MQ.service.shortName remove port == ROCKETMQ.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_MQ.service.name: `rocketmq.skywalking-showcase.svc.cluster.local:9876`
|
||||
- ROCKETMQ.service.name: `rocketmq::rocketmq.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_MQ On RABBITMQ
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_MQ.service.shortName remove port == RABBITMQ.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_MQ.service.name: `rabbitmq.skywalking-showcase.svc.cluster.local:5672`
|
||||
- RABBITMQ.service.name: `rabbitmq::rabbitmq.skywalking-showcase`
|
||||
-
|
||||
#### VIRTUAL_MQ On KAFKA
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_MQ.service.shortName remove port == KAFKA.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_MQ.service.name: `kafka.skywalking-showcase.svc.cluster.local:9092`
|
||||
- KAFKA.service.name: `kafka::rocketmq.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_MQ On PULSAR
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_MQ.service.shortName remove port == PULSAR.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_MQ.service.name: `pulsar.skywalking-showcase.svc.cluster.local:6650`
|
||||
- PULSAR.service.name: `pulsar::pulsar.skywalking-showcase`
|
||||
|
||||
#### MESH On MESH_DP
|
||||
- Rule name: `name`
|
||||
- Groovy script: `{ (u, l) -> u.name == l.name }`
|
||||
|
|
@ -65,22 +140,6 @@ If you want to customize it according to your own needs, please refer to [Servic
|
|||
- MESH_DP.service.name: `mesh-svr::songs.sample-services`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::songs.sample-services`
|
||||
|
||||
#### GENERAL On K8S_SERVICE
|
||||
- Rule name: `lower-short-name-remove-ns`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName.substring(0, l.shortName.lastIndexOf('.')) }`
|
||||
- Description: GENERAL.service.shortName == K8S_SERVICE.service.shortName without namespace
|
||||
- Matched Example:
|
||||
- GENERAL.service.name: `agent::songs`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::songs.sample-services`
|
||||
|
||||
#### GENERAL On APISIX
|
||||
- Rule name: `lower-short-name-remove-ns`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName.substring(0, l.shortName.lastIndexOf('.')) }`
|
||||
- Description: GENERAL.service.shortName == APISIX.service.shortName without namespace
|
||||
- Matched Example:
|
||||
- GENERAL.service.name: `agent::frontend`
|
||||
- APISIX.service.name: `APISIX::frontend.sample-services`
|
||||
|
||||
#### MYSQL On K8S_SERVICE
|
||||
- Rule name: `short-name`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
|
||||
|
|
@ -97,29 +156,13 @@ If you want to customize it according to your own needs, please refer to [Servic
|
|||
- POSTGRESQL.service.name: `postgresql::psql.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::psql.skywalking-showcase`
|
||||
|
||||
#### SO11Y_OAP On K8S_SERVICE
|
||||
#### CLICKHOUSE On K8S_SERVICE
|
||||
- Rule name: `short-name`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
|
||||
- Description: SO11Y_OAP.service.shortName == K8S_SERVICE.service.shortName
|
||||
- Matched Example:
|
||||
- SO11Y_OAP.service.name: `demo-oap.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::demo-oap.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_DATABASE On MYSQL
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_DATABASE.service.shortName remove port == MYSQL.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_DATABASE.service.name: `mysql.skywalking-showcase.svc.cluster.local:3306`
|
||||
- MYSQL.service.name: `mysql::mysql.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_DATABASE On POSTGRESQL
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_DATABASE.service.shortName remove port == POSTGRESQL.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_DATABASE.service.name: `psql.skywalking-showcase.svc.cluster.local:5432`
|
||||
- POSTGRESQL.service.name: `postgresql::psql.skywalking-showcase`
|
||||
- Description: CLICKHOUSE.service.shortName == K8S_SERVICE.service.shortName
|
||||
- Matched Example:
|
||||
- CLICKHOUSE.service.name: `clickhouse::clickhouse.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::clickhouse.skywalking-showcase`
|
||||
|
||||
#### NGINX On K8S_SERVICE
|
||||
- Rule name: `short-name`
|
||||
|
|
@ -145,14 +188,6 @@ If you want to customize it according to your own needs, please refer to [Servic
|
|||
- ROCKETMQ.service.name: `rocketmq::rocketmq.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::rocketmq.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_MQ On ROCKETMQ
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_MQ.service.shortName remove port == ROCKETMQ.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_MQ.service.name: `rocketmq.skywalking-showcase.svc.cluster.local:9876`
|
||||
- ROCKETMQ.service.name: `rocketmq::rocketmq.skywalking-showcase`
|
||||
|
||||
#### RABBITMQ On K8S_SERVICE
|
||||
- Rule name: `short-name`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
|
||||
|
|
@ -161,14 +196,6 @@ If you want to customize it according to your own needs, please refer to [Servic
|
|||
- RABBITMQ.service.name: `rabbitmq::rabbitmq.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::rabbitmq.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_MQ On RABBITMQ
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_MQ.service.shortName remove port == RABBITMQ.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_MQ.service.name: `rabbitmq.skywalking-showcase.svc.cluster.local:5672`
|
||||
- RABBITMQ.service.name: `rabbitmq::rabbitmq.skywalking-showcase`
|
||||
|
||||
#### KAFKA On K8S_SERVICE
|
||||
- Rule name: `short-name`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
|
||||
|
|
@ -177,30 +204,6 @@ If you want to customize it according to your own needs, please refer to [Servic
|
|||
- KAFKA.service.name: `kafka::kafka.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::kafka.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_MQ On KAFKA
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_MQ.service.shortName remove port == KAFKA.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_MQ.service.name: `kafka.skywalking-showcase.svc.cluster.local:9092`
|
||||
- KAFKA.service.name: `kafka::rocketmq.skywalking-showcase`
|
||||
|
||||
#### CLICKHOUSE On K8S_SERVICE
|
||||
- Rule name: `short-name`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
|
||||
- Description: CLICKHOUSE.service.shortName == K8S_SERVICE.service.shortName
|
||||
- Matched Example:
|
||||
- CLICKHOUSE.service.name: `clickhouse::clickhouse.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::clickhouse.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_DATABASE On CLICKHOUSE
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_DATABASE.service.shortName remove port == CLICKHOUSE.service.shortName with fqdn suffix
|
||||
- Matched Example:
|
||||
- VIRTUAL_DATABASE.service.name: `clickhouse.skywalking-showcase.svc.cluster.local:8123`
|
||||
- CLICKHOUSE.service.name: `clickhouse::clickhouse.skywalking-showcase`
|
||||
|
||||
#### PULSAR On K8S_SERVICE
|
||||
- Rule name: `short-name`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
|
||||
|
|
@ -209,16 +212,16 @@ If you want to customize it according to your own needs, please refer to [Servic
|
|||
- PULSAR.service.name: `pulsar::pulsar.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::pulsar.skywalking-showcase`
|
||||
|
||||
#### VIRTUAL_MQ On PULSAR
|
||||
- Rule name: `lower-short-name-with-fqdn`
|
||||
- Groovy script: `{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
|
||||
- Description: VIRTUAL_MQ.service.shortName remove port == PULSAR.service.shortName with fqdn suffix
|
||||
#### SO11Y_OAP On K8S_SERVICE
|
||||
- Rule name: `short-name`
|
||||
- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
|
||||
- Description: SO11Y_OAP.service.shortName == K8S_SERVICE.service.shortName
|
||||
- Matched Example:
|
||||
- VIRTUAL_MQ.service.name: `pulsar.skywalking-showcase.svc.cluster.local:6650`
|
||||
- PULSAR.service.name: `pulsar::pulsar.skywalking-showcase`
|
||||
- SO11Y_OAP.service.name: `demo-oap.skywalking-showcase`
|
||||
- K8S_SERVICE.service.name: `skywalking-showcase::demo-oap.skywalking-showcase`
|
||||
|
||||
### Build Through Specific Agents
|
||||
Use agent tech involved(such as eBPF) and deployment tools(such as operator and agent injector) detect the service hierarchy relations.
|
||||
Use agent tech involved(such as eBPF) and deployment tools(such as operator and agent injector) to detect the service hierarchy relations.
|
||||
|
||||
| Upper layer | Lower layer | Agent |
|
||||
|-------------|--------------|-------|
|
||||
|
|
|
|||
Loading…
Reference in New Issue