-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Logs
We may configure the log directory via the csp.sentinel.log.dir
property.
All block logs will be recorded in ${user_home}/logs/csp/sentinel-block.log
:
2014-06-20 16:35:10|1|sayHello(java.lang.String,long),FlowException,default,origin|61,0
2014-06-20 16:35:11|1|sayHello(java.lang.String,long),FlowException,default,origin|1,0
-
2014-06-20 16:35:10
: timestamp -
1
: index -
sayHello(java.lang.String,long)
: the resource name -
XXXException
,type of rules to take effect.FlowException
for flow control,DegradeException
for circuit breaking,SystemException
for system adaptive protection,ParamFlowException
for parameter flow control -
default
for thelimitApp
defined in rules -
origin
,for the real origin of the request (or the parameter) -
61,0
,61 for block times; 0 has no meaning, which can be ignored
Metrics of resources are recorded in ${user_home}/logs/csp/{app_name}-metrics.log
:
1529573107000|2018-06-21 17:25:07|sayHello(java.lang.String,long)|10|3601|10|0|2
-
1529573107000
: the timestamp of this record; -
2018-06-21 17:25:07
: formatted date/time; -
sayHello(java.lang.String,long)
: resource name; -
10
: passed request count (passQps
); -
3601
: blocked count; -
10
: complete count (successfully handled by Sentinel); -
0
: business exception count; -
2
: the average response time (ms)
Other info (such as rule loading) is recorded in ${user_home}/logs/csp/sentinel-record.log.xxx
.
Since 1.7.2, a new Logger SPI mechanism is introduced for flexible logging extension. The default logger implementation is still based on java.util.logging
, and developers could introduce dependencies of logging integration to adapt to their existing logging library (e.g. slf4j). We've provided the sentinel-logging-slf4j module.
Note that the logger SPI is designed for RecordLog
and CommandCenterLog
. The metric log and block log will not be affected by the logger SPI.
-
文档
-
Documents
- Read Me
- Introduction
- How to Use
- How it Works
- Flow Control
- Parameter Flow Control
- Cluster Flow Control
- API Gateway Flow Control
- Circuit Breaking
- Adaptive System Protection
- Metrics
- General Configuration
- Dynamic Rule Configuration
- Dashboard
- Integrations with open-source frameworks
- Contribution Guideline