-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Log flooded with string to non-string with op EQ
#14467
Comments
Pinging code owners: @TylerHelmuth @kentquirk @bogdandrutu. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
haha in trying to help users we destroyed their logs. Should definitely be logger.Debug. |
@atoulme please add more context about the incoming data. I assume the metrics just don't always have the "foo" attribute, right? I don't think the output is incorrect in that case. Setting debug log level for all the logs can also hide other potential issues that user should be aware of, so I'm not sure if that's the right solution. I believe the expression should have an additional condition verifying that metrics have
@TylerHelmuth does OTTL currently support something like this? |
Yes, specifically set a pipeline that doesn't have this attribute set to reproduce the issue. |
OTTL does short-circuit evaluation and so something like |
@dmitryax In this situation the invalidComparison func exists to ensure that a boolean always bubbles up based on the comparison rules. We didn't want to silently use the "default" return value of I was initially thinking this log, and others like it, would be Debug level so that customers can set their log level to debug when trying to troubleshoot issues and then see this problem. I thought Debug log level printed all log statements; does it exclude Error, Warning, and Info? |
Just using print is not the best option. I agree that this particular error should be of debug level. But we need to bring logger there as @atoulme did.
If a user sets telemetry log level to Debug in their config, logs of all levels that are equal to debug or higher will be printed, it's everything excluding trace level |
Agreed, his PR is what we need. @kentquirk and I have already provided feedback for next steps with that PR (member functions) |
We tried this - it appears && is not supported and should be replaced with With |
An update further on the workaround. Upon using the workaround, the test case above complies and there are no longer any logs generated. However, please see this example:
In this example, we make sure that the value of
This is because the first check is now comparing a string and nil, which is considered a violation of comparison types. |
Ok looks like |
Ya or to relax on what we consider an invalid comparison. @kentquirk what do you think? |
This is now fixed in 0.61.0. Closing. |
What happened?
Description
Upgraded to 0.60.0.
Using a transform processor with a clause such as:
Steps to Reproduce
Set up a pipeline using a transform processor that uses an eq operator.
Expected Result
The pipeline should perform correctly.
Actual Result
Logs are flooded with:
Collector version
0.60.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: