Skip to content

feat: log start of each request#879

Closed
brprice wants to merge 1 commit intomainfrom
brprice/log-req-start
Closed

feat: log start of each request#879
brprice wants to merge 1 commit intomainfrom
brprice/log-req-start

Conversation

@brprice
Copy link
Copy Markdown
Contributor

@brprice brprice commented Feb 21, 2023

We now emit RequestStart log lines, to aid in extracting test/benchmark cases.

When looking at the generated logs, note that:

  • log messages from multiple simultaneous interactions may be interleaved
  • we log some internal high-level requests, so one API request can generate many log lines.
  • each group is preceeded by a RequestStart line -- this shows where a new request was started, and the following messages will be various stages of handling it.
  • we will have at most one Edit per request, but it will probably be after some ApplyAction* and GetProgram lines, which correspond to the actual API request made by your frontend and an internal implemetation detail.
  • technically, there is no guarantee that the RequestStart line is actually consecutive with its generated logs, but it is normally the case for a single-user session.

This was split out of #863, as it no longer makes sense as part of that PR. I am opening this PR mostly to save the code in case anyone thinks it will be useful -- I have no particular desire to merge it at the current time.

We now emit `RequestStart` log lines, to aid in extracting
test/benchmark cases.

When looking at the generated logs, note that:
- log messages from multiple simultaneous interactions may be interleaved
- we log some internal high-level requests, so one API request can
  generate many log lines.
- each group is preceeded by a `RequestStart` line -- this shows where a
  new request was started, and the following messages will be various
  stages of handling it.
- we will have at most one `Edit` per request, but it will probably be
  after some `ApplyAction*` and `GetProgram` lines, which correspond to
  the actual API request made by your frontend and an internal
  implemetation detail.
- technically, there is no guarantee that the `RequestStart` line is
  actually consecutive with its generated logs, but it is normally the
  case for a single-user session.
@brprice
Copy link
Copy Markdown
Contributor Author

brprice commented Mar 2, 2023

Closing as it became cb510ba, part of #837

@brprice brprice closed this Mar 2, 2023
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