Graylog2 / Graylog2/graylog2-server

Disable telemetry in local mode

Open
#15,363 4 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Expected Behavior

The telemetry reporting should be disabled when the Graylog server runs in local mode. (`--local`)

**Decision May 25th:**
Instead of completely disabling telemetry, we will configure it as follows:

- local mode -> disable telemetry by default
- smd.dev -> send events to Posthog `Development` project

Posthog Development project key:
`phc_N86WWkaKgfoywB57IFSbZNWCp1fsQ131yqMXMJRByqq`

- public release -> send events to Posthoh `Production` project

Posthog Production project key:
`phc_t3lgBB66QsPW4HEfiGopO14um4XGNtBcefEKYWelWda`

### Tasks

- [ ] Disable telemetry when `--local` flag is used (equivalent to `telemetry_enabled = false`)
- [ ] Disable telemetry when `DEVELOPMENT` environment variable is set and not value `"false"` (equivalent to `telemetry_enabled = false`) see [IsDevelopmentServerProvider](https://github.com/Graylog2/graylog2-server/blob/master/graylog2-server/src/main/java/org/graylog2/shared/bindings/providers/IsDevelopmentServerProvider.java)
- [ ] Introduce a `telemetry_dev_api_key` config setting and set it to the PostHog dev key by default
- [ ] Adjust code to check if the currently running Graylog version is a snapshot (`-SNAPSHOT` suffix)
- If the version is not a snapshot, use the `telemetry_api_key` value
- If the version is a snapshot, use the `telemetry_dev_api_key`

## Current Behavior

The telemetry reporting is enabled even when Graylog is running in local mode.

## Context

We run test and development setups in local mode. Submitting telemetry data for test and dev setups would produce lots of noise in the analysis of user behaviour in public environments .

## Your Environment

* Graylog Version: 5.1.0-beta.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.