-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
telemetry: Use
zap.Error()
instead of err.Error()
With JSON formatted logs: ``` $ jq 'select(.error) | select(.error | contains("Prometheus"))' tidb.log { "level": "INFO", "time": "2023/01/27 10:00:35.554 +01:00", "caller": "data_slow_query.go:67", "message": "Failed to get Slow Query Stats", "error": "[domain:9009]Prometheus address is not set in PD and etcd" } { "level": "INFO", "time": "2023/01/27 10:01:36.223 +01:00", "caller": "data_window.go:257", "message": "Error exists when getting the SQL Metric.", "error": "[domain:9009]Prometheus address is not set in PD and etcd" } { "level": "INFO", "time": "2023/01/27 10:02:36.225 +01:00", "caller": "data_window.go:257", "message": "Error exists when getting the SQL Metric.", "error": "[domain:9009]Prometheus address is not set in PD and etcd" } ```
- Loading branch information
1 parent
6381636
commit 1c5dea8
Showing
3 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters