Skip to content

[Feature request] Add X-Call-Id to log lines #115

Open
@studiogangster

Description

Expected Behaviour

The function logs should also contain an TraceID, which can be used to debug a specific function call.

Current Behaviour

Current logs shows timestamp, stderr/stdout, and function's name as prefix

Possible Solution

Modify 'bindLoggingPipe' signature and include an argument for (prefix/tag/traceId: string) in./executor/logging.go: bindLoggingPipe()
The tag can be parsed from HTTP Request, and have a fallback with default prefix from the environment variable.

Context

I am using OpenFaas in the backend and triggering async call to the function via S2S call from our API Server.
This can be considered as a user created Job, which might take few minutes / hours to complete.
User can come back any time, and check the status / logs to track the progress of the Job ( at the frontend ).
I am persisting the logs with ELK, but to cater this use case, I would have to create a custom logging logic for each function.
Since, the platform allows different user to create custom functions, I don't want the enduser to implement this required logic, and have a centralised provision for the same.

Your Environment

Kubernetes

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions