-
Notifications
You must be signed in to change notification settings - Fork 2
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
Upi logs parser #13
Upi logs parser #13
Conversation
marking this PR as draft. As I was working with the BQ sink, converting to |
@leonlnj The column will then have
|
Getting
after changing the bq schema to the below. Would need more investigation. |
Got it! Probably we need to update how we parse it in the parser plugin
|
Updated the description with the new BQ schema, using new proto of caramel-upi-protos '0.0.1' with the map of header changed to a struct, no further changes is required on the parser/fluentd end. |
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 @leonlnj ! LGTM
What this PR does / why we need it:
As part of the closed-loop ml, this is part of the logwriter that will move UPI logs from Kafka to BQ.
Kafka (Prediction/Router logs) -> Fluentd (Kafka source -> Upi logs parser -> Bq sink) -> BQ
This PR focus on the UPI logs parser specifically. Future PR will add the full fluentd with bq capabilities.
Installation steps is in
logwriter/fluent-plugin-upi-logs/README.md
Changes
CI
.github/workflows/publish-upi-logs-parser.yaml
- publish plugin to rubygem (I took a look at kafka, bq, protoparser fluentd repo and a few google protobuf repo ci, none of them uses the CI or a version passed in from git tag as release version which I thought would be more mainstream. So I followed, which make the version manually declared in gemspec. Dont foresee much issue as I dont think this lib will be updated often, mostly due to change in logs definition).github/workflows/timber.yml
- buiild and testParser
logwriter/fluent-plugin-upi-logs/lib/fluent/plugin/parser_upi_logs.rb
- Main parser implementationlogwriter/fluent-plugin-upi-logs/test/plugin/test_parser_upi_logs.rb
- Unit testTesting
fluent-plugin-upi-logs-0.0.0.dev.2 is built locally for testing. Using a local fluentd deployment (not part of this PR), the parser is imported in fluentd.conf using kafka source and stdout+bq as sink
BQ Schema
Stdout
BQ
sample-outout.txt