This repository was archived by the owner on Sep 30, 2024. It is now read-only.
fix/telemetry(auth): return authenticated context from session.SetActorFromUser#62701
Merged
Conversation
bobheadxi
commented
May 15, 2024
| FeatureExample eventFeature = "exampleFeature" | ||
|
|
||
| // FeatureSignIn, FeatureSignOut, and FeatureSignUp are added here as telemetry | ||
| // examples - most callsites can directly provide the relevant feature. | ||
| FeatureSignIn eventFeature = "signIn" | ||
| FeatureSignOut eventFeature = "signOut" | ||
| FeatureSignUp eventFeature = "signUp" | ||
| ) |
Member
Author
There was a problem hiding this comment.
This was back before I realised it was kind of dumb to define event features all in one place, we now define features directly at callsite. This should be a no-op change.
akalia25
approved these changes
May 15, 2024
akalia25
left a comment
Contributor
There was a problem hiding this comment.
Thank you for the quick fix!
21a6020 to
32cf76f
Compare
eseliger
approved these changes
May 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change fixes telemetry for various sign-in, sign-up telemetry events -
session.SetActorFromUseraccepts a context and returns a new one, but never does anything to the returned context. It makes sense for this to authenticate the context because it is only ever used on a success case, and in turn this fixes telemetry by providing the telemetry SDK an actor to extract a user ID for.For the events affected by
session.SetActorFromUserI've incremented the event version to2.Test plan
session.SetActorFromUserto verify context is authenticated