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

Test mode: Do not publish to Stackdriver by default #829

Open
wants to merge 1 commit into
base: master
from

Conversation

@fweikert
Copy link
Member

commented Sep 17, 2019

Local test runs shouldn't write actual data to Stackdriver, since it might be used for alerting or VM autoscaling.
If you want to test the Stackdriver integration with --test=true, you have to pass an additional flag --always_enable_stackdriver=true.

@fweikert fweikert requested a review from philwo as a code owner Sep 17, 2019
Local test runs shouldn't write actual data to Stackdriver, since it might be used for alerting or VM autoscaling.
If you want to test the Stackdriver integration with --test=true, you have to pass an additional flag --always_enable_stackdriver=true.
@@ -18,7 +18,8 @@ import (
var (
projectID = flag.String("project_id", "bazel-untrusted", "ID of the GCP project.")
datastoreSettingsName = flag.String("datastore_settings_name", "MetricSettings", "Name of the settings entity in Datastore.")
testMode = flag.Bool("test", false, "If true, the service will collect and publish all metrics immediately and only once.")
testMode = flag.Bool("test", false, "If true, the service will collect and publish all metrics to stdout immediately and only once. No metric will be published to CloudSQL or Stackdriver.")
testStackdriver = flag.Bool("always_enable_stackdriver", false, "If true, all metrics that normally publish to Stackdriver will do so even if test mode is enabled.")

This comment has been minimized.

Copy link
@philwo

philwo Oct 9, 2019

Member

What do we need that flag for? Can we just not add it?

This comment has been minimized.

Copy link
@fweikert

fweikert Oct 9, 2019

Author Member

Sometimes we need to test the Stackdriver integration, and in these cases we use the flag (since this PR also disables Stackdriver publishing in test mode by default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.