fix: Allow managed clients to disable sentry logging#363
Merged
kodiakhq[bot] merged 6 commits intomainfrom Nov 7, 2022
Merged
Conversation
yevgenypats
suggested changes
Nov 7, 2022
Contributor
yevgenypats
left a comment
There was a problem hiding this comment.
Looks good. few minor suggestions.
| var noSentry bool | ||
| logLevel := newEnum([]string{"trace", "debug", "info", "warn", "error"}, "info") | ||
| logFormat := newEnum([]string{"text", "json"}, "text") | ||
| telemetryLevel := newEnum([]string{"none", "errors", "stats", "all"}, "all") |
Contributor
There was a problem hiding this comment.
Im abit confused. we don't have telemetry on the plugin side. Can we just add no-sentry? or just have none/errors
Contributor
There was a problem hiding this comment.
Actually seems like there is already a no-sentry flag, so maybe let just use that?
Contributor
Author
There was a problem hiding this comment.
Yes, this PR is re-using the existing no-sentry flag, and this isn't adding a new flag. But what is changing is that the plugins now respect CQ_TELEMETRY_LEVEL, so that developers who have that set in their environment don't accidentally send crash reports if they forget to run a plugin with the --no-sentry flag.
hermanschaaf
commented
Nov 7, 2022
hermanschaaf
commented
Nov 7, 2022
disq
approved these changes
Nov 7, 2022
yevgenypats
approved these changes
Nov 7, 2022
yevgenypats
approved these changes
Nov 7, 2022
kodiakhq bot
pushed a commit
that referenced
this pull request
Nov 8, 2022
🤖 I have created a release *beep* *boop* --- ## [1.0.3](v1.0.2...v1.0.3) (2022-11-07) ### Bug Fixes * Allow managed clients to disable sentry logging ([#363](#363)) ([dc20388](dc20388)) * Normalize Windows line breaks before parsing configuration files ([#352](#352)) ([979e207](979e207)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot
pushed a commit
to cloudquery/cloudquery
that referenced
this pull request
Nov 8, 2022
This fixes a bug where panics in plugins would be sent to Sentry even though telemetry-level was set to `none` at the CLI level. Related PR: cloudquery/plugin-sdk#363
SCKelemen
pushed a commit
to SCKelemen/cloudquery
that referenced
this pull request
Nov 15, 2022
…ry#3762) This fixes a bug where panics in plugins would be sent to Sentry even though telemetry-level was set to `none` at the CLI level. Related PR: cloudquery/plugin-sdk#363
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change allows managed clients to disable sentry logging, which until now was enabled for plugins by accident (so panics in plugins were being logged when they shouldn't have been). The CLI will be able to use this option to disable sentry logging.
Plugins will now also respect the
CQ_TELEMETRY_LEVELenvironment variable.