-
Notifications
You must be signed in to change notification settings - Fork 24
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
Feature parity for structlog #73
Comments
Thanks for the request! |
Just came by here. Maybe I'm mistaken, but it also appears that the structlog processor doesn't add correlation data from Elastic APM, even though the docs sounds like this is automatic for both stdlib logger and structlog: https://www.elastic.co/guide/en/ecs-logging/python/current/installation.html#correlation |
@HenrikOssipoff the |
I had some issues using Example: structlog.configure(
processors=[
structlog.contextvars.merge_contextvars,
structlog.processors.CallsiteParameterAdder(
{
structlog.processors.CallsiteParameter.FILENAME,
structlog.processors.CallsiteParameter.FUNC_NAME,
structlog.processors.CallsiteParameter.LINENO,
}
),
ecs_logging.StructlogFormatter(),
],
wrapper_class=structlog.stdlib.BoundLogger,
logger_factory=structlog.PrintLoggerFactory(),
cache_logger_on_first_use=True,
) |
@jasperjonker correct -- typically you wouldn't want a processor that both enriches and converts to JSON -- you would want those to be separate processors. But in this case we have a custom |
The structlog logger only sets the log level, timestamp and log message while the stdlib logger is setting a lot of more stuff like exceptions, stack infos, thread/process infos. It would be great to have a feature parity here.
The text was updated successfully, but these errors were encountered: