-
Notifications
You must be signed in to change notification settings - Fork 2.8k
add anonymous telemetry #1401
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
add anonymous telemetry #1401
Conversation
-> HASURA_GRAPHQL_DISABLE_TELEMETRY env var for '--disable-telemetry' -> Template 'disableTelemetry' window env in console html template
Resolve Conflicts: cli/Gopkg.lock cli/Gopkg.toml docs/graphql/manual/deployment/graphql-engine-flags/reference.rst server/src-exec/Main.hs server/src-lib/Hasura/Server/App.hs server/src-lib/Hasura/Server/Init.hs server/src-rsr/console.html
…elemetry Resolve Conflicts: server/src-exec/Main.hs server/src-lib/Hasura/Server/App.hs server/src-lib/Hasura/Server/Init.hs
|
Review app for commit 82d037c deployed to Heroku: https://hge-ci-pull-1401.herokuapp.com |
|
Review app for commit 0910fc4 deployed to Heroku: https://hge-ci-pull-1401.herokuapp.com |
Resolve Conflicts: server/src-exec/Ops.hs server/src-rsr/hdb_metadata.yaml server/src-rsr/migrate_from_7_to_8.sql server/src-rsr/migrate_metadata_from_7_to_8.yaml
|
Review app for commit 6b169f9 deployed to Heroku: https://hge-ci-pull-1401.herokuapp.com |
server/src-exec/Main.hs
Outdated
| runTx ci $ do | ||
| dbId <- getDbId | ||
| fp <- liftIO generateFingerprint | ||
| return (dbId, fp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dbid <- runTx ci getDbId
fp <- liftIO generateFingerprint
return (dbId, fp)
server/src-lib/Hasura/Server/Init.hs
Outdated
| examples = | ||
| [ | ||
| [ "# Start GraphQL Engine on default port (8080) with console enabled" | ||
| [ "# Start GraphQL Engine on default port (8080) with console cnabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do these changes happen? @ecthiender
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server/src-lib/Hasura/Server/Init.hs
Outdated
| <> " --auth-hook https://mywebhook.com/post --auth-hook-mode POST" | ||
| ] | ||
| , [ "# Start GraphQL Engine with telemetry disabled" | ||
| , "graphql-engine --database-url <database-url> serve --disable-telemetry" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help text still refers to --disable-telemetry
|
Review app for commit d038ba1 deployed to Heroku: https://hge-ci-pull-1401.herokuapp.com |
|
Review app for commit efb0a82 deployed to Heroku: https://hge-ci-pull-1401.herokuapp.com |
|
@praveenweb @wawhal Can you check the console? Throws the error: |
|
Review app for commit 44c303c deployed to Heroku: https://hge-ci-pull-1401.herokuapp.com |
|
Review app for commit ddf7958 deployed to Heroku: https://hge-ci-pull-1401.herokuapp.com |
|
Review app https://hge-ci-pull-1401.herokuapp.com is deleted |
|
👎 Not a fan of opt-out telemetry. Somewhere, some dev, who hasn't read all the pages of the documentation, is inadvertently going to fail to opt-out. Thankfully, I see that there is |
|
@hrj Yep. There are notices on the server logs, on the console and on the CLI. |
<!-- The PR description should answer 2 important questions: --> ### What We need a unique identifier for remote predicates, and used `uuid`. However this makes snapshot tests of `explain` unstable because the ordering changes all the time, so we switch it for a counter, threaded through the planning code. ### How Make a counter with a private inner value that we pass around, that provides a fresh `u64` when required. V3_GIT_ORIGIN_REV_ID: 386c6d47935b8da497e1471a3ca44bd52a12f72a
The Hasura GraphQL Engine collects anonymous telemetry data that helps the
Hasura team in understanding how the product is being used and in deciding
what to focus on next.
The data collected is minimal and, since there is no sign-in associated with
the GraphQL Engine, it cannot be used to uniquely identify any user.
Furthermore, data collected is strictly statistical in nature and
no proprietary information is collected (please see the next section).
As a growing community, we greatly appreciate the telemetry data users
send to us, as it is very valuable in making GraphQL Engine a better product
for everyone. If you are worried about privacy, you can choose to disable
sending telemetry as described below.
Access to collected data is strictly limited to the Hasura team and not shared with 3rd parties.
What data are collected?
Server
The server periodically sends the number of tables, views, relationships,
permission rules, event triggers and remote schemas tracked by GraphQL Engine,
along with randomly generated UUID per database and per instance. The
server version is also sent.
Here is a sample row from the telemetry database:
{ "id": 12, "timestamp": "2019-01-21T19:43:33.63838+00:00", "db_uid": "dddff371-dab2-450f-9969-235bca66dab1", "instance_uid": "6799360d-a431-40c5-9f68-24592a9f07df", "version": "v1.0.0-alpha35", "metrics": { "views": 1, "tables": 2, "permissions": { "roles": 1, "delete": 2, "insert": 1, "select": 2, "update": 2 }, "relationships": { "auto": 2, "manual": 0 }, "event_triggers": 0, "remote_schemas": 1 } }Console
The console is a React-Redux UI. Redux action names along with anonymized
route names are sent without any identifiable information or payload. Console
also records the UUID of the server/CLI that it is connected to.
Here is a sample:
{ "id": 902, "timestamp": "2019-01-21T10:00:23.849202+00:00", "url": "/data/schema/SCHEMA_NAME/tables/TABLE_NAME/modify", "event_type": "ModifyTable/RESET", "console_mode": "server", "server_uuid": "79485a57-fca5-40f3-a31b-78c0d211314b", "server_version": "v1.0.0-alpha35", "cli_uuid": null }CLI
The CLI collects each execution event, along with a randomly generated UUID.
The execution event contains the command name, timestamp and whether the
execution resulted in an error or not. Error messages, arguments and flags
are not recorded. CLI also collects the server version and UUID that it
is talking to. The operating system platform and architecture is also
noted along with the CLI version.
Sample data:
{ "id": 115, "timestamp": "2019-01-21T11:36:07.86783+00:00", "uuid": "e462ce20-42dd-40fd-9549-edfb92f80455", "execution_id": "ddfa9c33-0693-457d-9026-c7f456c43322", "version": "v0.4.27", "command": "hasura version", "is_error": false, "os_platform": "linux", "os_arch": "amd64", "server_uuid": "a4d66fb2-f88d-457b-8db1-ea7a0b57921d", "server_version": "v1.0.0-alpha35", "payload": null }Where is the data sent?
The data is sent to Hasura's servers addressed by
telemetry.hasura.io.How do I turn off telemetry (opt-out)?
You can turn off telemetry on the server and on the console hosted by server
by setting the following environment variable on the server or by using
the flag
--enable-telemetry=false:In order to turn off telemetry on CLI and on the console served by CLI,
you can set the same environment varibale on the machine running CLI.
You can also set
"enable_telemetry": falsein the JSON file createdby the CLI at
~/.hasura/.config.jsonto perisist the setting.