-
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
[exporter/elasticsearch] remove dedup config #33776
[exporter/elasticsearch] remove dedup config #33776
Conversation
@axw Can you split the |
@andrzej-stencel I've opened #33779 and #33780 for just the deprecations. I'll mark this one as draft and reopen it after those deprecations are released. |
b9e0ec2
to
2483f30
Compare
Remove the dedup configuration setting, and always deduplicate. Elasticsearch does not permit duplicate keys in JSON objects, and this configuration is adding more complexity to the code than it's worth.
2483f30
to
f8449c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit otherwise lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the docs:
the option (...) MAY be removed after N+2 or 6 months, whichever comes later
I believe this means we should not remove this option before January 2025 (six months after v0.104.0). We can hide the option behind a feature flag if it helps (not sure if it makes sense in this case?).
You can still make the feature non-operational according to this:
the option MAY be made non operational already by the same version where it is deprecated
It's against policy to remove within 6 months of deprecation, but it can be made a no-op.
@andrzej-stencel thanks for pointing out the docs. I've reinstated the config, but made it a no-op. I didn't add it back into the README though - let me know if you disagree with that.
I find the "MAY" in this to be a little bit ambiguous. Perhaps it would be worth rewording to: "the option and WARN level message MUST NOT be removed earlier than N+2 o 6 months, whichever comes later" WDYT? |
I think if the option exists, it should be described in the README - saying it is deprecated and non-functional.
I agree that the wording might be a bit misleading. Your proposal seems OK, please send a PR to update the wording, let's see what other maintainers think. |
#### Description Clarify that deprecated config options are expected to remain for at least 6 months after deprecation. "MUST NOT" makes it clear for readers that this is something that definitely should not be done, vs. something that's discretionary. See also open-telemetry/opentelemetry-collector-contrib#33776 (comment)
Description:
Remove the
dedup
configuration setting, and always de-duplicate. Elasticsearch does not permit duplicate keys in JSON objects, and this configuration is adding more complexity to the code than it's worth.I've simplified the
internal/objmodel
API slightly, unexporting theSort
methods, which are internally called by the now unconditional call toDedup
.Link to tracking Issue:
Closes #33773
Testing:
Ran the unit tests, which cover deduplication. None of the tests in package elasticsearchexporter covered
dedup: false
.Documentation: