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

Easy tracing links #847

Closed
adamchalmers opened this issue Aug 23, 2024 · 0 comments · Fixed by #853
Closed

Easy tracing links #847

adamchalmers opened this issue Aug 23, 2024 · 0 comments · Fixed by #853

Comments

@adamchalmers
Copy link
Contributor

adamchalmers commented Aug 23, 2024

Background

All our HTTP requests generate traces that can be viewed in Honeycomb. This helps us debug performance issues.

Current experience

I and presumably other engineers find it hard to use Honeycomb. The current system requires:

  • Search all honeycomb traces for the endpoint you're executing
  • Find the trace that looks like your request, by filtering for your user ID
  • Oh you'd better look up that user ID in the database

Better experience

I have a slow KCL model. So I run zoo kcl snapshot program.kcl --link-to-trace, and after the model is done, it prints out

Was this slow? Look up the trace at
https://honeycomb.io/kittycad/trace/whatever/48418ebd-baf6-4e01-a9c4-9b86f71a8a99

Implementation

  1. All api-deux endpoints should return the API Call ID in the HTTP response headers (X-Api-Call-Id).
  2. zoo's CLI accepts a new --show-trace flag, and then will read the API Call ID from HTTP response headers.
  3. CLI prints the following link, replacing xxxxx with the API Call ID.
https://ui.honeycomb.io/kittycad/environments/prod/datasets/api-deux?query=%7B%22time_range%22%3A7200%2C%22granularity%22%3A0%2C%22calculations%22%3A%5B%7B%22op%22%3A%22COUNT%22%7D%5D%2C%22filters%22%3A%5B%7B%22column%22%3A%22api_call.id%22%2C%22op%22%3A%22%3D%22%2C%22value%22%3A%22xxxxx%22%7D%5D%2C%22filter_combination%22%3A%22AND%22%2C%22limit%22%3A1000%7D
adamchalmers added a commit to KittyCAD/modeling-api that referenced this issue Aug 23, 2024
adamchalmers added a commit to KittyCAD/modeling-api that referenced this issue Aug 23, 2024
adamchalmers added a commit to KittyCAD/modeling-app that referenced this issue Aug 23, 2024
adamchalmers added a commit to KittyCAD/modeling-app that referenced this issue Aug 23, 2024
Part of KittyCAD/engine#2504:

The engine accepts this 'replay' flag now, so, accept it too and send it up to the engine.

Part of KittyCAD/cli#847

The engine sends 'session data' now (like the API Call ID). The CLI executes KCL using this executor, and would like to get the session data after execution.
adamchalmers added a commit that referenced this issue Aug 23, 2024
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 a pull request may close this issue.

1 participant