-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
We need to add observability capabilities to functions, which facilitate observing and tracking the operation of functions in large-scale scenarios.
Referring to #7, we can take the form of a plugin in functions-framework to wake up the observability component to run at a specific node.
For example, in functions-framework-go, we can add a plugin hook before and after the function is run, and run the logic related to the observability component in the hook.
Reference this:
func registerHTTPFunction(path string, fn func(http.ResponseWriter, *http.Request), h *http.ServeMux) error {
h.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
defer recoverPanicHTTP(w, "Function panic")
// execute pre-run plugins
fn(w, r)
// execute post-run plugins
})
return nil
}
We should also consider as much as possible the consistency of the scheme's implementation in different languages.
We can complete the details of the design of this solution in this document.
rainbend and FeynmanZhou
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done