-
Notifications
You must be signed in to change notification settings - Fork 2.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
[receiver/awsfirehosereceiver] Add support to ingest logs from services that send directly to firehose #36184
Conversation
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.
Can you take a look at the failing checks?
type firehoseLog struct { | ||
Timestamp int64 `json:"timestamp"` | ||
FirehoseARN string `json:"firehoseARN"` | ||
Message string `json:"message"` | ||
} |
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.
Nothing produces JSON with these fields does it? IIUC it's just for passing around in memory? If that's the case, I'd suggest dropping the json:"..."
tags, as they confused me, and may confuse others.
This is unlike cwlog, where the cWLog
struct holds the JSON structure of logs coming from CloudWatch.
builders := make(map[resourceAttributes]*resourceLogsBuilder) | ||
for _, record := range records { | ||
var log firehoseLog | ||
log.Message = string(record) |
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.
This will lead to unparsed JSON stored in the log record body, right? Should we be attempting to decode the record as JSON, and storing that as a structured body?
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Description
Add support for logs sent from services directly to Firehose. For example VPC flow logs can be sent directly to Firehose and our
awsfirehosereceiver
should be able to process these requests on top of logs from CloudWatch.This introduces a new
record_type: firehoselogs
to separate the log type fromrecord_type: cwlogs
. Since there can be logs from different AWS services send directly to Firehose, the format will be different too. Thisrecord_type: firehoselogs
will process the request, store the whole record data intomessage
field, store the timestamp and firehose ARN.Link to tracking issue
#36379
Testing
Unit tests and manual smoke tests.
Documentation
Added a section in the README file.