Skip to content

feat: add stats logging - #1204

Merged
czgu merged 2 commits into
pinterest:masterfrom
jczhong84:feat/statslogger
Mar 31, 2023
Merged

czgu merged 2 commits into
pinterest:masterfrom
jczhong84:feat/statslogger

Conversation

@jczhong84

Copy link
Copy Markdown
Collaborator

Adding stats logging support.

Metrics:

  • Number of active users
  • Number of API requests
  • Latency of API requests
  • Number of websocket connections
  • Number of sql session failures
  • Number of scheduled system task failures
  • Number of scheduled datadoc failures
  • Latency of Redis operations
  • Number of query executions

@jczhong84
jczhong84 requested a review from czgu March 25, 2023 01:05
Comment thread querybook/server/app/auth/__init__.py Outdated
Comment thread querybook/server/app/auth/__init__.py Outdated
@functools.wraps(fn)
def handler(**kwargs):
# increment the number of api request counter
stats_logger.incr(API_REQUEST_COUNTER.format(fn.__name__))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use the url here? it is generic right

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url is something like /query_execution/<int:query_execution_id>/, which will include the parameter types.

Comment thread querybook/server/datasources_socketio/helper.py Outdated
Comment thread querybook/server/tasks/all_tasks.py
@jczhong84
jczhong84 requested a review from czgu March 28, 2023 05:06
@czgu
czgu merged commit 354b08d into pinterest:master Mar 31, 2023
@jczhong84
jczhong84 deleted the feat/statslogger branch April 7, 2023 00:40
rohan-sh1 pushed a commit to CAI-TECHNOLOGIES/cai-ext-db-explorer that referenced this pull request Apr 11, 2023
* feat: add stats logging

* comments
aidenprice pushed a commit to arrowtail-precision/querybook that referenced this pull request Jan 3, 2024
* feat: add stats logging

* comments
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.

2 participants