-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support SQS message user attributes #23
base: main
Are you sure you want to change the base?
Support SQS message user attributes #23
Conversation
💚 CLA has been signed |
bb0cacc
to
61239af
Compare
Applying instructions to run tests from https://www.elastic.co/guide/en/logstash/current/contributing-patch-plugin.html simply do not work.
Using
but then
Setting logstash-integration-aws/Gemfile Line 5 in 183d113
Looking around I discovered some Looking at Travis CI, running @logstash-core some help would be much appreciated ! |
@piequi first of all many thanks for this contribution!! So here's a set of steps that should get you going: Step 1: install jruby 9.3 locally
Step 2: install Logstash
Step 3: setup environment variables
Step 4: install bundler, dependencies and vendor jars
Step 5: run tests
Those docs are in serious need of updating, I'll track this need and hopefully get to it soon. |
Hi @jsvd ! Following your instructions, everything goes fine until
It seems some commands aren't executed using
For info:
(Running the exact commands you provided and extracting JRuby to |
2c97e75
to
f7fc78e
Compare
f7fc78e
to
edc0d6c
Compare
Here is a Dockerfile highlighting the error I get :
|
Here are a few tweaks:
|
Thanks @jsvd ! |
Release notes
Added support for SQS message user attributes
What does this PR do?
This PR adds the ability to the SQS input plugin to also read and decode SQS user attributes that may be contained in the message.
When some user attributes are defined, the
message_attributes
key contains a hash ofString
->Aws::SQS::Types::MessageAttributeValue
with the attributes' name and value.https://docs.aws.amazon.com/zh_tw/sdk-for-ruby/v3/api/Aws/SQS/Types/MessageAttributeValue.html
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_MessageAttributeValue.html
Why is it important/What is the impact to the user?
Supporting user attributes will allow to enrich events with context metadata when the source emitting the SQS message uses a standard format that cannot be altered.
As mentioned in #22, a Python logging handler does not allow to add cloud metadata to a log record. This could only be achieved by adding user attributes when emitting the log record in a SQS message.
Checklist
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs