Skip to content

[Feature Request] Log Forwarding Support for python-SDK #311

@samuelmakarovskiy

Description

@samuelmakarovskiy

Is your feature request related to a problem? Please describe.

Have noticed an interesting behavior that arose when all instances of a temporal server are brought down after a python worker has connected. The worker infinite retries polling to reconnect which is fine, but the real issue is that the console logs for the underlying rust core are not formatted like the python worker logic ones. See below:

�[2m2023-04-13T14:17:45.292663Z�[0m �[33m WARN�[0m �[1mtemporal_client::retry�[0m�[2m:�[0m gRPC call poll_workflow_task_queue retried 119 times �[3merror�[0m�[2m=�[0mStatus { code: Unavailable, message: "error trying to connect: dns error: failed to lookup address information: Name or service not known", source: Some(tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" })))) }

Fixing this would allow me to also guarantee any core issues can be detected by monitoring unified logs and not just stdout

Describe the solution you'd like

Couple of things would work

  1. Could turn off pretty printing for the rust core logs so that at least I can make my application stdout logs match more reliably
  2. The sdk could support passing back core logs to python like it does for typescript (and maybe other sdks). I see it's not supported in the code, but maybe worth clarifying why?

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions