-
Notifications
You must be signed in to change notification settings - Fork 103
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
Log exporter individual log splitting #389
Conversation
exporter/collector/logs.go
Outdated
internalLogEntry.Resource = mr | ||
if splits > 1 { | ||
internalLogEntry.Split = &logpb.LogSplit{ | ||
Uid: entry.Timestamp.String(), |
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 needs some sort of salt to add more uniqueness. audit logs use a "~unique" process id
// Calculate the size of the internal log entry so this overhead can be accounted | ||
// for when determining the need to split based on payload size | ||
// TODO(damemi): Find an appropriate estimated buffer to account for the LogSplit struct as well | ||
logOverhead, err := l.logEntryToInternal(entry, logName, mr, 0, 0) |
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.
it's annoying that I need a duplicate logEntryToInternal
call, but we need the size of the proto before the payload is added to calculate the overhead, then we need to convert each complete logentry (w/payload) to a proto. maybe there is an optimization I'm not seeing
exporter/collector/logs.go
Outdated
continue | ||
} | ||
logName, err := l.getLogName(log) | ||
splitEntries, logName, err := l.logToSplitEntries( |
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.
we don't need to return logName from this anymore, right?
This sizes and splits individual log entries based on the default maximum quotas per cloud logging