Add event logging#1092
Merged
wfchandler merged 2 commits intomainfrom May 8, 2025
Merged
Conversation
when debug logging is enabled. Adding debug logging for all requests
will enable users to troubleshoot issues on any API endpoint.
To do this, we use the newly added exec hook feature in Progenitor to
capture the details of the API call.
In addition to the log event, we also create a `Span`. This is ignored
by the CLI, but may be useful for other consumers of the SDK that want
to integrate it with their monitoring infrastructure.
An example event:
{
"timestamp": "2025-05-07T19:51:02.464942Z",
"level": "DEBUG",
"message": "request succeeded",
"url": "https://oxide.sys.r3.oxide-preview.com/v1/instances?project=will",
"path": "/v1/instances",
"operation_id": "instance_list",
"remote_addr": "45.154.216.35:443",
"http.request.method": "GET",
"http.response.content_length": 2377,
"http.response.status_code": 200,
"start_time": "2025-05-07T19:51:02.079228Z",
"duration_ms": 385,
"oxide.request_id": "1ff7d872-3a14-4604-8392-1e9d6e2ba8fd",
"target": "oxide"
}
Closes #1014
Collaborator
Author
|
Sanity check |
ahl
approved these changes
May 7, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when debug logging is enabled. Adding debug logging for all requests will enable users to troubleshoot issues on any API endpoint.
To do this, we use the newly added exec hook feature in Progenitor to capture the details of the API call.
In addition to the log event, we also create a
Span. This is ignored by the CLI, but may be useful for other consumers of the SDK that want to integrate it with their monitoring infrastructure.An example event:
{
"timestamp": "2025-05-07T19:51:02.464942Z",
"level": "DEBUG",
"message": "request succeeded",
"url": "https://oxide.sys.r3.oxide-preview.com/v1/instances?project=will",
"path": "/v1/instances",
"operation_id": "instance_list",
"remote_addr": "45.154.216.35:443",
"http.request.method": "GET",
"http.response.content_length": 2377,
"http.response.status_code": 200,
"start_time": "2025-05-07T19:51:02.079228Z",
"duration_ms": 385,
"oxide.request_id": "1ff7d872-3a14-4604-8392-1e9d6e2ba8fd",
"target": "oxide"
}
Closes #1014