# Add app events \(\#3372\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f33c0e80a6105a1cc83180774f46f17fcabef505)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f33c0e80a6105a1cc83180774f46f17fcabef505

Requested commit: f33c0e80a6105a1cc83180774f46f17fcabef505

Commit: f33c0e80a6105a1cc83180774f46f17fcabef505

Tree: 1e7bf34ff9c988a61e22883cbb291f4040a904af

Author: Joseph T\. Lyons

Committer: GitHub

## Message

```
Add app events (#3372)

Adds app events (`first open` and `open`). For the time being, I'm
abandonding trying to add `close`, after running into many issues
trying. The code is in place for me to continue on that work, but at the
moment, we require having the telemetry settings in hand when calling
any of the methods that log an event, so we can honor the user's
preference for sending telemetry or not, but when running the
`on_app_close` method, to send off an app `close` event, the settings
are no longer available (probably the order of teardown?), which causes
some tests to end up failing. I'm not sure how to solve this. Maybe we
keep the settings on the telemetry struct and update it each time any
event is logged, then, on app shutdown, when logging the app `close`
event, we can use the stored version (idk).

Release Notes:

- N/A
```

## Parents

- [88af458f629f1ecc90ad7360e05e1a1c4ed09c9d](https://git.cafe/gitcafe/zed/commit/88af458f629f1ecc90ad7360e05e1a1c4ed09c9d?format=markdown)

- [35f35dd47646edfef37f432dd971be34f6d02288](https://git.cafe/gitcafe/zed/commit/35f35dd47646edfef37f432dd971be34f6d02288?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f33c0e80a6105a1cc83180774f46f17fcabef505?format=markdown)
