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

Add a a parameter to keep/drop the stream label from cloudwatch. #4494

Merged
merged 3 commits into from
Oct 25, 2021
Merged

Add a a parameter to keep/drop the stream label from cloudwatch. #4494

merged 3 commits into from
Oct 25, 2021

Conversation

cstyan
Copy link
Contributor

@cstyan cstyan commented Oct 19, 2021

Unfortunately there's no nice way to set a CLI argument for a Go lambda, so the toggling of keeping/dropping the stream label is via another environment variable that users can set in their terraform/cloudformation.

Signed-off-by: Callum Styan callumstyan@gmail.com

Signed-off-by: Callum Styan <callumstyan@gmail.com>
@cstyan cstyan requested a review from a team as a code owner October 19, 2021 07:31
if keep != "" && strings.EqualFold(keep, "true") {
keepStream = true
}
fmt.Println("keep stream: ", keepStream)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you keep this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's useful for users. It would only be printed once per execution of the lambda function, and is potentially the easiest way to find out the value for that option if they don't have easy access to the configuration/deployment of the lambda themselves.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM some nits not important.

Signed-off-by: Callum Styan <callumstyan@gmail.com>
variable when deploying via CloudFormatioEnsure the keep stream value is
properly passed in as an environment variable when deploying via
CloudFormationn

Signed-off-by: Callum Styan <callumstyan@gmail.com>
@dannykopping dannykopping merged commit 1493278 into grafana:main Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants