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

feat: wrap app with logger to duplicate stderr to syslog #8

Closed
wants to merge 1 commit into from

Conversation

grouville
Copy link
Member

@grouville grouville commented Jul 28, 2023

This PR experiments the wrapping of the registry-redirect app with the logger (https://man7.org/linux/man-pages/man1/logger.1.html) utility. We just wrap the binary at the publish step, with a debian buster-slim instance (alpine doesn't have all the proper dependencies to make rsyslogd work, or at least, I tried and figured out it would take some time to debug).

As a debug step, I am currently redirecting all the outputs to my ngrok address, linking to a local vector instance. Everything works as expected, even though I am getting errors after some time (we will need to dig into that):
image

In test prod: https://fly.io/apps/dagger-registry-2023-07-28. To test it out: visit dagger-registry-2023-07-28.fly.dev

This PR experiments the wrapping of the registry-redirect app with the logger (https://man7.org/linux/man-pages/man1/logger.1.html) utility.
We just wrap the binary at the publish step, with a debian buster-slim instance (alpine doesn't have all the proper dependencies to make rsyslogd work, or at least, I didn't take the time to check).

As a debug step, I am currently redirecting all the outputs to my ngrok address, linking to a local vector instance. Everything works as expected.

Signed-off-by: grouville <[email protected]>
@grouville grouville requested a review from gerhard July 28, 2023 15:53
@grouville
Copy link
Member Author

grouville commented Jul 28, 2023

Actually, it seems that we cannot recover the logs when rsyslog drops the connection. We might need to extend it's configuration to check that + use the process as suggested earlier today by gerhard (acts as a supervisor)

Open questions:

  1. Is it at the rsyslog configuration level (probably)
  2. Is it at the fly process level (potentially too)

@grouville
Copy link
Member Author

Following a verification with Gerhard, this has been deprecated in favor of #5. Even though this solution is elegant, we had some intermittent disconnect with the remote syslog server. Adding a new layer meant another layer to monitor and no control over the behavior on the server connection.

Moving the logic at the app level is now preferred

@grouville grouville closed this Aug 14, 2023
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.

1 participant