-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(explorer): change transactions ranking #102966
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,7 @@ def get_transactions_for_project( | |
| project_id: int, limit: int = 500, start_time_delta: dict[str, int] | None = None | ||
| ) -> list[Transaction]: | ||
| """ | ||
| Get a list of transactions for a project using EAP, sorted by volume/traffic. | ||
| Get a list of transactions for a project using EAP, sorted by total time spent. | ||
|
|
||
| Args: | ||
| project_id: The ID of the project to fetch transactions for | ||
|
|
@@ -75,15 +75,15 @@ def get_transactions_for_project( | |
| auto_fields=True, | ||
| ) | ||
|
|
||
| # Query EAP for transactions with volume metrics | ||
| # Query EAP for most important transactions (highest total time spent) | ||
| result = Spans.run_table_query( | ||
| params=snuba_params, | ||
| query_string=f"is_transaction:true project.id:{project_id}", | ||
| query_string="is_transaction:true", | ||
| selected_columns=[ | ||
| "transaction", | ||
| "count()", | ||
| "sum(span.duration)", | ||
| ], | ||
| orderby=["-count()"], # Sort by count descending (highest volume first) | ||
| orderby=["-sum(span.duration)"], | ||
| offset=0, | ||
| limit=limit, | ||
|
Comment on lines
79
to
88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: 🔍 Detailed AnalysisThe 💡 Suggested FixModify the 🤖 Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i believe this is wrong because the snuba params has the project filter |
||
| referrer=Referrer.SEER_RPC, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.