-
-
Notifications
You must be signed in to change notification settings - Fork 108
Add support for dimensions to metrics #1447
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4d2a8a1
feat: create flyway migration for metrics_events table for the new di…
surajkumar 71da3bf
feat: create new count method that accepts dimensions
surajkumar 1157a1d
fix: instant and serializedDimensions outside of the executor
surajkumar a5e1a0e
docs: update the docs on `count` so people understand what dimensions…
surajkumar af40204
feat: use dimensions on metrics that use a postfix in their name
surajkumar 3f2ef46
feat: create migration for the offending metrics to use dimensions
surajkumar 30fd2b0
chore: sonar linting
surajkumar 8a737ed
feat: update slash commands
surajkumar b0bba15
chore: sonar
surajkumar a857e92
feat: add user to slash command dimensions so that we know who's invo…
surajkumar 0297a04
feat: add user to /tag
surajkumar 044fac8
docs: update PP.md to include collection of user_name and dimensions …
surajkumar bf494c2
revert: help-category
surajkumar d951c7d
feat: use dimensions in EmojiTrackerListener
surajkumar 3e52e49
feat: add userId to dimensions for slash command and tag
surajkumar c0ea5c5
customEmoji
surajkumar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
41 changes: 41 additions & 0 deletions
41
application/src/main/resources/db/V17__Add_Metric_Dimensions.sql
This file contains hidden or 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,41 @@ | ||
| ALTER TABLE metric_events ADD COLUMN dimensions TEXT; | ||
tj-wazei marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| UPDATE metric_events | ||
| SET event = 'code_action', | ||
| dimensions = json_object('name', SUBSTR(event, LENGTH('code_action-') + 1)) | ||
| WHERE event LIKE 'code_action-%'; | ||
|
|
||
| UPDATE metric_events | ||
| SET event = 'autoprune_helper', | ||
| dimensions = json_object('role', SUBSTR(event, LENGTH('autoprune_helper-') + 1)) | ||
| WHERE event LIKE 'autoprune_helper-%'; | ||
|
|
||
| UPDATE metric_events | ||
| SET event = 'help-category', | ||
| dimensions = json_object('category', SUBSTR(event, LENGTH('help-category-') + 1)) | ||
| WHERE event LIKE 'help-category-%'; | ||
SquidXTV marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| UPDATE metric_events | ||
| SET event = 'tag', | ||
| dimensions = json_object('id', SUBSTR(event, LENGTH('tag-') + 1)) | ||
| WHERE event LIKE 'tag-%'; | ||
SquidXTV marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| UPDATE metric_events | ||
| SET event = 'top_helper', | ||
| dimensions = json_object('userId', CAST(SUBSTR(event, LENGTH('top_helper-') + 1) AS INTEGER)) | ||
| WHERE event LIKE 'top_helper-%'; | ||
|
|
||
| UPDATE metric_events | ||
| SET event = 'slash', | ||
| dimensions = json_object( | ||
| 'name', SUBSTR(event, LENGTH('slash-') + 1, INSTR(SUBSTR(event, LENGTH('slash-') + 1), '_') - 1), | ||
| 'subCommandName', SUBSTR(event, LENGTH('slash-') + 1 + INSTR(SUBSTR(event, LENGTH('slash-') + 1), '_')) | ||
| ) | ||
| WHERE event LIKE 'slash-%' | ||
| AND INSTR(SUBSTR(event, LENGTH('slash-') + 1), '_') > 0; | ||
SquidXTV marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| UPDATE metric_events | ||
| SET event = 'slash', | ||
| dimensions = json_object('name', SUBSTR(event, LENGTH('slash-') + 1)) | ||
| WHERE event LIKE 'slash-%' | ||
| AND INSTR(SUBSTR(event, LENGTH('slash-') + 1), '_') = 0; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.