-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fix nil reference panic due to variable shadowing bug #43733
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
Conversation
|
|
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better! |
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.
@lukasbindreiter Good catch. LGTM
|
@lukasbindreiter please add a changelog item |
|
@dmitryax added a changelog entry 👍 |
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better! |
|
Should be ready to go if CI goes green. Thank's @lukasbindreiter! |
|
Thank you for your contribution @lukasbindreiter! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help. |
Fix
nildereference panic when using the clickhouse exporter with theclickhouse.jsonfeature gate enabled.Description
The recent refactoring in #43518 introduced a variable shadowing bug:
Since
exp.startis never called for that, this results in the following panic during runtime, becauseexp.dbisnil.My fix here was to define a common interface for both exporters, so that the
expvariable can be re-assigned from within theifscopes.Alternatively, also the refactoring could be reverted, or both
exp.pushLogsDataandexp.shutdowncould be assigned to a helper variable similar to what is done currently already withexp.start