-
Notifications
You must be signed in to change notification settings - Fork 535
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
Include service URL and request method in r11s request errors #22851
Include service URL and request method in r11s request errors #22851
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Coverage Summary
↓ packages.drivers.driver-base.src:
Line Coverage Change: -0.37% Branch Coverage Change: 0.11%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 85.95% | 86.06% | ↑ 0.11% |
Line Coverage | 81.79% | 81.42% | ↓ -0.37% |
↑ packages.drivers.routerlicious-driver.src:
Line Coverage Change: 0.22% Branch Coverage Change: 2.13%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 74.66% | 76.79% | ↑ 2.13% |
Line Coverage | 54.33% | 54.55% | ↑ 0.22% |
Baseline commit: 199b9d0
Baseline build: 302875
Happy Coding!!
Code coverage comparison check passed!!
⯅ @fluid-example/bundle-size-tests: +910 Bytes
Baseline commit: 199b9d0 |
if (path !== undefined) { | ||
// Extract the first portion of the path and explicitly match it to known path names | ||
const pathMatch = path.match(/^\/?([^/]+)/); | ||
if (pathMatch && [socketIoPath, "repos", "deltas", "documents"].includes(pathMatch[1])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because there are multiple urls that start with the same path segment (i.e. "documents", "repos") and have the same HTTP method we might need some additional information logged to be able to differentiate between those (i.e. total segment length, etc.). @manishgargd to comment if that is really necessary for this task.
I assume the response status code and method are already being logged, correct ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We can add more portions of the URL path on r11s request errors. To protect against logging IDs in the URL, any path portion that does not explicitly match the list of known paths will be replaced with `REDACTED`. Continuation of #22851 Fixes [AB#22156](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/22156)
Troubleshooting live-site issues and customer reported issues will become easier. Ex: If Container creation failures have service URL and response code, it'll be easier to identify point of failure and come-up with a fix to mitigate/fix the incident.
This gives AFR a good idea about the APIs which are failing, which cluster it was going to, and which cluster group it was going to. It helps AFR correlate the errors on the server better.
Examples
Here are some examples of request calls. Only the bolded parts can be logged, and the first line of each entry below is just the type of request being made (no need to log it):
CreateDocument (or CreateContainer)
POST https://us.fluidrelay.azure.com/documents/someId
Connect
GET https://alfred.southcentralus-1.fluidrelay.azure.com/socket.io/?documentId=someId&tenantId=someId&EIO=4&transport=websocket
GetDelta
GET https://alfred.southcentralus-1.fluidrelay.azure.com/deltas/someId/someId?from=0&to=2001
GetSummary
GET https://historian.southcentralus-1.fluidrelay.azure.com/repos/someId/git/summaries/latest?token=someToken&disableCache=true
PostSummary
POST https://historian.southcentralus-1.fluidrelay.azure.com/repos/someId/git/summaries?token=someToken
FindSession – First Request
POST https://alfred.southcentralus-1.fluidrelay.azure.com/documents/someId/session/someId
Fixes AB#18452