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

Create 'maproulette-request-id' for http requests #1088

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

ljdelight
Copy link
Contributor

@ljdelight ljdelight commented Nov 30, 2023

MapRoulette will log requests to an access log appender and include a generated maproulette-request-id log marker and include it in the response header for clients to debug future issues. Note that clients are responsible for providing the maproulette-request-id in issues.

This change also includes minor fixes to

Here's what the updated logger output looks like in intellij (logback-dev.xml) loading the /dashboard for a logged in user. The response header maproulette-request-id exists and it does match the logs
image

This is what it looks like on staging (logback.xml) loading the /dashboard for a logged in user. The response header maproulette-request-id does match the logs:
image

Not all log messages include the maproulette-request-id and will show an empty [] like so:

06:08:28.497 INFO  [b652b459-682a-4b29-b093-76f2a9aaa0e6][application-akka.actor.default-dispatcher-25][AccessLogger] - Request 'GET /api/v2/user/whoami' [org.maproulette.framework.controller.UserController.whoami] 1ms - Response 401
06:08:48.485 INFO  [][application-akka.actor.default-dispatcher-38][org.maproulette.jobs.SchedulerActor] - Scheduled Task 'Sending Immediate Notification Emails': Starting run
06:08:48.489 INFO  [][application-akka.actor.default-dispatcher-38][org.maproulette.jobs.SchedulerActor] - Scheduled Task 'Sending Immediate Notification Emails': Finished run. Time spent: 4ms

MapRoulette will log requests to an access log appender and include a
generated 'maproulette-request-id' to help identify buggy requests.

The requestId is added as a response header so that clients can include
the request id when creating issues for a particular request.
@ljdelight ljdelight force-pushed the ljdelight/maprouletteRequestId branch from 49962c8 to ade8905 Compare November 30, 2023 06:13
Copy link

sonarcloud bot commented Nov 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ljdelight ljdelight merged commit e60c9ce into main Nov 30, 2023
7 checks passed
@ljdelight ljdelight deleted the ljdelight/maprouletteRequestId branch November 30, 2023 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant