-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat: lambda-promtail; ensure messages to Kinesis are usable by refactoring parsing of KinesisEvent to match parsing of CWEvents + code cleanup #13098
Conversation
hey @HatiCode there are some lambda promtail tests failing |
model.LabelName("__aws_cloudwatch_log_group"): model.LabelValue(recordData.LogGroup), | ||
model.LabelName("__aws_cloudwatch_owner"): model.LabelValue(recordData.Owner), | ||
} | ||
|
||
if keepStream { | ||
labels[model.LabelName("__aws_cloudwatch_log_stream")] = model.LabelValue(recordData.LogStream) | ||
} |
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.
should these not be prefixed with __aws_kinesis
instead of __aws_cloudwatch
?
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.
@cstyan depending on the pov. The values are coming from cloudwatch, not from the K stream. K is a data stream not the source so I believe you want to have a filter that's a reflection of what your actual cloudwatch looks like, not the tool you used in the middle to stream that data.
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.
that makes sense, thanks for the context 👍
Refactor parsing of KinesisEvent to match parsing of CWEvents + code cleanup
What this PR does / why we need it:
This PR refactors the kinesis.go parsing code to match the way CWEvents are sent to Promtail.
When Kinesis is chosen as a delivery method it should still have a simple and usable log format. So far the message in the DATA_MESSAGE is unusable. This is solved by assigning labels to the logEvents in the DATA_MESSAGE the same way it's done in cw.go
Which issue(s) this PR fixes:
Fixes #10544
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR