-
Notifications
You must be signed in to change notification settings - Fork 510
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
Support new user analytics events in the Monitor Tab #943
Support new user analytics events in the Monitor Tab #943
Conversation
@@ -0,0 +1,34 @@ | |||
// Copyright (c) 2017 The Jaeger Authors. |
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.
// Copyright (c) 2017 The Jaeger Authors. | |
// Copyright (c) 2022 The Jaeger Authors. |
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.
fixed
|
||
export const ACTION_SELECT_SERVICE = 'select-service'; | ||
export const ACTION_SELECT_TIMEFRAME = 'select-timeframe'; | ||
export const ACTION_VIEW_ALL_TRACES = 'view-all-traces'; |
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.
Please elaborate what this means (comments?) Is there an alternative to viewing "all" traces?
export const ACTION_SELECT_SERVICE = 'select-service'; | ||
export const ACTION_SELECT_TIMEFRAME = 'select-timeframe'; | ||
export const ACTION_VIEW_ALL_TRACES = 'view-all-traces'; | ||
export const ACTION_SEARCH_OPERATION = 'search-operation'; |
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.
Same - search operation where?
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.
I refactored the tracking methods usage and use category instead, is it clearer?
export const trackSelectTimeframe = (timeframe: string) => | ||
trackEvent(CATEGORY_SPM, ACTION_SELECT_TIMEFRAME, timeframe); | ||
|
||
export const trackSearchOperationDebounced = _debounce( |
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.
organizationally, it seems this should be just trackSearchOperation
, and the debouncing can be done by the caller.
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
341fa3a
to
cfb8eea
Compare
@@ -68,6 +75,8 @@ type TDispatchProps = { | |||
fetchAllServiceMetrics: (serviceName: string, query: MetricsAPIQueryParams) => void; | |||
}; | |||
|
|||
const trackSearchOperationDebounced = _debounce(searchQuery => trackSearchOperation(searchQuery), 1000); |
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.
Just curious, why is it necessary to introduce a delay here? Aren't events reported async in the background anyway?
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.
it is important to prevent dummy information reporting if user search for some specific name.
For example if the target name is "my-metrics" I attempt to track and send report only once with completed searching query, but without debounce there are 10 separate report requests with partial searching query will be send. The cause of this behaviour is that the onChange handler fires every time a new character is typed into the input, that's why these 10 reports are sent, without debounce:
"m"
"my"
"my-"
...
"my-metric"
"my-metrics"
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.
Are you saying a pending debounce gets canceled if another one is issued? That was not my understanding of the function.
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.
Also, even if suppress logging of partial names, are the partial queries still being sent to the backend? Having 1-1 between queries and logs seems reasonable.
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.
regarding 1-st point - yes, you are right
regarding 2-nd point - the search field filters data only locally on front-end and doesn't sent any requests to the backend
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.
So on point 1 - if debounce merely delays, won't you still end up with the same incremental logs?
lgtm overall. Please make sure all commits are signed (often easier to squash them and resubmit as one). |
Codecov Report
@@ Coverage Diff @@
## main #943 +/- ##
==========================================
- Coverage 95.49% 95.39% -0.11%
==========================================
Files 240 242 +2
Lines 7524 7552 +28
Branches 1887 1836 -51
==========================================
+ Hits 7185 7204 +19
- Misses 332 341 +9
Partials 7 7
Continue to review full report at Codecov.
|
Is there any screenshot or mockup for this feature? |
@pavolloffay it's an internal observability, aka user tracking |
@yurishkuro can we merge it or do we need to fix something before? |
we need DCO check (signed commits) to pass before I can merge. |
Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
…ponent Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
Signed-off-by: nofar9792 <nofar.cohen@logz.io> Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
* Preparing release v1.23.0 Signed-off-by: Pavol Loffay <p.loffay@gmail.com> * Fix Signed-off-by: Pavol Loffay <p.loffay@gmail.com> * Fix Signed-off-by: Pavol Loffay <p.loffay@gmail.com> * Fix Signed-off-by: Pavol Loffay <p.loffay@gmail.com> * Fix Signed-off-by: Pavol Loffay <p.loffay@gmail.com> Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
Bumps [github/codeql-action](/~https://github.com/github/codeql-action) from 1 to 2. - [Release notes](/~https://github.com/github/codeql-action/releases) - [Changelog](/~https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
For jaegertracing#952 Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
…jaegertracing#951) * Use red on scatterplot for traces if any spans have an error=true tag Signed-off-by: Ed Snible <snible@us.ibm.com> * Used 'yarn prettier' to appease 'yarn lint' Signed-off-by: Ed Snible <snible@us.ibm.com> Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
c3df2e9
to
e117396
Compare
DCO issue resolved @yurishkuro |
Which problem is this PR solving?
Resolves #942
Short description of the changes
Added new tracking events to SPM tracing functionality