Skip to content

buffer: Use metrics plugin mechanism on a plugin base class#3484

Merged
cosmo0920 merged 3 commits into
fluent:masterfrom
cosmo0920:buffer-metrics-statistics
Aug 6, 2021
Merged

buffer: Use metrics plugin mechanism on a plugin base class#3484
cosmo0920 merged 3 commits into
fluent:masterfrom
cosmo0920:buffer-metrics-statistics

Conversation

@cosmo0920

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:
None

What this PR does / why we need it:
We should add more metrics plugin supported plugin base classes.
With these changes, our cmetrics metrics plugin also can work with Fluentd and Fluentd can handle native metrics to send prometheus format encodable metrics via fluent-plugin-metrics-cmetrics which binds cmetrics library.

Almost metrics plugin support will be handled in #statistics methods. So, it won't be caused significant performance degradation.

Docs Changes:
Needed.

Release Note:

Same as title.

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
…ot provided

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
… variable

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
@cosmo0920 cosmo0920 requested review from ashie and kenhys August 5, 2021 10:35
if type = (conf["@type"] || conf["type"])
"#{type}.#{self.plugin_id}"
else
"#{self.class.to_s.split("::").last.downcase}.#{self.plugin_id}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for out_file's default buffer plugin settings:
https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin/out_file.rb#L61-L65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants