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

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

Open
studiogangster opened this issue Dec 4, 2020 · 3 comments
Open

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

studiogangster opened this issue Dec 4, 2020 · 3 comments

Comments

@studiogangster
Copy link

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

@studiogangster studiogangster changed the title Add Function's TraceID in logs to trace individual function call & track progress (stderr & stdout) Add Function's TraceID in logs to trace individual function call & track progress Dec 4, 2020
@alexellis
Copy link
Member

/set title: [Feature request] Add X-Call-Id to log lines

@derek derek bot changed the title Add Function's TraceID in logs to trace individual function call & track progress [Feature request] Add X-Call-Id to log lines Dec 4, 2020
@alexellis
Copy link
Member

Thanks for using OpenFaaS. We'll consider this request in our next triage meeting.

In the meantime, I would suggest taking a look at what we have to offer companies adopting OpenFaaS for commercial use. https://www.openfaas.com/support/ and openfaas/faas#1591

@alexellis
Copy link
Member

Related to #75

In which case, using the call ID in the log line goes against the other ask to pass through text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants