-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve logging for JWKS download failures.
Adds a span so that we can correlate log messages, adds debug output for the content of the file. Fixes #4448
- Loading branch information
bryn
committed
Jan 9, 2024
1 parent
2fb4c78
commit 74faa48
Showing
2 changed files
with
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### Improve logging for JWKS download failures. ([Issue #4448](https://github.com/apollographql/router/issues/4448)) | ||
|
||
To enable users to debug JWKS download and parse failures more easily, we've added more detailed logging to the router. The router now logs the following information when a JWKS download or parse fails: | ||
|
||
``` | ||
2024-01-09T12:32:20.174144Z ERROR fetch jwks{url=http://bad.jwks.com/,} could not create JSON Value from url content, enable debug logs to see content e=expected value at line 1 column 1 | ||
``` | ||
Enabling debug logs via `APOLLO_LOG=debug` or `--logs DEBUG` will show the full JWKS content being parsed: | ||
``` | ||
2024-01-09T12:32:20.153055Z DEBUG fetch jwks{url=http://bad.jwks.com/,} parsing JWKS data="invalid jwks" | ||
``` | ||
|
||
By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/4449 |
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