-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support new user analytics events in the Monitor Tab (#943)
* Added new SPM tracing events tracking Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com> * Added tests for new SPM events Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com> * reworked tracking categories & actions names Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com> * fixed license block dates; moved debounce from tracking module to component Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com> * Fix monitor tab crashing (#946) Signed-off-by: nofar9792 <nofar.cohen@logz.io> Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com> * Add repository to package.json (#949) Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com> * Preparing release v1.23.0 (#947) * 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> * Bump github/codeql-action from 1 to 2 (#938) 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> * Clarify development setup For #952 Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com> * Use red on scatterplot for traces if any spans have an error=true tag (#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> * Updated sorting events tracking Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com> Co-authored-by: nofar9792 <nofar.cohen@logz.io> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Co-authored-by: Pavol Loffay <p.loffay@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ed Snible <esnible@acm.org>
- Loading branch information
1 parent
c15ab14
commit e55b3a6
Showing
10 changed files
with
323 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
60 changes: 60 additions & 0 deletions
60
packages/jaeger-ui/src/components/Monitor/ServicesView/index.track.test.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright (c) 2022 Uber Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import * as trackingUtils from '../../../utils/tracking'; | ||
import { | ||
CATEGORY_SEARCH_OPERATION, | ||
CATEGORY_SELECT_SERVICE, | ||
CATEGORY_SELECT_TIMEFRAME, | ||
CATEGORY_VIEW_ALL_TRACES, | ||
trackSelectService, | ||
trackSelectTimeframe, | ||
trackViewAllTraces, | ||
trackSearchOperation, | ||
} from './index.track'; | ||
|
||
describe('ServicesView tracking', () => { | ||
let trackEvent; | ||
|
||
beforeAll(() => { | ||
trackEvent = jest.spyOn(trackingUtils, 'trackEvent').mockImplementation(); | ||
}); | ||
|
||
beforeEach(() => { | ||
trackEvent.mockClear(); | ||
}); | ||
|
||
it('trackViewAllTraces calls trackEvent with the match category and show action', () => { | ||
trackViewAllTraces(); | ||
expect(trackEvent).toHaveBeenCalledWith(CATEGORY_VIEW_ALL_TRACES, expect.any(String)); | ||
}); | ||
|
||
it('trackSelectService calls trackEvent with the match category and show action', () => { | ||
const serviceName = 'service-name'; | ||
trackSelectService(serviceName); | ||
expect(trackEvent).toHaveBeenCalledWith(CATEGORY_SELECT_SERVICE, serviceName); | ||
}); | ||
|
||
it('trackSelectTimeframe calls trackEvent with the match category and show action', () => { | ||
const timeframe = 'some-timeframe'; | ||
trackSelectTimeframe(timeframe); | ||
expect(trackEvent).toHaveBeenCalledWith(CATEGORY_SELECT_TIMEFRAME, timeframe); | ||
}); | ||
|
||
it('trackSearchOperation calls trackEvent with the match category and show action', async () => { | ||
const searchQuery = 'name'; | ||
trackSearchOperation(searchQuery); | ||
expect(trackEvent).toHaveBeenCalledWith(CATEGORY_SEARCH_OPERATION, searchQuery); | ||
}); | ||
}); |
28 changes: 28 additions & 0 deletions
28
packages/jaeger-ui/src/components/Monitor/ServicesView/index.track.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) 2022 The Jaeger Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import { trackEvent } from '../../../utils/tracking'; | ||
|
||
const SPM_CATEGORY_BASE = 'jaeger/ux/trace/spm'; | ||
|
||
export const CATEGORY_VIEW_ALL_TRACES = `${SPM_CATEGORY_BASE}/view-all-traces`; | ||
export const CATEGORY_SELECT_SERVICE = `${SPM_CATEGORY_BASE}/select-service`; | ||
export const CATEGORY_SELECT_TIMEFRAME = `${SPM_CATEGORY_BASE}/select-timeframe`; | ||
export const CATEGORY_SEARCH_OPERATION = `${SPM_CATEGORY_BASE}/search-operation`; | ||
|
||
export const trackViewAllTraces = () => trackEvent(CATEGORY_VIEW_ALL_TRACES, 'click'); | ||
export const trackSelectService = (service: string) => trackEvent(CATEGORY_SELECT_SERVICE, service); | ||
export const trackSelectTimeframe = (timeframe: string) => trackEvent(CATEGORY_SELECT_TIMEFRAME, timeframe); | ||
export const trackSearchOperation = (searchQuery: string) => | ||
trackEvent(CATEGORY_SEARCH_OPERATION, searchQuery); |
This file contains 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
Oops, something went wrong.