-
Notifications
You must be signed in to change notification settings - Fork 49
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 group name key #49
Conversation
Thank you for this contribution! I did some manual testing with your code changes and am running into an issue. Here's the verbose output:
I may be doing something wrong, but I'll expand on what I'm doing to produce this result. I have a dummy app that spits out log messages at a specific interval. If I run Fluent Bit with the configuration outlined in the invocation above everything works great. The log group gets created from the If I leave Fluent Bit running, but modify my dummy app and restart it (key here is a new |
Weird, I just tried to reproduce what you described but it works for me. Whatever log comes in after fluent-bit starts creates its log group properly and starts shipping. I use a quite common config:
The lua function adds
|
I found what's causing the issue I ran into. I specified func (output *OutputPlugin) getLogStream(tag, groupName string) (*logStream, error) {
// find log stream by tag
name := output.getStreamName(tag)
stream, ok := output.streams[name]
if ok {
return stream, nil
} Removing the |
Would you agree that this is an edge case that can be addressed after this is merged? If this doesn't break the status quo, let's be pragmatic and merge it so that it can already bring value. |
We understand and really appreciate your contribution. Would you be open to merging your changes into an upstream branch that isn't I did a bit more digging and I think the simplest approach might be to store and retrieve the |
I am totally open to merging this to another upstream branch. Just let me know where and I'll update the PR. |
Awesome, I created a |
Cool, done. |
@hossain-rayhan, @hencrice, can we move forward or is there anything that I can do to unblock this? |
Sorry wasn't aware I was assigned on this until now. Will take a look tomorrow |
cloudwatch/cloudwatch.go
Outdated
if ok { | ||
return stream, nil | ||
} | ||
// extra check, empty groupName indicates flush phase, but still land here meaning unable to find stream |
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.
nit: seems like this is no longer the case, could you remove this comment?
I am also confused how this could end up on a dead track. The implementation is working (we use it in production) and imho ready for a merge into master. What's the blocker? |
@davidnewhall @kwizzn The comments that @sonofachamp raised need to be fixed before it can be merged to master. Someone on our team will eventually take this up, but it's not our highest priority item, so possibly not for a little while. |
Before this change there was only 1 log group ever to track, now their can be multiple. Which means the plugin needs to store a map of log group name => log stream names. That needs to be done before it can be release-ready IMO. |
Thanks for the explanation. I'll try to dig around in this branch this week. Maybe I can figure it out, but I don't want to give any promises. I think the approach for this changes slightly after #78, and may even be easier. We shall see. |
Issue #46
Add support for dynamic log group names via a
log_group_name_key
option.This picks up the work from @owlwalks and replaces PR #24.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.