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

log and tracing integration #103

Open
bavshin-f5 opened this issue Dec 24, 2024 · 0 comments
Open

log and tracing integration #103

bavshin-f5 opened this issue Dec 24, 2024 · 0 comments

Comments

@bavshin-f5
Copy link
Collaborator

We want to capture logs from external dependencies. This could be done by registering an implementation for the most popular log facades, log and tracing, with the latter one being optional, as it offers tracing/log or tracing/log-always feature flags for sending messages to the log.

Considerations:

  • Log messages should be mapped to an appropriate ngx_log_t instance: cycle, conf, connection, request or event. This may require a global mutable state with careful tracking of log ownership/lifetime.
  • ngx_log_t is not thread-safe. No surprises here, almost everything in NGINX is !Send + !Sync.
  • Needs to be opt-in, as the SDK users may have different ideas about the log destinations.
  • Would be nice to be able to filter, rate-limit or downgrade severity of the messages. E.g. if an error happens on every n-th request, then maybe it should be changed to a warning or even excluded from the logging.
    This could be omitted from the initial implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant