-
Notifications
You must be signed in to change notification settings - Fork 1.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
Remove overwritepropertiesconverter
and search for a solution for --set
#6294
Comments
I think using Is this reasonable to do the same in collector and keep Or maybe we have something like cc @open-telemetry/collector-approvers |
To summarize my understanding, you don't disagree with the 1. point of removing the I do agree that
An option is to indeed not deprecate "--set" and expand it, which we do with this PR anyway (so just revert the deprecation notice for the flag), because we add support for the value to be array/map/etc. Then we need to fix the escaping. Personally I think that will be very confusing to the users to have different separators, since in the main config you cannot write |
From @dmitryax the link to that "--set" flag is here https://helm.sh/docs/intro/using_helm/#the-format-and-limitations-of---set It may not be that bad to try to follow the same syntax (modulo multiple value support), then users will be familiar with that. Open for ideas here. |
Another inconvenience is that the argument value has to be always quoted because of the space in it |
@dmitryax is your proposal to do what helm does? |
I like the idea of following what |
I'm more inclined towards that, yes. I believe, if we decide to keep |
@codeboten @dmitryax awesome, #6295 moves us to that direction in a sense that we have the flag not forcing to respect the "properties" syntax as defined by java properties, and use our custom parser for that to be able to customize it. |
@dmitryax that is also required for some "-set" values, see #6321 where you need quotes for complex values like array/maps. |
@codeboten @dmitryax per the latest PR, current limitations are:
Bogdan's proposals: For 1. I suggest to do the escaping similar with the helm story. For 2. I suggest to do nothing since I believe that is not a problem. For 3. I am not convinced, because it looks like inconsistency between key part separator and keys inside value separators, so I would tend to try to fix that, but I like that I don't have to escape "." in that part. Any idea? |
I assume we're not doing this anywhere today and would probably be wary of someone attempting to do so, but we should probably formalize it as a rule if we want to say it's not something that this implementation needs to be concerned with.
Can we define the value part of these pairs as "what would be valid for the |
I'm also happier with the Helm style. I'm having trouble understanding when the problems 1/2/3 would occur. Do you have concrete examples in mind? Here's what I could guess: Problem 1: |
See https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/telemetry/config.go#L33. In the OTel resource we have lots of attributes with does.
Me nighter, but it is a limitation, so that's why I think we just need to document it and live with it.
This is a concrete limitation of our current implementation. So we may say the same as number 2, that we ignore this and live with it, but I documented them to make sure we understand the current implementation and that we will not be able to change this in the future. |
Thanks, it's clear now. I'm fine to live with those limitations. |
The main motivation is because the
--set
flag and implicitly theoverwritepropertiesconverter
uses dot (.
) as the key separator which makes it impossible to configure maps that contain keys with possible dots, e.g. inservice::telemetry::resource
where attribute keys contain dots. This was one of the main reason we changed confmap to use "::".Updated: Also the flag has a limitation for array values, see the flag comment:
Because of this issue, I suggest that we stop spreading this "not ideal" usage and:
overwritepropertiesconverter
(for sure go via the process of deprecation) and transform the value passed to--set
into a calls like--config=yaml:...
.--set
flag, we should consider marking this as deprecated and keep it for some months, with the deprecation message being clear on how to transform that call into a--config=yaml:...
equivalent.The text was updated successfully, but these errors were encountered: