docs/en/concepts-and-designs/service-hierarchy.md
SkyWalking v10 introduces a new concept Service Hierarchy which defines the relationships of existing logically same services in various layers.
OAP will detect the services from different layers, and try to build the connections.
There 2 ways to detect the connections:
Note: All the relationships and auto-matching rules should be defined in the config/hierarchy-definition.yml file.
If you want to customize it according to your own needs, please refer to Service Hierarchy Configuration.
upper-layer On lower-layer format.group and short name with :: separator.lower-short-name-remove-ns{ (u, l) -> u.shortName == l.shortName.substring(0, l.shortName.lastIndexOf('.')) }agent::songsskywalking-showcase::songs.sample-serviceslower-short-name-remove-ns{ (u, l) -> u.shortName == l.shortName.substring(0, l.shortName.lastIndexOf('.')) }agent::frontendAPISIX::frontend.sample-serviceslower-short-name-with-fqdn{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }mysql.skywalking-showcase.svc.cluster.local:3306mysql::mysql.skywalking-showcaselower-short-name-with-fqdn{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }psql.skywalking-showcase.svc.cluster.local:5432postgresql::psql.skywalking-showcaselower-short-name-with-fqdn{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }clickhouse.skywalking-showcase.svc.cluster.local:8123clickhouse::clickhouse.skywalking-showcaselower-short-name-with-fqdn{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }rocketmq.skywalking-showcase.svc.cluster.local:9876rocketmq::rocketmq.skywalking-showcaselower-short-name-with-fqdn{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }rabbitmq.skywalking-showcase.svc.cluster.local:5672rabbitmq::rabbitmq.skywalking-showcaselower-short-name-with-fqdn{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }kafka.skywalking-showcase.svc.cluster.local:9092kafka::rocketmq.skywalking-showcaselower-short-name-with-fqdn{ (u, l) -> u.shortName.substring(0, u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }pulsar.skywalking-showcase.svc.cluster.local:6650pulsar::pulsar.skywalking-showcasename{ (u, l) -> u.name == l.name }mesh-svr::songs.sample-servicesmesh-svr::songs.sample-servicesshort-name{ (u, l) -> u.shortName == l.shortName }mesh-svr::songs.sample-servicesskywalking-showcase::songs.sample-servicesshort-name{ (u, l) -> u.shortName == l.shortName }mesh-svr::songs.sample-servicesskywalking-showcase::songs.sample-servicesshort-name{ (u, l) -> u.shortName == l.shortName }mysql::mysql.skywalking-showcaseskywalking-showcase::mysql.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }postgresql::psql.skywalking-showcaseskywalking-showcase::psql.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }clickhouse::clickhouse.skywalking-showcaseskywalking-showcase::clickhouse.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }nginx::nginx.skywalking-showcaseskywalking-showcase::nginx.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }APISIX::frontend.sample-servicesskywalking-showcase::frontend.sample-servicesshort-name{ (u, l) -> u.shortName == l.shortName }rocketmq::rocketmq.skywalking-showcaseskywalking-showcase::rocketmq.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }rabbitmq::rabbitmq.skywalking-showcaseskywalking-showcase::rabbitmq.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }kafka::kafka.skywalking-showcaseskywalking-showcase::kafka.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }pulsar::pulsar.skywalking-showcaseskywalking-showcase::pulsar.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }demo-oap.skywalking-showcaseskywalking-showcase::demo-oap.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }kong::kong.skywalking-showcaseskywalking-showcase::kong.skywalking-showcaseshort-name{ (u, l) -> u.shortName == l.shortName }airflow::airflow.skywalking-showcaseskywalking-showcase::airflow.skywalking-showcaseUse 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 |
|---|
Instance Hierarchy relationship follows the same definition as Service Hierarchy.
If the service hierarchy is built, the instance hierarchy relationship could be detected automatically through the following rules:
pod/hostname equals the lower instance attribute pod/hostname.pod/hostname equals the lower instance name.pod/hostname.