Skip to content

Conversation

AB-xdev
Copy link

@AB-xdev AB-xdev commented Apr 3, 2025

Description

PoC showcasing how a better way of handling telemetry can be provided.

  1. There is now a GLOBAL opt out in the form of the VAADIN_TELEMETRY_OPT_OUT environment variable
  2. When executed for the first time it discloses the telemetry collection to the user (avoids potential violation of GDPR Art 13).

Overall the whole thing is quite similar to how Dotnet handles telemetry.

Please note that there is currently a placeholder for a site with more details about telemetry in place, as this can't be provided by the PR.

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
    - I can't verify that because I don't have all tools required for running tests locally installed and they are not in place in the repo.
  • I have performed self-review and corrected misspellings.

@mshabarov mshabarov added the Contribution PRs coming from the community or external to the team label Apr 3, 2025
@mshabarov mshabarov requested a review from Copilot April 4, 2025 10:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@jojule
Copy link
Contributor

jojule commented Apr 4, 2025

The telemetry collected does not include any Personal Data and thus the GDPR does not apply.

Copy link
Contributor

@jojule jojule left a comment

Choose a reason for hiding this comment

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

Intent here is driven by GDPR compliance. The telemetry collected does not include any Personal Data and thus GDPR does not apply for anonymous users.

Users who have a license key have explicitly approved usage terms and Personal Data usage terms there.

Requesting to drop additional log info here, but supporting addig a global telemetry opt-out environment variable.

@mshabarov mshabarov self-requested a review April 7, 2025 11:34
@mshabarov
Copy link
Contributor

mshabarov commented Apr 10, 2025

I agree that the Vaadin statistics collector is not a case for GDPR. It doesn't add any extra to what license checking process already uses to discriminate a user (machine id, user keys), but only the Vaadin versions, exact feature names, OS and JVM information.

Having the env variable for disable it makes sense to me, however I'd keep one single name for it (or at least similar), i.e. reuse existing vaadin.devmode.usageStatistics.enabled in upper case.

Having one time logging looks acceptable to me with the current mild wording.

We have a short mention in the online docs about the existing property, would be good, as a pre-requisite for this, to add a dedicated short section in "development" article about statistics.

Finally, keep in mind that there is more stats collection in the browser controlled by https://github.com/vaadin/vaadin-usage-statistics, it needs a separate opt-out.

@AB-xdev
Copy link
Author

AB-xdev commented Jun 3, 2025

Sorry for the late response, the last months were quite busy.

Intent here is driven by GDPR compliance

This is not limited to only GDPR.
For example AFAIK my company's contracts with customers usually contain a no-spy clause.
Having some badly documented, intransparent and not globally deactivatable telemetry traffic is kind of problematic.

The telemetry collected does not include any Personal Data and thus the GDPR does not apply.
...
Requesting to drop additional log info here

Although I'm not 100% sure about the legal aspects here, note that nearly every other major company or product that is collecting telemetry data - even without "personal data" - performs a disclosure on the first run. Examples:

If you still want to remove the first-run telemetry disclosure feel free to do this on the branch, I granted maintainers write access.

Having the env variable for disable it makes sense to me, however I'd keep one single name for it (or at least similar), i.e. reuse existing vaadin.devmode.usageStatistics.enabled in upper case.

You can also change that if you want however I would prefer a simple environment variable that is not that long and won't change because someone e.g. renames devmode in the future.

Finally, keep in mind that there is more stats collection in the browser controlled by https://github.com/vaadin/vaadin-usage-statistics, it needs a separate opt-out.

+1
Feel free to provide a additional opt-out functionality for that as the PR is currently scoped to Vaadin Flow Java code only.

@mshabarov
Copy link
Contributor

Hi @AB-xdev , thanks for your patience and sorry for a long response: we eventually passed through the vacation season and completed 24.9 preparations. I raised a thread internally about this topic and seems like, taking your and your customers motivations, we can apply this.
Before merging, I'd make an addition to https://vaadin.com/docs/latest/flow/configuration/properties to mention the parameter and statistics in general, then we can put a link into PR.
Also I'll double check how to align the existing parameter name with the new one.
I'll take over the PR and finalise it. Let me know if you have any further thoughts.

Copy link
Contributor

@mshabarov mshabarov left a comment

Choose a reason for hiding this comment

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

Added few tests, renamed the variable and placed the link that is expected after vaadin/docs#4565.

Now I need someone else to make a review as I pushed some changes by my-self :)

@mshabarov mshabarov requested a review from tltv September 29, 2025 10:13
Copy link

github-actions bot commented Sep 29, 2025

Test Results

1 273 files  + 2  1 273 suites  +2   1h 18m 16s ⏱️ + 2m 28s
8 802 tests + 6  8 735 ✅ + 6  67 💤 ±0  0 ❌ ±0 
9 261 runs  +20  9 183 ✅ +19  78 💤 +1  0 ❌ ±0 

Results for commit a6763f7. ± Comparison against base commit b091938.

♻️ This comment has been updated with latest results.

Copy link

@mshabarov mshabarov requested a review from jojule October 1, 2025 09:51
Copy link

Format Checker Report

BLOCKER There are 2 files with format errors

  • To see a complete report of formatting issues, download the differences artifact

  • To fix the build, please run mvn spotless:apply in your branch and commit the changes.

  • Optionally you might add the following line in your .git/hooks/pre-commit file:

    mvn spotless:apply
    

Here is the list of files with format issues in your PR:

flow-server/src/test/java/com/vaadin/flow/server/ConstantsUsageStatsEnvTest.java
vaadin-dev-server/src/test/java/com/vaadin/base/devserver/stats/DevModeUsageStatisticsLoggingTest.java

@vaadin-bot vaadin-bot added +1.0.0 and removed +0.0.1 labels Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution PRs coming from the community or external to the team +1.0.0

Projects

Status: 🔎Iteration reviews

Development

Successfully merging this pull request may close these issues.

5 participants