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

metrics(feedback): Track source emitted by SDK fxs #70810

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

aliu3ntry
Copy link
Member

@aliu3ntry aliu3ntry commented May 13, 2024

This is a useful property we're not tracking in metrics -- right now we assume all NEW_FEEDBACK_ENVELOPE's are from the widget, but they could be sent by the public api too.

Code refs:
source types
widget onSubmit
sendFeedback (api)

@aliu3ntry aliu3ntry requested a review from a team as a code owner May 13, 2024 20:57
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 13, 2024
@aliu3ntry
Copy link
Member Author

Unsure about naming - could be client_type, client_source_type..

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.92%. Comparing base (60c3965) to head (9b80f00).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #70810      +/-   ##
==========================================
+ Coverage   69.05%   77.92%   +8.86%     
==========================================
  Files        6573     6573              
  Lines      292834   292783      -51     
  Branches    50542    50531      -11     
==========================================
+ Hits       202220   228140   +25920     
+ Misses      83892    58395   -25497     
+ Partials     6722     6248     -474     
Files Coverage Δ
src/sentry/feedback/usecases/create_feedback.py 86.54% <ø> (ø)

... and 1429 files with indirect coverage changes

@getsantry getsantry bot added the Stale label Jun 4, 2024
@getsantry
Copy link
Contributor

getsantry bot commented Jun 4, 2024

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

tags={"referrer": source.value},
tags={
"referrer": source.value,
"client_source": event["contexts"]["feedback"].get("source"),
Copy link
Member

Choose a reason for hiding this comment

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

is event["contexts"]["feedback"].get("source") different from source.value?

Copy link
Member Author

@aliu3ntry aliu3ntry Jun 4, 2024

Choose a reason for hiding this comment

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

Yeah -- the feedback context is SDK-defined and passed from there. Think source is required, but using .get in case of typescript problems. This is either "widget" or "api" (see code refs in description)

The source variable is a FeedbackCreationSource enum, which is passed by Sentry backend when calling create_feedback_issue. So it's a bit of a naming conflict

Copy link
Member

Choose a reason for hiding this comment

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

ahhh gotcha, makes sense

@aliu3ntry aliu3ntry merged commit d2d5f88 into master Jun 4, 2024
49 checks passed
@aliu3ntry aliu3ntry deleted the aliu/feedback-metrics branch June 4, 2024 23:24
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 Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants