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

add validator url / network tracking in analytics #343

Merged
merged 6 commits into from
May 10, 2024

Conversation

aforaleka
Copy link
Contributor

@aforaleka aforaleka commented May 8, 2024

image

@aforaleka aforaleka force-pushed the validator-url-in-order-events branch 3 times, most recently from d446660 to e6f1313 Compare May 8, 2024 19:35
@aforaleka aforaleka force-pushed the validator-url-in-order-events branch from 99339db to 366f438 Compare May 9, 2024 21:58
@aforaleka aforaleka force-pushed the validator-url-in-order-events branch from 366f438 to 1eefcde Compare May 10, 2024 00:00
@aforaleka aforaleka changed the title add validator url in analytics tracking add validator url / network tracking in analytics May 10, 2024
@aforaleka aforaleka force-pushed the validator-url-in-order-events branch 2 times, most recently from 5ec5436 to 7151ce6 Compare May 10, 2024 00:47
@aforaleka aforaleka force-pushed the validator-url-in-order-events branch from 7151ce6 to f27e800 Compare May 10, 2024 00:52
val interval = if (indexerTime != null) {
(
Clock.System.now().toEpochMilliseconds()
.toDouble() - indexerTime
Copy link
Contributor

@prashanDYDX prashanDYDX May 10, 2024

Choose a reason for hiding this comment

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

Why are we using Doubles for epoch milliseconds? Shouldn't we just keep them as Longs to avoid loss of precision?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

errr not sure if there's reason behind it -- can switch to Long here during the subtraction but maybe need to keep them as Doubles when sending to amplitude for consistency?

val requiredParams = apiStateParams()
val mergedParams = params?.let { ParsingHelper.merge(params.filterNotNull(), requiredParams) } ?: requiredParams
val paramsAsString = this.jsonEncoder.encode(mergedParams)
this.ioImplementations.threading?.async(ThreadingType.main) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we running this on main thread?

Copy link
Contributor Author

@aforaleka aforaleka May 10, 2024

Choose a reason for hiding this comment

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

@johnqh can u provide context T_T? i dont think web actually does anything different

@aforaleka aforaleka force-pushed the validator-url-in-order-events branch from de5de5e to ab3a5a5 Compare May 10, 2024 17:44
@aforaleka aforaleka merged commit 8f8ac34 into main May 10, 2024
3 checks passed
@aforaleka aforaleka deleted the validator-url-in-order-events branch May 10, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants