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

integrations #2

Open
gedw99 opened this issue Nov 27, 2023 · 3 comments
Open

integrations #2

gedw99 opened this issue Nov 27, 2023 · 3 comments

Comments

@gedw99
Copy link

gedw99 commented Nov 27, 2023

Hey @samber

code works great at the moment. I am new to slog btw.

What's the best way to quickly get slog and nats working together for dog fooding features ?

If I had to guess, a typical dev would want to log to a nats leaf locally. The leaf would then under the hood sync the logs to some central server. This makes everything very async and so gives cpu and men back to the main app as quickly as possible.

https://docs.nats.io/running-a-nats-service/configuration/leafnodes has good info on it.

@samber
Copy link
Owner

samber commented Nov 27, 2023

I have no opinion since I never put NATS into production in any project.

The local log aggregators I know, are just some agent that are responsible for reading the logs in syslog, text files, etc...

Pushing to a local NATS server with proxying to a global cluster is not a common pattern, but i may be wrong since i probably not have as much experience as you with this message broker.

I there any consideration about this lib ? Does it require some changes ?

@gedw99
Copy link
Author

gedw99 commented Nov 27, 2023

changes

I have no opinion since I never put NATS into production in any project.

Well, I reckon this might be useful to NATS devs, since slog is first class golang std.

The local log aggregators I know, are just some agent that are responsible for reading the logs in syslog, text files, etc...

I log directly from the main app to NATS. Don't both hitting disk at all. Large Hyperscalers do this too like fly.io as far as I know. Mastercard and Telecoms run NATS also. No idea how they log.

Pushing to a local NATS server with proxying to a global cluster is not a common pattern, but i may be wrong since i probably not have as much experience as you with this message broker.

"Leaf nodes are useful in IoT and edge scenarios" aqs per its says in the link I sent. It's quite common to not use docker in edge cases. Been edge this way for a few years and before that with Tibco Rendezvous which is where NATS came from. Because NATS is so light and self protecting from the Sec ops POI, docker is not required on edge IMHO.

I there any consideration about this lib ? Does it require some changes ?

I don't think so right now. Early days though. I will work up an integration, and can feedback.

@samber
Copy link
Owner

samber commented Dec 6, 2023

I'm not sure to get the point of this issue.

Is there a different way to connect to a NATS server or local NAT leaf node?

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

No branches or pull requests

2 participants