-
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
[processor/filter] panic: interface conversion: interface {} is string, not bool #13573
Comments
Seems to still be the case in the current release. I could work on this. |
We're experiencing this as well on the latest release (0.58.0), given a similar basic filter expression as the initial reporter Adding some extra error handling in the func (m *Matcher) match(env *env) (bool, error) {
result, err := m.v.Run(m.program, env)
if err != nil {
return false, err
}
if _, ok := result.(bool); !ok {
return false, fmt.Errorf("filter returned non-boolean value type=%T result=%v metric=%s, attributes=%v",
result, result, env.MetricName, env.attributes.AsRaw())
}
return result.(bool), nil
}
Also similar to the initial reporter, we are periodically seeing index out of range errors returned. These are much less frequent for us than the wrong return type though:
|
Pinging code owners: @boostchicken. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Its done |
With 0.64.0, im getting all kind of strange errors (see below). Could this be some kind of race condition?
|
@adam-kiss-sg We're also seeing this in v0.64.0, and it happens to occur intermittently. Our config looks something like:
Log message:
|
@ajsaclayan Can you try it now? According to the changelog the fix was deployed in v0.67.0 |
@adam-kiss-sg Verified the issue is no longer there. Thank you! |
Describe the bug
Using the filter processor, we have a collector configured to route metrics to a pipeline that have a specific label. We have noticed this error happens intermittently:
Steps to reproduce
Simplified collector config with:
What did you expect to see?
What did you see instead?
For some telemetry, we are seeing some log errors:
What version did you use?
Version: 0.50.0
We have not seen any updates to the filterprocessor since that indicates it's fixed in future releases.
What config did you use?
Config: (e.g. the yaml config file)
Environment
OS: Linux
Additional context
We followed the stack trace down to this code which expects a
boolean
but gets astring
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.50.0/internal/coreinternal/processor/filterexpr/matcher.go#L124The text was updated successfully, but these errors were encountered: