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

[editor] Starting Point for Telemetry #864

Merged
merged 1 commit into from
Jan 14, 2024
Merged

[editor] Starting Point for Telemetry #864

merged 1 commit into from
Jan 14, 2024

Conversation

Ankush-lastmile
Copy link
Member

@Ankush-lastmile Ankush-lastmile commented Jan 10, 2024

[editor] Starting Point for Telemetry

rebased version of #804 onto main


Stack created with Sapling. Best reviewed with ReviewStack.

Copy link
Contributor

@rholinshead rholinshead left a comment

Choose a reason for hiding this comment

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

Accepting to unblock next PR

rebased version of #804 onto main
Ankush-lastmile added a commit that referenced this pull request Jan 14, 2024
[editor][client] Enable Telemetry based on User Config settings




This diff builds on top of @rholinshead's starting point for telemetry
diff. Most of that looked good to me so I didn't touch it beside
@rossdanlm 's .


- Building off of #869, if `allow_usage_data_sharing` is set to True,
initialize Datadog Browser logging with a session ID.
- Disabled telemetry in dev mode as per @rholinshead 's comment that the
hot reload spams the logs with something like "datadog logging already
initialized"
- Moved the initialization logic away from`index.tsx` into `editor.tsx`
so that it can be configurable.


## Testplan:

1. yarn build
2. run in "prod" mode
3. Edit AIconfig
4. Hit Save button -> validate datadog log sent

repeat with aiconfig.rc set with false logging

|<img width="963" alt="Screenshot 2024-01-12 at 7 24 33 PM"
src="https://github.com/lastmile-ai/aiconfig/assets/141073967/c2f979df-327e-40c4-9f06-034531437a65">
| <img width="1455" alt="Screenshot 2024-01-12 at 7 23 51 PM"
src="https://github.com/lastmile-ai/aiconfig/assets/141073967/edb022b5-4abd-4ddc-b9bb-97713d32e5dc">
|
| ------------- | ------------- |
|
<img width="604" alt="Screenshot 2024-01-12 at 7 26 35 PM"
src="https://github.com/lastmile-ai/aiconfig/assets/141073967/4a2e49a3-061e-404c-9681-13a15aca8e9c">
| -> No logs |




I tried taking a video but datadog doesn't immediately update with logs
which made the video too long to upload

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/899).
* __->__ #899
* #864
@Ankush-lastmile Ankush-lastmile merged commit 7d7be6d into main Jan 14, 2024
2 checks passed
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.

2 participants