mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-12 05:32:36 +00:00
Update cache library, use miniredis for testing, add additional benchmarks. (#14)
Update cache library, Update logging library, use miniredis for testing, add additional benchmarks.
This commit is contained in:
+5
-1
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/goccy/go-json"
|
||||
"github.com/lukaszraczylo/ask"
|
||||
libpack_logger "github.com/lukaszraczylo/graphql-monitoring-proxy/logging"
|
||||
libpack_monitoring "github.com/lukaszraczylo/graphql-monitoring-proxy/monitoring"
|
||||
)
|
||||
|
||||
@@ -15,7 +16,10 @@ func extractClaimsFromJWTHeader(authorization string) (usr string, role string)
|
||||
|
||||
handleError := func(msg string, details map[string]interface{}) {
|
||||
cfg.Monitoring.Increment(libpack_monitoring.MetricsFailed, nil)
|
||||
cfg.Logger.Error(msg, details)
|
||||
cfg.Logger.Error(&libpack_logger.LogMessage{
|
||||
Message: msg,
|
||||
Pairs: details,
|
||||
})
|
||||
}
|
||||
|
||||
tokenParts := strings.Split(authorization, ".")
|
||||
|
||||
Reference in New Issue
Block a user