-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/sqlquery] Improve error handling for missing columns in result set #35068
Labels
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Grandys
changed the title
Improve error handling for missing columns in result set
[receiver/sqlquery] Improve error handling for missing columns in result set
Sep 8, 2024
@crobert-1 @dmitryax |
This seems like a good idea to me, removing |
andrzej-stencel
pushed a commit
that referenced
this issue
Sep 27, 2024
…35189) **Description:** * [breaking] Fail if for log column not found in result set (for consistency with metrics behaviour) * Instead of fail-fast, collect all errors that occurred when transforming row to metric or log **Link to tracking Issue:** #35068 **Testing:** Added/updated unit tests **Documentation:** n/a Closes #35068
jriguera
pushed a commit
to springernature/opentelemetry-collector-contrib
that referenced
this issue
Oct 4, 2024
…pen-telemetry#35189) **Description:** * [breaking] Fail if for log column not found in result set (for consistency with metrics behaviour) * Instead of fail-fast, collect all errors that occurred when transforming row to metric or log **Link to tracking Issue:** open-telemetry#35068 **Testing:** Added/updated unit tests **Documentation:** n/a Closes open-telemetry#35068
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
internal/sqlquery, receiver/sqlquery
Describe the issue you're reporting
I have two suggestions how to improve error handling:
When I run the Otel collector with this configuration, logs are generated (with an empty body), but metrics are not. Below is the collector's output:
Notably, there is no error entry for "data_type": "logs". Ideally, the handling of missing body columns for logs should be consistent with the handling of missing value columns for metrics. If we choose to fail on a missing body column, it would be a breaking change.
When the collector starts, the following error is logged:
Although both attribute columns are missing from the result set, the error is logged only for the first missing attribute column. Providing more detailed error messages would enhance the debugging experience.
The text was updated successfully, but these errors were encountered: