Skip to content
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

Track the installation mode via the anonymous usage statistics #3149

Closed
pracucci opened this issue Oct 6, 2022 · 4 comments · Fixed by #3294
Closed

Track the installation mode via the anonymous usage statistics #3149

pracucci opened this issue Oct 6, 2022 · 4 comments · Fixed by #3294

Comments

@pracucci
Copy link
Collaborator

pracucci commented Oct 6, 2022

I would like to track via the anonymous usage statistics how was installed Mimir (Helm, Jsonnet, other). To make the tracking reliable I propose to add a new configuration option -usage-stats.installation-mode (defaults to custom), and then have Helm setting it to helm, and jsonnet to jsonnet.

@Rustin170506
Copy link
Contributor

This looks like very fun. Can I have a try? Could you please add some guides?

@pstibrany
Copy link
Member

pstibrany commented Oct 12, 2022

This looks like very fun. Can I have a try? Could you please add some guides?

You will need to

  1. add configuration option as suggested by this issue
  2. initialize installation mode in initUsageStats, by using usagestats.GetString(...).Set(value) similar to what initUsageStats does for "blocks_storage_backend" here.

I think that's it for the code. Then we should modify Jsonnet and Helm to set the values.

@pracucci
Copy link
Collaborator Author

Then we should modify Jsonnet and Helm to set the values.

Yes, this too.

For jsonnet you can just inject a CLI flag to each component (e.g. a way could be define a dedicated config block usageStatsConfig similarly to grpcConfig in operations/mimir/config.libsonnet and merge it in every component args (similarly to what do we with grpcConfig).

For Helm, let's ask some help to @Logiraptor.

@Logiraptor
Copy link
Contributor

Logiraptor commented Oct 13, 2022

For helm I would add an entry under mimir.config in the default values.yaml file here:

It would probably look something like

mimir:
  config: |
    usage_stats:
      installation_mode: helm
    ... <rest of current config block omitted>

So this means the new configuration option would be available via both CLI and yaml configuration like most other flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants