8000 Better parseable dumps/traces · Issue #2960 · haproxy/haproxy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Better parseable dumps/traces #2960

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

Closed
idl0r opened this issue May 5, 2025 · 6 comments
Closed

Better parseable dumps/traces #2960

idl0r opened this issue May 5, 2025 · 6 comments
Labels
type: feature This issue describes a feature request / wishlist.

Comments

@idl0r
Copy link
Contributor
idl0r commented May 5, 2025

Your Feature Request

Hi,

not sure if it's just for me or others as well. I thought it might be cool to have some kind of keyword in front of any dump/trace related message. Like in #2959 (comment)
Having something like:
May 5 16:35:40.996 n095143 haproxy[64306]: DEBUG ...
DEBUG or BACKTRACE or something
for every line would make grepping for it much easier.
One could easily do e.g. grep ': DEBUG '

Would that make sense?
Right now we have like gigabytes of logs where the http(s)log, tcplog and those mentioned are mixed. We could also improve our logging but it could be helpful for others as well, perhaps.

What are you trying to do?

N/A

Output of haproxy -vv

N/A
@idl0r idl0r added the type: feature This issue describes a feature request / wishlist. label May 5, 2025
@wtarreau
Copy link
Member
wtarreau commented May 5, 2025

That's a good idea. I think it could even be done before 3.2-final if we know exactly what we want, because it's not something that should disrupt users experience. And I agree that for setups with tens to hundreds of threads it could significantly ease the dump extraction from the logs.

@wtarreau
Copy link
Member
wtarreau commented May 6, 2025

Just to be certain, you'd want to have this as a prefix for every stdout/stderr line when emitting warnings and backtraces ? Because right now I'm reazlizing that it's already multiline output that is normally not sent to logs, so maybe it ends up mixed with logs via systemd or equivalent, but I would be sure not to make a mistake if that's the case.

@idl0r
Copy link
Contributor Author
idl0r commented May 6, 2025

Just to be certain, you'd want to have this as a prefix for every stdout/stderr line when emitting warnings and backtraces ?

Exactly.

Right now we're just matching the program name "haproxy" in syslog-ng and direct anything into a haproxy log.
Not sure if those traces are using a different facility / level, so I could otherwise just add some more conditions, like facility / level.

@wtarreau
Copy link
Member
wtarreau commented May 6, 2025

It's just that they're not sent as logs but really as stderr. Thus it's systemd which re-encodes them as syslog and passes them. But your point remains, even in this ecosystem I understand how it could be useful to have that. Ideally, if systemd was able to prepend a recognizable header (e.g. "stderr") in front of all of them, that would be very helpful. Right now the messages are written as multi-line blocks, and we'll have to find a way to post-process and reformat them to insert headers after each LF, which is not the most trivial to do where it happens (there's just a write() call).

@chipitsine
Copy link
Member

a naive question, but can't open telemetry be used to collect traces?

@idl0r
Copy link
Contributor Author
idl0r commented May 6, 2025

You're right. It probably comes directly from systemd/journald as I can see journald only has non http(s)log and tcplog logs, like the traces or warnings / notices. So that makes it easier for us to get those.
I initially thought they're sent trough the "log" directive.
So it's fine for me to leave it as it is then.

@idl0r idl0r closed this as completed May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature This issue describes a feature request / wishlist.
Projects
None yet
Development

No branches or pull requests

3 participants
0