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

feat(telemetry): collect deploy mode in telemetry #17392

Merged
merged 10 commits into from
Jun 28, 2024

Conversation

tabVersion
Copy link
Contributor

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

TELEMETRY_CLUSTER_TYPE_SINGLE_NODE = 1;
TELEMETRY_CLUSTER_TYPE_TEST = 2;
TELEMETRY_CLUSTER_TYPE_DOCKER_COMPOSE = 3;
TELEMETRY_CLUSTER_TYPE_KUBERNETES = 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should differentiate kubernetes deployments with cloud deployments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cloud use TELEMETRY_CLUSTER_TYPE_HOSTED, setting by @arkbriar
see

const TELEMETRY_CLUSTER_TYPE_HOSTED: &str = "hosted"; // hosted on RisingWave Cloud

Copy link
Contributor

Choose a reason for hiding this comment

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

Not set yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Set now.

Copy link
Contributor

@neverchanje neverchanje left a comment

Choose a reason for hiding this comment

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

The implementation LGTM.

tabVersion and others added 2 commits June 21, 2024 16:30
@tabVersion tabVersion marked this pull request as ready for review June 24, 2024 04:13
Signed-off-by: tabVersion <[email protected]>
Signed-off-by: tabVersion <[email protected]>
@tabVersion tabVersion added the need-cherry-pick-release-1.10 Open a cherry-pick PR to branch release-1.10 after the current PR is merged label Jun 24, 2024
proto/telemetry.proto Outdated Show resolved Hide resolved
@tabVersion tabVersion requested a review from fuyufjh June 24, 2024 05:48
Signed-off-by: tabVersion <[email protected]>
Comment on lines 24 to 30
TELEMETRY_CLUSTER_TYPE_UNSPECIFIED = 0;
TELEMETRY_CLUSTER_TYPE_SINGLE_NODE = 1;
TELEMETRY_CLUSTER_TYPE_TEST = 2;
TELEMETRY_CLUSTER_TYPE_DOCKER_COMPOSE = 3;
TELEMETRY_CLUSTER_TYPE_KUBERNETES = 4;
TELEMETRY_CLUSTER_TYPE_HOSTED = 5;
TELEMETRY_CLUSTER_TYPE_STANDALONE = 6;
Copy link
Member

Choose a reason for hiding this comment

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

These concepts are not orthogonal. For example, the CI/CD pipeline may run tests in standalone mode, making it confusing to different people.

I tend to use 2 separated dimensions

  1. Is it a test or development instance? If yes, should be excluded from telemetry. I think our existing TELEMETRY_ENABLED is enough for this usage.
  2. If it's a production cluster, how it is deployed? e.g. docker-compose, Kubernetes or standalone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense, let's make the TELEMETRY_ENABLED default to true.

proto/telemetry.proto Show resolved Hide resolved
proto/telemetry.proto Outdated Show resolved Hide resolved
Signed-off-by: tabVersion <[email protected]>
Signed-off-by: tabVersion <[email protected]>
@tabVersion
Copy link
Contributor Author

tabVersion commented Jun 24, 2024

aligned behavior:

  • use TELEMETRY_ENABLED to control all telemetry, including scarf.
  • set RW_TELEMETRY_TYPE in each docker-compose file
  • RW_TELEMETRY_TYPE is set to single-node when single-node bootstrap

Signed-off-by: tabVersion <[email protected]>
@tabVersion tabVersion added this pull request to the merge queue Jun 28, 2024
Merged via the queue into main with commit 959af38 Jun 28, 2024
33 of 34 checks passed
@tabVersion tabVersion deleted the tab/collect-deploy-mode branch June 28, 2024 10:16
github-actions bot pushed a commit that referenced this pull request Jun 28, 2024
github-merge-queue bot pushed a commit that referenced this pull request Aug 6, 2024
Signed-off-by: tabVersion <[email protected]>
Co-authored-by: Bohan Zhang <[email protected]>
Co-authored-by: tabVersion <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/run-e2e-single-node-tests need-cherry-pick-release-1.10 Open a cherry-pick PR to branch release-1.10 after the current PR is merged type/feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants