fluent / fluent-operator

Operate Fluent Bit and Fluentd in the Kubernetes way - Previously known as FluentBit Operator
Apache License 2.0
578 stars 246 forks source link

Add log to metrics plugin #1305

Closed Athishpranav2003 closed 1 month ago

Athishpranav2003 commented 1 month ago

What this PR does / why we need it:

Add LogToMetrics Filter plugin

Which issue(s) this PR fixes:

Fixes #1285

Does this PR introduced a user-facing change?

Nope

Add `LogToMetrics` Filter plugin to Fluentbit component 

Additional documentation, usage docs, etc.:

Updated in the codebase itself.

Athishpranav2003 commented 1 month ago

@cosmo0920 the build is failing for some other reason. I have raised PR so that we can get started with the discussions. Meanwhile i will try to look at the build issue. Also running make is actually modifying some other files dont know why. Would need your help in this part.

Do we need to add tests for this plugin?

Athishpranav2003 commented 1 month ago

@benjaminhuo Now the local build is working. I guess make is autoformatting the code and wantedly changing

        modified:   apis/fluentbit/v1alpha2/plugins/filter/zz_generated.deepcopy.go
    modified:   apis/fluentbit/v1alpha2/zz_generated.deepcopy.go
    modified:   go.mod
    modified:   go.sum

Not sure why. I removed those changes and then pushed it for now

Athishpranav2003 commented 1 month ago

@benjaminhuo push to ghcr seems to fail (403 error code). I guess thats issue with some configuration in gcp i guess. Does this seem fine now?

Athishpranav2003 commented 1 month ago

@cosmo0920 Could you check the PR? i have addressed your comments

benjaminhuo commented 1 month ago

Not sure why. I removed those changes and then pushed it for now

The auto-generated files shouldn't be removed. You should run make manifests generate fmt vet docs-update or even make test docs-update and commit everything generated @Athishpranav2003

Athishpranav2003 commented 1 month ago

Ok fine Will do it and update

Athishpranav2003 commented 1 month ago

@benjaminhuo Have added them too as well

cosmo0920 commented 1 month ago

I put an approve and kicked CI tasks as well.

Athishpranav2003 commented 1 month ago

@cosmo0920 seems like its passing the tests. Anything else i missed?

Athishpranav2003 commented 1 month ago

@benjaminhuo addressed your comments. I wasnt sure about the convention part that you guys followed

benjaminhuo commented 1 month ago

@benjaminhuo addressed your comments. I wasnt sure about the convention part that you guys followed

Thanks for the contribution! @Athishpranav2003