-
Notifications
You must be signed in to change notification settings - Fork 2.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
[processor/transform] The set
function cannot set a field to nil
#12193
Comments
Could this be assigned to me? |
@evan-bradley its yours. One thing to think about is that the current implementation allows To do this change you'll probably have to change the I think overall thats an improvement for the language, but should be properly documented as this can be seen as a breaking change for the |
Looking for some guidance here: the specification for attributes says that it is undefined behavior to set an attribute value to |
Good find. For attributes then it should continue to do nothing. It does bring up the question of whether or not issue is really valid. Should we let users set anything to We might be able to close this issue without doing anything. |
I agree, I don't think there are any code changes necessary. One follow-up could be to document the motivation for this behavior. |
Ya good idea. Can you update the |
Fixes open-telemetry#12193 Add tests for ensuring that setting attributes to `nil` is a no-op, and document motiviation for setting to `nil` being a no-op in the `set` function.
Fixes open-telemetry#12193 Add tests for ensuring that setting attributes to `nil` is a no-op, and document motivation for why calling `set` with a `nil` value is a no-op.
Fixes #12193 Add tests for ensuring that setting attributes to `nil` is a no-op, and document motivation for why calling `set` with a `nil` value is a no-op. Co-authored-by: Evan Bradley <[email protected]>
Describe the bug
The Telemetry Query Language has the concept of
nil
, but the set function doesn't understand it. You cannot doset(attribute["test"], nil)
. This is because of the nil check in the set function and also because of the setAttr function in each signal's context (traces for example) doesn't know how to handlenil
.The TQL/processor need updated to better support setting nil.
The text was updated successfully, but these errors were encountered: