-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add OpenTelemetry support during function proxy #1684
Comments
@alexellis i have created a preview implementation. We could also decide to add basic tracing to the rest of the gateway endpoints as well, if you would like. |
Thanks for putting this together. It's on my radar and I've seen it. |
Please?Does the Java function template have a demo ? |
@berylshow do you mean a demo of tracing support in particular? No, I don't know of any demos for the java template. In general, OpenFaaS will forward all of the required http Headers, so you can probaby follow a generic Java tutorial for manually intrumenting your code. Unfortunately, I am not really a java developer so I am not aware of a good tutorial to recommend. |
When shall we expect this, it has been more than a year. |
Hi folks, we'd be looking for a paying customer to have a need for this and to sponsor the: initial development, and ongoing documentation, maintenance, testing and explanation of how this would and should work in OpenFaaS. Thanks again for your interest. If you'd like to tell us more about why you need this for your functions, we have a weekly call, and would welcome your input there. https://docs.openfaas.com/community/ If you'd like to discuss funding this work, feel free to reach out. Alex |
My actions before raising this issue
Expected Behaviour
During function proxy, the Gateway should be able to produce open telemetry spans.
Current Behaviour
There are no tracing spans
List All Possible Solutions and Workarounds
Which Solution Do You Recommend?
I recently did a walk-through for integrating OpenTelemetry with OpenFaaS functions and think it would be nice if the Gateway could produce an OpenTelemetry spans during function invocation. Adding tracing during the function proxy would provide a more accurate picture of the networking in the cluster and enable accurate assessments of the overhead (or lack thereof) from the Gateway.
We previously discussed this in general in #1354 but OpenTelemetry was not a active project at the time, only OpenTracing. OpenTelemetry. OpenTelemetry makes this integration much more feasbile now because we can more easily provide support for multiple exporters. Additionally, the OpenTelemetry providers generally allow all of the required configuration via env variables, which means the integration should require only minimal changes to the Gateway.
During the Gateway startup we would initialize and set the global tracing provider using something like this
We can then encapsulate all of the tracing specific code in the
Provider
implemenationInside the function invocation hanlder here
faas/gateway/handlers/forwarding_proxy.go
Line 55 in 8a87b57
This would then show as a new span named "Proxy" between the ingress and the function (if they have tracing enabled). There are a few other things we could do, e.g. adding the status code, original url, and request url as metadata to the span, but this is optional for a minimal implementation.
Steps to Reproduce (for bugs)
Context
https://github.com/LucasRoesler/openfaas-tracing-walkthrough
The text was updated successfully, but these errors were encountered: