From d0aa2c516579e32b3285427ccbd609fbcedafec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Sun, 11 Sep 2022 20:46:57 +0800 Subject: [PATCH] Add docs for virtual database tags (#307) * Add docs for virtual database tags * Update CHANGES.md --- CHANGES.md | 3 ++- .../java-agent/Java-Plugin-Development-Guide.md | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 46411e5ae..bcd3a46f2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,7 +15,8 @@ Release Notes. #### Documentation * Update `configuration` doc about overriding default value as empty map/list accordingly. -* Update plugin dev tags for cache relative tags +* Update plugin dev tags for cache relative tags. +* Add plugin dev docs for virtual database tags. All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/150?closed=1) diff --git a/docs/en/setup/service-agent/java-agent/Java-Plugin-Development-Guide.md b/docs/en/setup/service-agent/java-agent/Java-Plugin-Development-Guide.md index 20e9ce65e..289a20efa 100644 --- a/docs/en/setup/service-agent/java-agent/Java-Plugin-Development-Guide.md +++ b/docs/en/setup/service-agent/java-agent/Java-Plugin-Development-Guide.md @@ -186,6 +186,19 @@ The value of `x-le` should be in JSON format. There are two options: } ``` +#### Vitural Database Relative Tags +SkyWalking analysis Database(SQL-like) performance metrics through the following tags. + +```java + public static final StringTag DB_TYPE = new StringTag(3, "db.type"); + public static final StringTag DB_STATEMENT = new StringTag(5, "db.statement"); +``` + +* `db.type` records database type, such as sql, cassandra, Elasticsearch. +* `db.statement`records the sql statement of the database access. + +Read [backend's virtual database doc](https://skywalking.apache.org/docs/main/next/en/setup/service-agent/virtual-database/) for more details. + #### Vitural Cache Relative Tags Skywalking analysis cache performance related metrics through the following tags.