-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Removes deprecated ErrNilNextConsumer and solves type error for typeStr #4250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@open-telemetry/collector-contrib-approvers PTAL
const ( | ||
typeStr = "tailtracer" | ||
var ( | ||
typeStr = component.MustNewType("tailtracer") | ||
defaultInterval = 1 * time.Minute | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We could leave defaultInterval
as const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! Can you take a second look?
+1 this PR LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR corrects type error for typeStr on Custom Receiver documentation, as well as removes ErrNilNextConsumer checks.
As of version 0.97.0 for dependencies when creating a custom receiver, using typeStr directly as a string was throwing an error of
cannot use typeStr (variable of type string) as component.Type value in argument to receiver.NewFactory
which should now be done usingcomponent.MustNewType("tailtracer")
, in a var declaration.Also, as in Issue 9322 and later on accept as PR 9779 and PR 31793,
component.ErrNilNextConsumer
is not a valid error type.