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

fix(visibility): Return meta in span samples responses #88733

Merged

Conversation

gggritso
Copy link
Member

@gggritso gggritso commented Apr 3, 2025

Right now, /spans-samples doesn't return any meta, only "data". This PR runs the response through handle_results_with_meta and returns it, which includes the correct standard meta.

Closes DAIN-49: Return meta from span samples endpoint

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 3, 2025
@gggritso gggritso changed the title Georgegritsouk/dain 49 return meta from span samples endpoint fix(visibility): Return meta in span samples responses Apr 3, 2025
Base automatically changed from dominikbuszowiecki/dain-100-update-spans-sample-endpoint-to-query-eap to master April 3, 2025 20:32
@gggritso gggritso force-pushed the georgegritsouk/dain-49-return-meta-from-span-samples-endpoint branch from 6c7f8c5 to 348b1bb Compare April 3, 2025 20:36
@gggritso gggritso requested a review from wmak April 4, 2025 00:05
@gggritso gggritso marked this pull request as ready for review April 4, 2025 00:05
@gggritso gggritso requested a review from a team as a code owner April 4, 2025 00:05
Copy link
Member

@wmak wmak left a comment

Choose a reason for hiding this comment

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

small comment, lgtm otherwise

Comment on lines 187 to 189
transform_alias_to_input_format = (
request.GET.get("transformAliasToInputFormat") == "1" or use_rpc
)
Copy link
Member

Choose a reason for hiding this comment

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

Are we not able to just force this on always instead of needing the param

Copy link
Member Author

Choose a reason for hiding this comment

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

You tell me, honestly! I followed what the other endpoints do. For EAP, it's always on, for indexed spans, there's a parameter. I think that'll make it easier to coordinate switching over, but it's probably a small difference

Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer if we can move away from needing this parameter at all, if the frontend doesn't need it un-transformed lets just not use this? ie. does the frontend need the old format still?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤔 well, the meta isn't in use at all right now, so I guess I could just force it, yeah! I'll probably replacing all the frontend usages of this at the same time anyway. I'll get rid of it 👍🏻

@gggritso gggritso enabled auto-merge (squash) April 4, 2025 15:41
@gggritso gggritso merged commit 252138c into master Apr 4, 2025
49 checks passed
@gggritso gggritso deleted the georgegritsouk/dain-49-return-meta-from-span-samples-endpoint branch April 4, 2025 16:11
Copy link

sentry-io bot commented Apr 8, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ InvalidSearchQuery: Invalid value 200 for transaction.status condition. Accepted values are aborted, already_exists, cancelled, data_loss, deadline_exceeded, failed_precondition, internal_error, invalid_argument, not_found, ok, out_of_range, permission_denied, resource_exh... /api/0/organizations/{organization_id_or_slug}/... View Issue

Did you find this useful? React with a 👍 or 👎

andrewshie-sentry pushed a commit that referenced this pull request Apr 8, 2025
Right now, `/spans-samples` doesn't return any meta, only `"data"`. This
PR runs the response through `handle_results_with_meta` and returns it,
which includes the correct standard meta.

Closes [DAIN-49: Return `meta` from span samples
endpoint](https://linear.app/getsentry/issue/DAIN-49/return-meta-from-span-samples-endpoint)

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants