Skip to main content

遥测

为什么 Yarn 需要一些遥测?

¥Why does Yarn need some telemetry?

作为维护者,有时很难知道我们应该优先考虑什么。大型 monorepos 是我们用户遇到的最常见情况吗?哪些 packageExtensions 最常见?有多少人选择退出 nm 链接器?等等

¥As maintainers, it's sometimes difficult to know what we should prioritize. Are large monorepos the most common situation our users encounter? What packageExtensions are the most common? How many people opted-out to the nm linker? Etc.

此外,由于缺乏遥测,一些项目也难以认真对待我们。Node docker 镜像存储库中的各种线程建议从 Docker 镜像中删除 Yarn,并将 Yarn 称为边缘工具。我们的团队没有时间收集来自地球表面的各种民意调查,我们也不应该这样做。

¥Additionally, because of the lack of telemetry, some projects also had trouble taking us seriously. Various threads in the Node docker image repositories suggested to remove Yarn from the Docker image, citing Yarn as a fringe tool. Our team doesn't have time to spend collecting the various polls from the surface of the earth, nor should we have to.

我的信息会发到 Facebook 吗?

¥Will my information go to Facebook?

不。Yarn 不是 Facebook 项目 和 Facebook 不会收到以这种方式收集的任何数据,Google 或 Microsoft 也不会。

¥No. Yarn is not a Facebook project, and Facebook won't receive any amount of data collected this way, and neither will Google, or Microsoft.

我们收集的数据存储在 Datadog 上,这是一家值得信赖的大型监控公司,高度重视安全性。

¥The data we collect are stored on Datadog, a trusted large-scale monitoring company with a heavy focus on security.

我们在谈论哪些信息?

¥Which information are we talking about?

截至今天,我们收集以下内容:

¥As of today, we collect the following:

  • Yarn 版本

    ¥The Yarn version

  • 使用哪个命令名称(但不使用其参数)

    ¥Which command name is used (but not its arguments)

  • 活动插件名称(仅适用于我们自己的插件;你的插件是隐藏的)

    ¥The active plugin names (only for our own plugins; yours are hidden)

  • 一周内运行的安装数量

    ¥The number of installs run during the week

  • 已安装的不同项目的数量

    ¥The number of different projects having been installed

  • 有多少人安装了 nm 链接器

    ¥How many installs for the nm linker

  • 工作区的数量

    ¥The number of workspaces

  • 依赖的数量

    ¥The number of dependencies

  • packageExtensions 字段(扩展的名称 + 额外依赖的名称)

    ¥The packageExtensions field (name of extended + name of the extra dependency)

  • IP 地址(不幸的是,大多数提供商不允许我们删除它)

    ¥The IP address (most providers unfortunately don't let us remove that)

数据通过批量发送,大约每七天一次。这可以防止我们以过高的粒度跟踪你的使用情况,只留下最有用的信息来有效地完成我们的工作。

¥Data are sent via batches, roughly every seven days. This prevents us from tracking your usage with a too high granularity, leaving us only the most useful information to do our job efficiently.

如何禁用它?

¥How can I disable it?

请注意,无论配置如何,遥测都不会在 CI 上运行。

¥Note that, regardless of the configuration, the telemetry won't ever run on CI.

  • 要在项目上禁用它(包括任何克隆它的人),请运行 yarn config set enableTelemetry 0。这将使我们的生活变得更加困难,所以请考虑这是否真的是你想要做的。

    ¥To disable it on a project (including for anyone who would clone it), run yarn config set enableTelemetry 0. This will make our life ever so slightly more difficult, so please consider whether it's really what you want to do.

  • 要在整台机器上禁用它(但不为其他任何人禁用),请运行 yarn config set --home enableTelemetry 0

    ¥To disable it on your whole machine (but not for anyone else), run yarn config set --home enableTelemetry 0.