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

Add link to download ES profiler data #34497

Merged
merged 3 commits into from
Apr 24, 2024
Merged

Add link to download ES profiler data #34497

merged 3 commits into from
Apr 24, 2024

Conversation

esoergel
Copy link
Contributor

@esoergel esoergel commented Apr 24, 2024

Product Description

This builds off the case search profiler util introduced in #34373

It does a few things:

  • Numbers ES queries so you can cross reference between the timing data and the query details
  • Adds query duration in-line with query details
  • Adds a link to download the profiler output for each query

This screenshot shows all of that:
image

Technical Summary

Feature Flag

Safety Assurance

All of the functionality changes except the _query_number counter are gated behind a debug_mode flag, and so should only affect usages of this utility, not general case search

Safety story

Automated test coverage

QA Plan

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@esoergel esoergel added the product/invisible Change has no end-user visible impact label Apr 24, 2024
@esoergel esoergel requested review from calellowitz and gherceg April 24, 2024 16:56
@esoergel esoergel marked this pull request as ready for review April 24, 2024 16:56
Copy link
Contributor

@orangejenny orangejenny left a comment

Choose a reason for hiding this comment

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

Left an optional styling suggestion.

io = BytesIO()
io.write(json.dumps(profile_json).encode('utf-8'))
io.seek(0)
return get_download_url(io, name, content_type='application/json')
Copy link
Contributor

Choose a reason for hiding this comment

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

These files will get deleted after 24 hours, based on timeout in get_download_url, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's right

…rch.html

Co-authored-by: Jenny Schweers <jschweers@dimagi.com>
@esoergel esoergel merged commit b23df94 into master Apr 24, 2024
13 checks passed
@esoergel esoergel deleted the es/profiler-data branch April 24, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/invisible Change has no end-user visible impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants