Commit Graph
100 Commits
Author SHA1 Message Date
Joseph T. Lyons a9fce19048 Return a single Option from EventCoalescer 2024-01-11 12:27:59 -05:00
Joseph T. Lyons ac5f8254a2 Fix bug with improperly reported environment (#4020)
When logging the edit environment, we were logging the newest
environment being sent into the EventCoalescer on the latest activity
log, when we should've been logging the environment that was associated
with the ended period within the EventCoalescer.

Release Notes:

- N/A
2024-01-11 12:07:48 -05:00
Joseph T. Lyons 06ce1af530 Only return environment when period ends 2024-01-11 11:30:22 -05:00
Joseph T. Lyons f4c698ba27 Fix bug with improperly reported environment
When logging the edit environment, we were logging the newest environment being sent into the EventCoalescer on the latest activity log, when we should've been logging the environment that was associated with the ended period within the EventCoalescer.
2024-01-11 11:24:55 -05:00
Joseph T. Lyons 75cb409d2e Instrument edit events (#4006)
The goal of this PR is to send up events that contain the duration of
keyboard activity within Zed. I built the `EventCoalescer`, which gets
called called each time a key is pressed, within any environment (in the
case of this PR, within "editor" and "terminal). The" `EventCoalescer`
holds a start and end DateTime and adjusts the end instant as events
come in, until a timeout from the last event is hit.

I did my best to keep this mechanism efficient (avoiding vectors to
store moments in time, avoiding spawning timers threads, etc.), because
I know this is going to be per keystroke, but its behind a lock on the
telemetry struck, since it has to know when the environment changes, in
which point, it will automatically end the activity period, even if
there is no timeout. Because we have to have access to it from different
parts of the system, we have to go through the lock, which worried me a
bit (@mikayla-maki's intuition is that it should be fine).

As for the event, I take the time between the durations reported by the
event coalescer and send that up to zed - the indention is to
reconstruct the start and end times on zed.dev, in the same way we use
the event offset times and the time on zed.dev to get the official event
timestamp, and avoid the issue of the user having their system clocks
set wrong.

I'd really appreciate it if @nathansobo or @maxbrunsfeld could check
this out.

Release Notes:

- N/A
2024-01-11 08:19:29 -05:00
Joseph T. Lyons 0df4bfacc2 Increase debug mode queue size 2024-01-11 01:12:49 -05:00
Joseph T. Lyons 8a61d5059b Never send an an empty set of events 2024-01-11 01:12:30 -05:00
Joseph T. Lyons bddf827bc1 Add reminder for the future 2024-01-10 21:02:34 -05:00
Joseph T. Lyons b4444bdfc0 Rename field in telemetry struct 2024-01-10 17:41:02 -05:00
Joseph T. Lyons 9df29fb347 WIP 2024-01-10 17:04:26 -05:00
Joseph T. Lyons b26a468820 Merge branch 'main' into instrument-keyboard-events 2024-01-10 16:03:01 -05:00
Joseph T. Lyons d3d6b53a74 WIP 2024-01-10 02:05:42 -05:00
Joseph T. Lyons e5fbc532cc Instrument welcome screen events (#3930)
# TODO

- [x] Fix busted tests
- [x] Check all events from actions on welcome screen
    - [x] change theme
    - [x] change keymap
    - [x] install cli
    - [x] enable vim
    - [x] send metric data
    - [x] send diagnostics
    - [x] close welcome screen
- [X] Check all settings events
    - [x] record theme change (in main and in selector)
    - [x] record base keymap change (in main and in selector)
    - [x] record metric data value
    - [x] record diagnostics value
- [X] Triple check that telemetry settings still block events from being
sent, since we updated how we check for settings changes
- [X] Remove immediate flush mode and allow the flush method to be
called publicly
- [x] Remove references to clickhouse in the code (should be generic at
the client level)

Release Notes:

- N/A
2024-01-06 23:39:46 -05:00
Joseph T. Lyons 44bc5aef39 Improve setting name consistency for welcome page 2024-01-06 23:34:46 -05:00
Joseph T. Lyons 1bcee19ed5 Improve operation name consistency for welcome page 2024-01-06 23:30:53 -05:00
Joseph T. Lyons f4c78d3f40 Remove "clickhouse" from telemetry code
The client sends events to our end point, and the endpoint is what determines what analytics database is used to store the data. The client should be generic and not mention the name of the service being proxied to through our server.
2024-01-06 23:27:23 -05:00
Joseph T. Lyons 5344296c9a Remove immediate flush mode
Allow flush method to be called publicly. This is a better, simpler solution, that allows for better control over flushing.
2024-01-06 20:27:30 -05:00
Joseph T. Lyons 520c433af5 Fix tests 2024-01-06 16:10:40 -05:00
Joseph T. Lyons 800c9958a3 Clean up code 2024-01-06 15:31:16 -05:00
Joseph T. Lyons ea1770254d Merge branch 'main' into instrument-welcome-screen 2024-01-06 15:23:06 -05:00
Joseph T. Lyons 167a0b590f Add event for welcome page close 2024-01-06 15:17:28 -05:00
Joseph T. Lyons cdd5cb16ed WIP 2024-01-06 14:41:35 -05:00
Joseph T. Lyons 7cc006822b Bump nu tree sitter dependency (#3914)
My contact over at nushell told me they are finally getting some fixes
in on the tree sitter repo, as they have an enthusiastic user running
around opening PRs - figured it would be good to bump this again, since
it wasn't in a great place before.

https://github.com/nushell/tree-sitter-nu/commits/main/

Release Notes:

- Bumped `nu` tree sitter dependency
2024-01-05 12:03:43 -05:00
Joseph T. Lyons c57a556c4c Bump nu tree sitter dependency 2024-01-05 11:57:26 -05:00
Joseph T. Lyons 269b665618 Remove outdated TODO 2024-01-04 17:32:00 -05:00
Joseph T. Lyons a8efb41e56 Remove outdated TODOs 2024-01-04 17:28:07 -05:00
Joseph T. Lyons 1d98132eed Move telemetry settings check into telemetry module (#3877)
This is a small change I've been meaning to do to make it easier to call
the telemetry report event methods.

Release Notes:

- N/A
2024-01-04 01:21:28 -05:00
Joseph T. Lyons 2972ee8ced Move telemetry settings check into telemetry module 2024-01-04 01:13:21 -05:00
Joseph T. Lyons e94063be7f Rename notification_store (#3872)
Release Notes:

- N/A
2024-01-03 23:04:03 -05:00
Joseph T. Lyons b99e9d5f38 Merge branch 'main' into rename-notification-store 2024-01-03 22:59:43 -05:00
Joseph T. Lyons bea527d647 Update version in Cargo.lock 2024-01-03 22:56:33 -05:00
Joseph T. Lyons 570abe0590 Rename notification_store 2024-01-03 20:02:23 -05:00
Joseph T. Lyons 1bc2e0ee5c Remove zed2-related comment
This was the last result when searching for `zed2`
2024-01-03 20:00:58 -05:00
Joseph T. Lyons ad28ae5562 Merge branch 'main' of https://github.com/zed-industries/zed 2024-01-03 17:20:36 -05:00
Joseph T. Lyons 5944fcb999 collab 0.33.0 2024-01-03 17:20:01 -05:00
Joseph T. Lyons 9936b07472 Bump collab version back to what it was before 2024-01-03 17:19:39 -05:00
Joseph T. Lyons 5ab789e390 v0.120.x dev 2024-01-03 13:27:23 -05:00
Joseph T. Lyons 017b25e511 Add debounce time back to telemetry queue (#3856)
After talking with Max, we decided to bring back the debounce time to
the telemetry queue, only, with a longer duration than before.

Release Notes:

- N/A
2024-01-02 21:56:15 -05:00
Joseph T. Lyons 366d386dbb Add debounce time back to telemetry queue 2024-01-02 21:50:00 -05:00
Joseph T. Lyons 850a9e33e3 Add settings events (#3847)
Adds the infractucture for settings events and specifically tracks theme
settings. Currently, we only take note of the theme at app open and when
the user switches the theme with the theme selector. Changes at the
config file are ignored, as putting code that low leads to a lot of
chances of reporting theme events when the user hasn't done anything.
This change is done in both Zed 1 and Zed 2.

I'll open up a PR on zed.dev and adjust the database accordingly.

Release Notes:

- N/A
2024-01-02 17:19:21 -05:00
Joseph T. Lyons 3dd5641d2b Add settings events 2024-01-02 17:02:53 -05:00
Joseph T. Lyons 41fb29bc5a Tidy up main (#3812)
Release Notes:

- N/A
2023-12-25 07:45:39 -05:00
Joseph T. Lyons 12fe64b177 Fix more warnings 2023-12-25 07:02:19 -05:00
Joseph T. Lyons 8f3ea6ccb3 Remove silencing of warnings and fix warnings 2023-12-25 03:47:28 -05:00
Joseph T. Lyons ada1da48ca Remove already-implemented comment 2023-12-25 03:47:03 -05:00
Joseph T. Lyons 6c21683ed0 Wire up journal (#3811)
Release Notes:

- N/A
2023-12-25 03:42:19 -05:00
Joseph T. Lyons 88d05fd814 Wire up journal 2023-12-25 03:36:54 -05:00
Joseph T. Lyons 11d3526f10 Migrate from device_id to installation_id key (#3810)
This PR is just a quick house-cleaning PR that I've been meaning to do
for awhile. In the past, `installation_id` was called `device_id`. But
this name never reflected what it actually was - so we renamed it to
`installation_id`, but we kept the name as `device_id` in the
`kv_store`. I'm wanting to use the `device_id` key in the future, so to
keep things clearly labeled, I'm doing the key rename now.

Release Notes:

- N/A
2023-12-23 22:38:35 -05:00
Joseph T. Lyons 81ed861288 Migrate from device_id to installation_id key 2023-12-23 22:26:00 -05:00
Joseph T. Lyons bab3b231b8 Remove telemetry debounce time in zed 2 (#3809)
Remove the event send timer in Zed 2 telemetry in effort to continue
reducing the amount of stress the vercel endpoint receives. This allows
the queues to fill up entirely before sending them off. I'm leaving the
timer in for Zed 1 because we don't force the events queue to clear on
app close in Zed 1, so it feels best to leave it in there, as it might
catch some unsent events before closing.

Release Notes:

- N/A
2023-12-23 17:39:36 -05:00
Joseph T. Lyons 58c5720c32 Remove telemetry debounce time in zed 2 2023-12-23 17:25:04 -05:00
Joseph T. Lyons 7966bc32c0 Add open project event (#3803) 2023-12-22 21:08:30 -05:00
Joseph T. Lyons b1870af386 Add project open event
Give the caller of report_app_event() the choice of whether to immediately flush the queue or not.
2023-12-22 20:23:55 -05:00
Joseph T. Lyons 72b3a1dd9a Increase telemetry queue size (#3802)
It seems like we've fixed the clickhouse errors by switching to
`async_insert`, but we're still seeing a hiccup here and there on
vercel's socket. I slowed down the collection of cpu and memory events
earlier, and this PR will slow down how frequently we send events in
general, by increasing the queue size and the debounce time.

Release Notes:

- N/A
2023-12-22 19:58:53 -05:00
Joseph T. Lyons 1989094e6d Increase queue flush debounce time 2023-12-22 19:57:13 -05:00
Joseph T. Lyons 0746a10d9b Increase telemetry queue size 2023-12-22 19:56:06 -05:00
Joseph T. Lyons 169266b006 Slow down sampling metric collection rate (#3775)
Release Notes:

- N/A
2023-12-22 05:03:38 -05:00
Joseph T. Lyons 41ff37d56e Slow down sampling metric collection rate 2023-12-22 04:52:36 -05:00
Joseph T. Lyons b385373367 Bump tree-sitter-nu rev id (#3760) 2023-12-21 12:29:49 -05:00
Joseph T. Lyons 38a8aa2d04 Bump tree-sitter-nu rev id 2023-12-21 12:15:27 -05:00
Joseph T. Lyons 73b527ec8f Store email address on modal close 2023-12-21 09:04:54 -05:00
Joseph T. Lyons ca091f3d34 Fix layout issues with feedback modal (#3751)
Release Notes:

- N/A
2023-12-21 00:00:06 -05:00
Joseph T. Lyons 036636ee80 Fix layout issues with feedback modal
The feedback modal still needs a styling update
2023-12-20 23:54:50 -05:00
Joseph T. Lyons 4c0856e096 collab 0.32.0 2023-12-20 13:15:44 -05:00
Joseph T. Lyons 73b13b7dc6 v0.119.x dev 2023-12-20 13:00:01 -05:00
Joseph T. Lyons a623929340 Add backtrace hash to collab server panic api (#3692)
Release Notes:

- N/A
2023-12-18 11:21:41 -05:00
Joseph T. Lyons 7cd6825eee Add backtrace hash to collab server panic api 2023-12-18 11:12:23 -05:00
Joseph T. Lyons 02bcc7bbeb Add release channel to zed2 collab server 2023-12-18 11:09:54 -05:00
Joseph T. Lyons 4e7005b4f7 Use bitflags to hold error states 2023-12-14 17:22:13 -05:00
Joseph T. Lyons 8a361c93e2 Prep feedback code for testing 2023-12-14 13:22:41 -05:00
Joseph T. Lyons 837b4c3462 Avoid unnecessary match 2023-12-13 21:43:21 -05:00
Joseph T. Lyons d9adfdeac2 Highlight email address field as red when invalid 2023-12-13 21:39:31 -05:00
Joseph T. Lyons 435256ab0f Remove completed TODOs 2023-12-13 21:35:30 -05:00
Joseph T. Lyons 0db62f0ceb Feedback modal improvements (#3646)
- Cleans up modal state logic by using an enum over multiple booleans
- Simulates sending feedback in dev mode, so UI can be easily tested

Release Notes:

- N/A
2023-12-13 21:33:45 -05:00
Joseph T. Lyons 900a2bfb87 Use an enum to represent modal states and simplify logic 2023-12-13 21:20:09 -05:00
Joseph T. Lyons be2ad2ff86 Add Duration dependency 2023-12-13 21:19:36 -05:00
Joseph T. Lyons 052e05fc74 Use existing convention to silence warnings 2023-12-13 21:19:12 -05:00
Joseph T. Lyons 7ba7b925ff Simulate sending feedback in dev 2023-12-13 21:18:50 -05:00
Joseph T. Lyons 1ad1cc1148 Fix variable name 2023-12-13 17:31:51 -05:00
Joseph T. Lyons 985d4c7429 Remove TODO
Thanks @ConradIrwin
2023-12-13 17:09:26 -05:00
Joseph T. Lyons 48faa171b5 v0.118.x dev 2023-12-13 12:53:41 -08:00
Joseph T. Lyons 07a266d93f collab 0.31.0 2023-12-13 12:39:29 -05:00
Joseph T. Lyons 1055f59925 v0.118.x dev 2023-12-13 12:24:10 -05:00
Joseph T. Lyons 5f5b86ee24 Use release channel display name for feedback (#3615)
Release Notes:

-  N/A
2023-12-12 17:50:29 -05:00
Joseph T. Lyons a63b4c598c Use release channel display name for feedback 2023-12-12 17:29:37 -05:00
Joseph T. Lyons c9aa4a0e00 Fix placeholder text 2023-12-12 16:56:43 -05:00
Joseph T. Lyons 906505f4dc Fix rustfmt in feedback_modal.rs 2023-12-11 13:56:58 -05:00
Joseph T. Lyons 22e99033e1 Use copy button for copy channel link (#3589)
Release Notes:

- N/A
2023-12-11 13:22:36 -05:00
Joseph T. Lyons 9a36402fbe Use copy button for copy channel link 2023-12-11 13:14:29 -05:00
Joseph T. Lyons cd2abc7c1d Adjust nightly to build twice a day 2023-12-11 13:05:16 -05:00
Joseph T. Lyons ff45b43857 Add code for submission and error states for feedback modal (#3572)
Release Notes:

- N/A
2023-12-10 20:49:14 -05:00
Joseph T. Lyons 33c41fb5e1 Show negative numbers after limit is hit 2023-12-09 00:35:19 -05:00
Joseph T. Lyons 9abf5a1bf2 Add code for submission and error states 2023-12-08 19:16:03 -05:00
Joseph T. Lyons 60e4311294 Fix bug where feedback dismissal prompt is shown twice (#3568)
Release Notes:

- N/A
2023-12-08 17:25:48 -05:00
Joseph T. Lyons cbbcc3502a Fix bug where feedback dismissal prompt is shown twice 2023-12-08 17:21:14 -05:00
Joseph T. Lyons 1fecd3c327 Allow modals to override their dismissal (#3565)
Release Notes:

- N/A
2023-12-08 16:28:16 -05:00
Joseph T. Lyons 13dad89a85 Move all dismissal logic into dismiss_event 2023-12-08 16:14:45 -05:00
Joseph T. Lyons cd93ac1d2a Fix error 2023-12-08 15:34:42 -05:00
Joseph T. LyonsandMikayla Maki 113c7287df Allow modals to override their dismissal
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-12-08 15:29:44 -05:00
Joseph T. Lyons f4c93abad5 🚧 Feedback modal UI 🚧 (#3536)
[[PR Description]]

TODO: 
- [x] Add placeholder text to editor
- [x] Add external link icon to "Community repo" button
- [x] Show `not-allowed` cursor for disabled buttons
- [ ] Add `Headline` ui component
- [ ] Finish UI pass
- [ ] Fix `IconPosition` on button (should swap the icon side)
- [ ] Add conditional tooltip for disabled "Send feedback" button.
- [ ] Add common/top feedback link.
- [ ] Add `vw`/`vh` units to allow sizing the modal based on viewport
size.

Release Notes:

- N/A
2023-12-08 13:30:42 -05:00