-
Notifications
You must be signed in to change notification settings - Fork 207
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
Updates the user_agent processor to use the EventKey. #4628
Updates the user_agent processor to use the EventKey. #4628
Conversation
a903eec
to
70fd9fc
Compare
Now that #4627 is merged, I've rebased this PR and force-pushed it. So this is ready for review and merge. |
Signed-off-by: David Venable <dlv@amazon.com>
70fd9fc
to
a47e8aa
Compare
Signed-off-by: David Venable <dlv@amazon.com>
I've updated this PR to use the EventKeyConfiguration provided in #4635 for the |
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.
Thanks for providing the change. I am not quite sure about the purpose of the refactoring. So far, It looks to me, as if no change in behaviour is made.
...src/main/java/org/opensearch/dataprepper/plugins/processor/useragent/UserAgentProcessor.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opensearch/dataprepper/plugins/processor/useragent/UserAgentProcessor.java
Outdated
Show resolved
Hide resolved
} catch (Exception e) { | ||
LOG.error(EVENT, "An exception occurred when parsing user agent data from event [{}] with source key [{}]", | ||
event, config.getSource(), e); | ||
event, sourceKey.getKey(), e); |
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.
Is it intended to only log the key part after the change? To be compatible with the previous version, this would need to be just sourceKey
.
Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Signed-off-by: David Venable <dlv@amazon.com>
1ee8acd
to
ecf3789
Compare
Signed-off-by: David Venable <dlv@amazon.com>
@KarstenSchnitter , Thanks for the suggestions. I took all of them. I'm making this change because of some of the problems we have with the current approach. In particular: 1) The original approach uses a lot of processing to build the JSON Pointers on-demand. 2) The original approach did not validate keys up-front. This meant that users would create invalid configs and only know it after data is flowing in. This new approach lets us create the |
…ject#4628) Updates the user_agent processor to use the EventKey. Signed-off-by: David Venable <dlv@amazon.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
…ject#4628) Updates the user_agent processor to use the EventKey. Signed-off-by: David Venable <dlv@amazon.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
…ject#4628) Updates the user_agent processor to use the EventKey. Signed-off-by: David Venable <dlv@amazon.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
…ject#4628) Updates the user_agent processor to use the EventKey. Signed-off-by: David Venable <dlv@amazon.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
…ject#4628) Updates the user_agent processor to use the EventKey. Signed-off-by: David Venable <dlv@amazon.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
…ject#4628) Updates the user_agent processor to use the EventKey. Signed-off-by: David Venable <dlv@amazon.com> Co-authored-by: Karsten Schnitter <k.schnitter@sap.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Description
This draft PR updates the
user_agent
processor to use theEventKey
. It depends on changes from #4627, so this is a draft PR for now.Issues Resolved
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.