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

implement a more flexible logging middleware #1416

Closed
wants to merge 1 commit into from

Conversation

vroldanbet
Copy link
Contributor

the community has signaled interest for more flexibility around configuring the logs emitted by SpiceDB, but it's limited to what the grpc logging middleware supports.

Implementing a new middleware isn't a lot of work, it gives the opportunity to find optimizations, and gives more flexibility on what kind of features SpiceDB should support.

This initial implementation tries to adhere as close as possible to the original middleware logs, but with a few changes:

  • request payloads can be omitted based on an exclusion list
  • response payloads can be omitted based on an exclusion list
  • entire methods can be omitted based on an exclusion list (e.g. do not log healthcheck)
  • time is reported as milliseconds instead of a duration. This makes it easy to craft queries in any log processor based on duration (e.g. which where the requests that took more than 25ms?)

@github-actions github-actions bot added the area/CLI Affects the command line label Jun 29, 2023
the community has signaled interest for more flexibility
around configuring the logs emitted by SpiceDB, but
it's limited to what the grpc logging middleware supports.

Implementing a new middleware isn't a lot of work, it gives
the opportunity to find optimizations, and gives more
flexibility on what kind of features SpiceDB should support.

This initial implementation tries to adhere as close as possible
to the original middleware logs, but with a few changes:
- request payloads can be omitted based on an exclusion list
- response payloads can be omitted based on an exclusion list
- entire methods can be omitted based on an exclusion list
  (e.g. do not log healthcheck)
- time is reported as milliseconds instead of a duration. This
  makes it easy to craft queries in any log processor based
  on duration (e.g. which where the requests that took more than 25ms?)
@vroldanbet vroldanbet force-pushed the flexible-request-logging branch from 787d8c8 to b4a7be3 Compare October 26, 2023 09:56
@josephschorr
Copy link
Member

Will reopen when rescheduled

@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants