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

feat(perf-issues): Add CLI script for testing detector output #39727

Merged
merged 11 commits into from Oct 19, 2022

Conversation

gggritso
Copy link
Member

@gggritso gggritso commented Oct 5, 2022

Adds a CLI script for testing our detection. Very handy for testing detectors on user-supplied events in JSON format.

N.B.: This makes a small logical change! Instead of iterating through the spans one-by-one, and sending each one to each detector, it iterates through the detectors, and sending the detector spans one-by-one. Subtle change, doesn't change the output.

e.g.,

~/C/s/sentry (feat/add-cli-detector-tooling) sentry performance detect ~/Desktop/fc6ef7f890b84657a6c575c06ff9caef.json
{'fingerprint': '1-GroupType.PERFORMANCE_N_PLUS_ONE_DB_QUERIES-bac638c481f0d0ddb4773cf0dd80f656a0abfde1', 'op': 'db', 'desc': 'SELECT "product_details".* FROM "product_details" WHERE "product_details"."product_id" = $1 AND "product_details"."name" = $2 L.... etc

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 5, 2022
@gggritso gggritso marked this pull request as ready for review October 5, 2022 23:24
@gggritso gggritso requested a review from a team as a code owner October 5, 2022 23:24
Copy link
Contributor

@udameli udameli left a comment

Choose a reason for hiding this comment

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

cool idea!

@gggritso
Copy link
Member Author

@k-fish @mjq-sentry any concerns about this one before I merge it? I don't see how the change in span iteration order would cause any issues, but feeling a little paranoid about it

Copy link
Member

@k-fish k-fish left a comment

Choose a reason for hiding this comment

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

@gggritso nothing stands out to me, just reversing from nm to mn.

@gggritso gggritso merged commit eb93468 into master Oct 19, 2022
@gggritso gggritso deleted the feat/add-cli-detector-tooling branch October 19, 2022 14:08
@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants