Skip to content
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

Add fluentd to logging options #1

Closed
wants to merge 18 commits into from
Closed

Add fluentd to logging options #1

wants to merge 18 commits into from

Conversation

papey
Copy link

@papey papey commented Oct 20, 2020

What does this PR do?

This PR adds fluentd support to Traefik logger. (discussed on Discord for Traefik Hackaethon)

Motivation

This PR is inspired by traefik#2151

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

IMO, the main thing we need to discuss is how configuration is presented to end-user.

If needed I can work on multiple output support as requested in traefik#2151

@@ -24,6 +24,7 @@ type TraefikLog struct {
Level string `description:"Log level set to traefik logs." json:"level,omitempty" toml:"level,omitempty" yaml:"level,omitempty" export:"true"`
FilePath string `description:"Traefik log file path. Stdout is used when omitted or empty." json:"filePath,omitempty" toml:"filePath,omitempty" yaml:"filePath,omitempty"`
Format string `description:"Traefik log format: json | common" json:"format,omitempty" toml:"format,omitempty" yaml:"format,omitempty"`
Fluent string `description:"Fluent endpoint (format: http(s)://host:port)" json:"fluent,omitempty" toml:"fluent,omitempty" yaml:"fluent,omitempty"`

Choose a reason for hiding this comment

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

Should this be placed inside a Hook struct, where additional hooks can be added over time?

I'm also not convinced about the naming of this, it could be Provider, LogProvider, LoggingHook, WDYT?

@kevtainer
Copy link

I'm wondering what approach would be best for adding tests to this, documentation would also need to be included for this to make it into review.

@papey
Copy link
Author

papey commented Oct 20, 2020

I think dummy fluentd mockup could be enougth ?

@kevtainer
Copy link

I think dummy fluentd mockup could be enougth ?

i agree

@papey
Copy link
Author

papey commented Oct 21, 2020

Will working on tests, I test the case where traefik is stopped but fluentd is not available/down and the process hangs up for way to long. Working on something to get this working.

@papey
Copy link
Author

papey commented Oct 22, 2020

A unit test is available in https://github.com/bearstech/traefik/blob/add-fluentd/pkg/log/fluent_test.go. Should I go with documentation update ? @notsureifkevin

@papey
Copy link
Author

papey commented Oct 22, 2020

It also looks like that values are not quite good and traefik hangs up for too long is there is no available fluentd endpoint when exiting/restarting.

@papey papey self-assigned this Oct 22, 2020
@papey
Copy link
Author

papey commented Oct 22, 2020

If requested I can work on an integration test, just let me know !

Edit: I try this morning but I still have some errors...

@papey
Copy link
Author

papey commented Nov 4, 2020

Hey @notsureifkevin can I have some return on this PR, what are the next steps ? Thanks !

@papey papey removed their assignment Mar 21, 2022
@discostur
Copy link

Anything new on this? Cloud Native Proxie should be able to log to fluentd in 2022 ...

@papey
Copy link
Author

papey commented Mar 30, 2022

I tried to relaunch the discussion with Traefik but 🤷

@papey
Copy link
Author

papey commented Aug 8, 2022

Closing due to unresponsivess on Traefik side.

@papey papey closed this Aug 8, 2022
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.

3 participants