Skip to content

chore(slos): add slos for refresher #93483

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

Merged
merged 1 commit into from
Jun 13, 2025
Merged

Conversation

Christinarlong
Copy link
Contributor

@Christinarlong Christinarlong commented Jun 12, 2025

Adds SLOs for token refresh process 👀

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 12, 2025
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 97.77778% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/sentry_apps/token_exchange/refresher.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #93483       +/-   ##
===========================================
+ Coverage   41.28%   88.03%   +46.74%     
===========================================
  Files       10264    10294       +30     
  Lines      592759   593863     +1104     
  Branches    23044    23044               
===========================================
+ Hits       244748   522803   +278055     
+ Misses     347562    70611   -276951     
  Partials      449      449               

@Christinarlong Christinarlong marked this pull request as ready for review June 13, 2025 16:17
@Christinarlong Christinarlong requested review from a team as code owners June 13, 2025 16:17
with SentryAppInteractionEvent(
operation_type=SentryAppInteractionType.AUTHORIZATIONS,
event_type=SentryAppEventType.REFRESHER,
).capture() as lifecycle:
context = {
"installation_uuid": self.install.uuid,
"client_id": self.application.client_id[:SENSITIVE_CHARACTER_LIMIT],
Copy link
Member

Choose a reason for hiding this comment

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

why is this sensitive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

'cause it's the client id. I feel like both the client id + secret would fall under the sensitive umbrella(?) 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Client ID is not considered sensitive in the same sense as the client secret, but I'm fine with obscuring it personally. The installation UUID gives us enough logging context to trace things correctly I think and we can always change this if our logging is insufficient.

with SentryAppInteractionEvent(
operation_type=SentryAppInteractionType.AUTHORIZATIONS,
event_type=SentryAppEventType.REFRESHER,
).capture() as lifecycle:
context = {
"installation_uuid": self.install.uuid,
"client_id": self.application.client_id[:SENSITIVE_CHARACTER_LIMIT],
Copy link
Member

Choose a reason for hiding this comment

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

Client ID is not considered sensitive in the same sense as the client secret, but I'm fine with obscuring it personally. The installation UUID gives us enough logging context to trace things correctly I think and we can always change this if our logging is insufficient.

@Christinarlong Christinarlong merged commit 5aebfd3 into master Jun 13, 2025
63 checks passed
@Christinarlong Christinarlong deleted the crl/refresher-slos branch June 13, 2025 19:08
billyvg pushed a commit that referenced this pull request Jun 18, 2025
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.

3 participants