[otel config translate] allow hosts to be string not just slice#11394
[otel config translate] allow hosts to be string not just slice#11394cmacknz merged 3 commits intoelastic:mainfrom
Conversation
|
This pull request does not have a backport label. Could you fix it @leehinman? 🙏
|
7db7e5c to
df5d2ac
Compare
💛 Build succeeded, but was flaky
Failed CI Steps
cc @leehinman |
...gelog/fragments/1764016303-allow-host-to-be-a-string-for-otel-configuration-translation.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I didn't quite follow why the "before" implementation wouldn't allow hosts to be a string but that might be because I don't have enough context.
The "after" implementation makes a lot of sense, though, since it's using the hosts from the Beat config object and I know that supports either string or list of strings for hosts.
Yeah, it isn't obvious. But in The "fix" here treats the configuration more like beats does. Like beats we don't unpack with the
I'm cheating. Since we want bug for bug compatibility I'm just using the same code ;-) |
9a8b371
* [otel config translate] allow hosts to be string not just slice * update changelog to bugfix (cherry picked from commit 70ef801)
* [otel config translate] allow hosts to be string not just slice * update changelog to bugfix (cherry picked from commit 70ef801) # Conflicts: # internal/pkg/otel/translate/output_elasticsearch.go # internal/pkg/otel/translate/output_elasticsearch_test.go
* [otel config translate] allow hosts to be string not just slice * update changelog to bugfix (cherry picked from commit 70ef801)
…ing not just slice (#11431) * [otel config translate] allow hosts to be string not just slice (#11394) * [otel config translate] allow hosts to be string not just slice * update changelog to bugfix (cherry picked from commit 70ef801) # Conflicts: # internal/pkg/otel/translate/output_elasticsearch.go # internal/pkg/otel/translate/output_elasticsearch_test.go * fix merge conflicts * remove test cases that shouldn't have been backported --------- Co-authored-by: Lee E Hinman <57081003+leehinman@users.noreply.github.com> Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>
What does this PR do?
Allows the
hostspart of the beat output to be a string instead of a slice.This is to match the behavior of beats which allows this.
Why is it important?
This means that more hand written configuration will work "out of the box" with beat receivers.
Checklist
./changelog/fragmentsusing the changelog toolDisruptive User Impact
None.
How to test this PR locally
Related issues
Questions to ask yourself