-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(tracking): add telemetry for frontend events #6129
feat(tracking): add telemetry for frontend events #6129
Conversation
response.getEntity().toString())); | ||
} | ||
} catch (Exception e) { | ||
throw new RuntimeException("Failed to verify credentials for user", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to verify credentials for user
is this the right error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it's not, updated!
throw new RuntimeException("Failed to verify credentials for user", e); | ||
} finally { | ||
try { | ||
httpClient.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to open & close this client each time we make a request? theres no re-usable client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored to use one client
|
||
@Nonnull | ||
JSONObject sanitizeEvent(@Nonnull final JsonNode event) { | ||
final JSONObject eventObj; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the sake of no confusion, would be good to call this unsanitizedEventObj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, renamed
953a4c1
to
24fedeb
Compare
24fedeb
to
9500ce3
Compare
try { | ||
bodyJson = mapper.readTree(jsonStr); | ||
} catch (JsonProcessingException e) { | ||
log.error(String.format("Failed to parse json while attempting to create native user %s", jsonStr)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this comment right?
Checklist