Why list all tags and logging keys
Tables list all standard Span tags and logging keys in all supported components. Nearly all these tags and logging keys are used in analysis backend, so if you want to extend the plugins or use OpenTracing-toolkit to trace your application, this will become a good demo about how to tag and log.
Special circumstances
Catch an exception
- In sky-walking auto-instrumentation mechanism, if any span catches an exception(Throwable.class in Java), we assume this equals execution failure.
- In your own extend-plugins/manual-opentracing, this is another story. You can only log an exception, but do not process as an error.
- Besides this section, this doc will not describe the error things, again, in other circumstances.
Here is table about tags and error-logging keys:
- tags
| Span tag | Value(const) |
|---|---|
| error | boolean:true |
- error-logging keys
| Span log field | Value(const) | Notes |
|---|---|---|
| event | string:error |
|
| error.kind | Throwable.getClass().getName() |
|
| message | Throwable.getMessage() |
|
| stack | A stack trace in Java format. Something likes e.printStackTrace() |
Http Framework
The Operation name of http span is request URI, e.g. /portal.
Tomcat
Here is table about span tags of Tomcat plugin
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:Tomcat |
|
| span.layer | string:http |
|
| span.kind | string:server |
|
| peer.host | client host. e.g. string:192.168.1.8 |
|
| peer.port | client port. e.g. int:8080 |
|
| status_code | response code. e.g. int:200 |
|
| url | request url. e.g. string:http://localhost:8080/portal |
HttpClient
Here is table about span tags of HttpClient plugin
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:HttpClient |
|
| span.layer | string:http |
|
| span.kind | string:client |
|
| status_code | response code. e.g. int:200 |
|
| peer.host | request host. e.g. string:192.168.1.8 |
|
| peer.port | request port. e.g. int:20880 |
|
| url | request url. e.g. string:http://192.168.1.8/persistence/query |
RPC framework
The operation name of RPC framework span is the request service method, e.g.
com.a.eye.skywalking.test.persistence.PersistenceService.query(String).
Dubbo
Here is the table of span tags span in server side.
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:Dubbo |
|
| span.layer | string:rpc |
|
| span.kind | string:server |
|
| peer.host | request host. e.g. string:192.168.1.8 |
|
| peer.port | request port. e.g. int:20880 |
Here is the table of span tags span in client side.
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:Dubbo |
|
| span.layer | string:rpc |
|
| span.kind | string:client |
|
| peer.host | request host. e.g. string:192.168.1.8 |
|
| peer.port | request port. e.g. int:20880 |
|
| url | request service url. e.g. string:rest://192.168.1.8:20880/default_rpc/com.a.eye.skywalking.test.persistence.PersistenceService.query(String) |
Motan
Here is the table of span tags span in server side.
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:Motan |
|
| span.layer | string:rpc |
|
| span.kind | string:server |
Here is the table of span tags span in client side.
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:Motan |
|
| span.layer | string:rpc |
|
| span.kind | string:client |
|
| peer.host | request host. e.g. string:192.168.1.8 |
|
| peer.port | request port. e.g. int:8002 |
|
| url | request service url. e.g. string:motan://192.168.1.8:8002/default_rpc/com.a.eye.skywalking.test.cache.CacheService/1.0/referer |
JDBI-supported-DB
The operation name of DB plugin span format is [component]/JDBI/[component]/[operation name], e.g.
H2/JDBI/PreparedStatement/executeQuery or Mysql/JDBI/Statement/executeQuery or
Oracle/JDBI/PreparedCallable/execute.
H2
Here is table about span tags of H2 plugin
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:H2 |
|
| span.layer | string:db |
|
| db.type | string:sql |
|
| span.instance | database name. e.g. string:dataSource |
|
| db.statement (optional) | execute sql. e.g. string:SELECT id, CACHE_VALUE, CACHE_KEY FROM CACHE_TABLE WHERE CACHE_KEY = ? |
|
| peer.host | db host. e.g. string:localhost |
|
| peer.port | db port. the value may be is -1 if h2 running with file mode or memory mode. e.g. int:8002 or int:-1 |
Mysql
Here is table about span tags of Mysql plugin
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:Mysql |
|
| span.layer | string:db |
|
| db.type | string:sql |
|
| span.instance | database name. e.g. string:skywalking-test |
|
| db.statement (optional) | execute sql. e.g. string:SELECT id, CACHE_VALUE, CACHE_KEY FROM CACHE_TABLE WHERE CACHE_KEY = ? |
|
| peer.host | mysql host. e.g. string:127.0.0.1 |
|
| peer.port | mysql port. e.g. int:3307 |
Jedis
Here is table about span tags of single redis server. The operation name of jedis plugin format is Jedis/[operation name]. e.g.
Jedis/set.
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:Redis |
|
| span.layer | string:db |
|
| span.kind | string:client |
|
| db.type | string:redis-jedis |
|
| db.statement (optional) | operation name and operation key. e.g. string:get test |
|
| peer.host | redis host. e.g. string:127.0.0.1 |
|
| peer.port | redis port. e.g. int:6379 |
Here is table about span tags of redis cluster.
| Span tag | Value(const) | Notes |
|---|---|---|
| component | string:Redis |
|
| span.layer | string:db |
|
| span.kind | string:client |
|
| db.type | string:Redis |
|
| db.statement (optional) | operation name and operation key. e.g. string:set test |
|
| peers | redis host and port. e.g. string:127.0.0.1:6379;127.0.0.1:16379; |
WIKI documents are maintained by @OpenSkywalking