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

pkg/cmd: use cobrautil version command #491

Merged
merged 1 commit into from
Mar 24, 2022
Merged

pkg/cmd: use cobrautil version command #491

merged 1 commit into from
Mar 24, 2022

Conversation

jzelinskie
Copy link
Member

This also updates to a version that supports generic OpenTelemetry
collectors.

Fixes #14.

@github-actions github-actions bot added area/CLI Affects the command line area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Mar 21, 2022
@@ -47,8 +47,8 @@ func ServeExample(programName string) string {
func DefaultPreRunE(programName string) cobrautil.CobraRunFunc {
return cobrautil.CommandStack(
cobrautil.SyncViperPreRunE(programName),
cobrautil.ZeroLogPreRunE("log", zerolog.InfoLevel),
cobrautil.OpenTelemetryPreRunE("otel", zerolog.InfoLevel),
cobrautil.ZeroLogRunE("log", zerolog.InfoLevel),
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these supposed to be RunE?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, it's up to you to decide whether it "becomes a PreRunE" if you assign it as a PreRun.

Copy link
Contributor

@ecordell ecordell left a comment

Choose a reason for hiding this comment

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

LGTM

This also updates to a version that supports generic OpenTelemetry
collectors.

Fixes #14.
@jzelinskie jzelinskie merged commit a1da8e0 into main Mar 24, 2022
@jzelinskie jzelinskie deleted the cobrautil-9 branch March 24, 2022 22:02
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support OpenTelemetry collectors
2 participants