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

Support new user analytics events in the Monitor Tab #943

Merged

Conversation

VladislavBryukhanov
Copy link
Contributor

@VladislavBryukhanov VladislavBryukhanov commented May 5, 2022

Which problem is this PR solving?

Resolves #942

Short description of the changes

Added new tracking events to SPM tracing functionality

@@ -0,0 +1,34 @@
// Copyright (c) 2017 The Jaeger Authors.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Copyright (c) 2017 The Jaeger Authors.
// Copyright (c) 2022 The Jaeger Authors.

Copy link
Contributor Author

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';
Copy link
Member

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';
Copy link
Member

Choose a reason for hiding this comment

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

Same - search operation where?

Copy link
Contributor Author

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(
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

refactored

@yurishkuro yurishkuro changed the title Jaegertracing/track spm events Support new user analytics events in the Monitor Tab May 10, 2022
@@ -68,6 +75,8 @@ type TDispatchProps = {
fetchAllServiceMetrics: (serviceName: string, query: MetricsAPIQueryParams) => void;
};

const trackSearchOperationDebounced = _debounce(searchQuery => trackSearchOperation(searchQuery), 1000);
Copy link
Member

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?

Copy link
Contributor Author

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"

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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?

@yurishkuro
Copy link
Member

lgtm overall. Please make sure all commits are signed (often easier to squash them and resubmit as one).

@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #943 (1c6f9ac) into main (c15ab14) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

@@            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              
Impacted Files Coverage Δ
...rc/components/Monitor/ServicesView/index.track.tsx 100.00% <100.00%> (ø)
...r-ui/src/components/Monitor/ServicesView/index.tsx 97.24% <100.00%> (+0.16%) ⬆️
...ServicesView/operationDetailsTable/index.track.tsx 100.00% <100.00%> (ø)
...nitor/ServicesView/operationDetailsTable/index.tsx 100.00% <100.00%> (ø)
...mponents/TracePage/TraceStatistics/tableValues.tsx 95.51% <0.00%> (-3.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c15ab14...1c6f9ac. Read the comment docs.

@VladislavBryukhanov VladislavBryukhanov marked this pull request as ready for review May 18, 2022 13:26
@pavolloffay
Copy link
Member

Is there any screenshot or mockup for this feature?

@yurishkuro
Copy link
Member

yurishkuro commented May 19, 2022

@pavolloffay it's an internal observability, aka user tracking

@nofar9792
Copy link
Contributor

@yurishkuro can we merge it or do we need to fix something before?

@yurishkuro
Copy link
Member

we need DCO check (signed commits) to pass before I can merge.

VladislavBryukhanov and others added 11 commits May 26, 2022 11:09
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>
@VladislavBryukhanov
Copy link
Contributor Author

DCO issue resolved @yurishkuro

@yurishkuro yurishkuro merged commit e55b3a6 into jaegertracing:main May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monitor Tab - Support new user analytics events in Jaeger
5 participants