Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error message fields are not expanded in logs #1310

Closed
bobcallaway opened this issue Jan 28, 2023 · 0 comments · Fixed by #1312
Closed

error message fields are not expanded in logs #1310

bobcallaway opened this issue Jan 28, 2023 · 0 comments · Fixed by #1312
Labels
backport_candidate bug Something isn't working

Comments

@bobcallaway
Copy link
Member

Description

While debugging #1308 I discovered that we are missing the specific fields in the log that are supposed to be passed down. This is due to incorrectly passing []interface{} instead of a list of interface{} values.

rekor-server_1         | 2023-01-28T00:21:04.231Z       ERROR   zap@v1.24.0/sugar.go:222        Ignored key without a value.    {"operation": {"id": "9af1e235cbd2/eU8NFviucm-000004"}, "ignored": ["handler","entries.SearchLogQuery","statusCode",500,"clientMessage","unexpected error communicating with transparency log"]}
rekor-server_1         | go.uber.org/zap.(*SugaredLogger).Errorw
rekor-server_1         |        /opt/app-root/pkg/mod/go.uber.org/zap@v1.24.0/sugar.go:222
rekor-server_1         | github.com/sigstore/rekor/pkg/api.handleRekorAPIError.func1
rekor-server_1         |        /opt/app-root/src/pkg/api/error.go:74
rekor-server_1         | github.com/sigstore/rekor/pkg/api.handleRekorAPIError
rekor-server_1         |        /opt/app-root/src/pkg/api/error.go:126
rekor-server_1         | github.com/sigstore/rekor/pkg/api.SearchLogQueryHandler
rekor-server_1         |        /opt/app-root/src/pkg/api/entries.go:452
rekor-server_1         | github.com/sigstore/rekor/pkg/generated/restapi/operations/entries.SearchLogQueryHandlerFunc.Handle
rekor-server_1         |        /opt/app-root/src/pkg/generated/restapi/operations/entries/search_log_query.go:35
rekor-server_1         | github.com/sigstore/rekor/pkg/generated/restapi/operations/entries.(*SearchLogQuery).ServeHTTP
rekor-server_1         |        /opt/app-root/src/pkg/generated/restapi/operations/entries/search_log_query.go:69
rekor-server_1         | github.com/sigstore/rekor/pkg/generated/restapi.recordMetricsForAPI.func1.1
rekor-server_1         |        /opt/app-root/src/pkg/generated/restapi/configure_rekor_server.go:286
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/go-openapi/runtime/middleware.NewOperationExecutor.func1
rekor-server_1         |        /opt/app-root/pkg/mod/github.com/go-openapi/runtime@v0.25.0/middleware/operation.go:28
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/go-openapi/runtime/middleware.NewRouter.func1
rekor-server_1         |        /opt/app-root/pkg/mod/github.com/go-openapi/runtime@v0.25.0/middleware/router.go:78
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/go-openapi/runtime/middleware.Redoc.func1
rekor-server_1         |        /opt/app-root/pkg/mod/github.com/go-openapi/runtime@v0.25.0/middleware/redoc.go:72
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/go-openapi/runtime/middleware.Spec.func1
rekor-server_1         |        /opt/app-root/pkg/mod/github.com/go-openapi/runtime@v0.25.0/middleware/spec.go:46
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/sigstore/rekor/pkg/generated/restapi.recoverer.func1
rekor-server_1         |        /opt/app-root/src/pkg/generated/restapi/configure_rekor_server.go:384
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/go-chi/chi/middleware.RequestLogger.func1.1
rekor-server_1         |        /opt/app-root/pkg/mod/github.com/go-chi/chi@v4.1.2+incompatible/middleware/logger.go:46
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/go-chi/chi/middleware.Heartbeat.func1.1
rekor-server_1         |        /opt/app-root/pkg/mod/github.com/go-chi/chi@v4.1.2+incompatible/middleware/heartbeat.go:21
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/sigstore/rekor/pkg/generated/restapi.serveStaticContent.func1
rekor-server_1         |        /opt/app-root/src/pkg/generated/restapi/configure_rekor_server.go:360
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/rs/cors.(*Cors).Handler.func1
rekor-server_1         |        /opt/app-root/pkg/mod/github.com/rs/cors@v1.8.3/cors.go:236
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/sigstore/rekor/pkg/generated/restapi.wrapMetrics.func1
rekor-server_1         |        /opt/app-root/src/pkg/generated/restapi/configure_rekor_server.go:330
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/sigstore/rekor/pkg/generated/restapi.setupGlobalMiddleware.func1
rekor-server_1         |        /opt/app-root/src/pkg/generated/restapi/configure_rekor_server.go:271
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | github.com/go-chi/chi/middleware.RequestID.func1
rekor-server_1         |        /opt/app-root/pkg/mod/github.com/go-chi/chi@v4.1.2+incompatible/middleware/request_id.go:76
rekor-server_1         | net/http.HandlerFunc.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2109
rekor-server_1         | net/http.serverHandler.ServeHTTP
rekor-server_1         |        /usr/local/go/src/net/http/server.go:2947
rekor-server_1         | net/http.(*conn).serve
rekor-server_1         |        /usr/local/go/src/net/http/server.go:1991

Version

main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport_candidate bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant