Skip to content

Commit

Permalink
Add keystone telemetry inform command and update telemetry policy (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens authored Aug 20, 2024
1 parent a2e2c7a commit 19a734c
Show file tree
Hide file tree
Showing 10 changed files with 245 additions and 190 deletions.
5 changes: 5 additions & 0 deletions .changeset/add-telemetry-inform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@keystone-6/core": minor
---

Adds `keystone telemetry inform` command to show an informed consent notice
5 changes: 5 additions & 0 deletions .changeset/fix-telemetry-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@keystone-6/core": patch
---

Update https://keystonejs.com/docs/reference/telemetry to show that `database` type is collected as part of telemetry
25 changes: 14 additions & 11 deletions docs/content/docs/reference/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Keystone collects telemetry information in the form of two different types of da
We refer to these two different reports, as “device telemetry” and “project telemetry” respectively.

These reports are forwarded to [https://telemetry.keystonejs.com/](https://telemetry.keystonejs.com/), and are reported separately to minimize any correlation between them insofar as the timing and grouping of that data, that an otherwise combined report may have. We are collecting these two reports for different reasons, and thus have no need to associate them.
We differentiate and record the type and version of reports from the URL used by Keystone.

We additionally record a timestamp of the time that the report is received by the server at [https://telemetry.keystonejs.com](https://telemetry.keystonejs.com/).

Expand All @@ -78,9 +79,9 @@ A device telemetry report is formatted as JSON and currently looks like:

```json
{
"previous": "2022-11-23",
"lastSentDate": "2024-11-23",
"os": "darwin",
"node": "18"
"node": "20"
}
```

Expand All @@ -89,27 +90,29 @@ A device telemetry report is formatted as JSON and currently looks like:
The type of information contained within a project telemetry report is currently:

- The last date you used `keystone dev` for this project, and
- The resolved versions of any `@keystone-6` packages used by this project, and
- The resolved package versions of any `@keystone-6` packages used by this project, and
- The database type used by the project,
- The number of lists for this project, and
- The name and number of field types that you are using

A project telemetry report is formatted as JSON and currently looks like:

```json
{
"previous": "2022-11-23",
"versions": {
"@keystone-6/auth": "5.0.1",
"@keystone-6/core": "3.1.2",
"lastSentDate": "2024-11-23",
"packages": {
"@keystone-6/auth": "8.0.1",
"@keystone-6/core": "6.1.0",
"@keystone-6/document-renderer": "1.1.2",
"@keystone-6/fields-document": "5.0.2"
},
"database": "postgresql",
"lists": 3,
"fields": {
"unknown": 1,
"@keystone-6/text": 5,
"@keystone-6/image": 1,
"@keystone-6/file": 1
"@keystone-6/timestamp": 2,
"@keystone-6/checkbox": 1
}
}
```
Expand Down Expand Up @@ -185,8 +188,8 @@ If you wish to see how telemetry is currently configured for your device or proj

## What if I have a complaint or question

If you have any questions or concerns about the information that is gathered please contact us by logging a GitHub Issue [https://github.com/keystonejs/keystone](https://github.com/keystonejs/keystone).
If you have any questions or concerns about the information that is gathered please contact us by logging a GitHub Issue [https://github.com/keystonejs/keystone](https://github.com/keystonejs/keystone).

Alternatively please contact our Privacy Officer by email to [privacy@keystonejs.com](mailto:privacy@keystonejs.com), or by mail to Level 10, 191 Clarence Street, Sydney NSW 2000.
Alternatively please contact our Privacy Officer by email to [privacy@keystonejs.com](mailto:privacy@keystonejs.com), or by mail to Level 10, 191 Clarence Street, Sydney NSW 2000.

For further information about Keystone’s security policy please see [https://github.com/keystonejs/keystone/security/policy](https://github.com/keystonejs/keystone/security/policy)
2 changes: 1 addition & 1 deletion examples/custom-output-paths/keystone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default config({

// when working in a monorepo environment you may want to output the prisma client elsewhere
// you can use .db.prismaClientPath to configure where that is
prismaClientPath: 'node_modules/.myprisma/client',
prismaClientPath: 'node_modules/myprisma',
prismaSchemaPath: 'my-prisma.prisma',
},
lists,
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-output-paths/my-prisma.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ datasource sqlite {

generator client {
provider = "prisma-client-js"
output = "node_modules/.myprisma/client"
output = "node_modules/myprisma"
}

model Post {
Expand Down
20 changes: 10 additions & 10 deletions examples/custom-output-paths/my-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,22 @@ export type KeystoneAdminUISortDirection =
| 'DESC'

type ResolvedPostCreateInput = {
id?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['id']
title?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['title']
content?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['content']
publishDate?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['publishDate']
id?: import('./node_modules/myprisma').Prisma.PostCreateInput['id']
title?: import('./node_modules/myprisma').Prisma.PostCreateInput['title']
content?: import('./node_modules/myprisma').Prisma.PostCreateInput['content']
publishDate?: import('./node_modules/myprisma').Prisma.PostCreateInput['publishDate']
}
type ResolvedPostUpdateInput = {
id?: undefined
title?: import('./node_modules/.myprisma/client').Prisma.PostUpdateInput['title']
content?: import('./node_modules/.myprisma/client').Prisma.PostUpdateInput['content']
publishDate?: import('./node_modules/.myprisma/client').Prisma.PostUpdateInput['publishDate']
title?: import('./node_modules/myprisma').Prisma.PostUpdateInput['title']
content?: import('./node_modules/myprisma').Prisma.PostUpdateInput['content']
publishDate?: import('./node_modules/myprisma').Prisma.PostUpdateInput['publishDate']
}

export declare namespace Lists {
export type Post<Session = any> = import('@keystone-6/core').ListConfig<Lists.Post.TypeInfo<Session>>
namespace Post {
export type Item = import('./node_modules/.myprisma/client').Post
export type Item = import('./node_modules/myprisma').Post
export type TypeInfo<Session = any> = {
key: 'Post'
isSingleton: false
Expand Down Expand Up @@ -166,8 +166,8 @@ export type TypeInfo<Session = any> = {
lists: {
readonly Post: Lists.Post.TypeInfo<Session>
}
prisma: import('./node_modules/.myprisma/client').PrismaClient
prismaTypes: import('./node_modules/.myprisma/client').Prisma
prisma: import('./node_modules/myprisma').PrismaClient
prismaTypes: import('./node_modules/myprisma').Prisma
session: Session
}

Expand Down
Loading

0 comments on commit 19a734c

Please sign in to comment.