fnproject/fn

Opencensus span support for remote runners

bharadwr opened this issue · 0 comments

Remote runners (in pure_runner mode for instance) that do not have an exporter defined and cannot communicate due to firewall/egress rules need a way for their metrics to get into an opencensus span. Additionally, we can take this opportunity to add information about image pull times (if applicable), and perhaps image id to the span data.

Lightest way of doing this is adding extra fields to the callfinished proto, retrieve data as needed
This is better than a gin server log retriever on the runner, or any fluentd socat stuff. Also, this will run AFTER the function execution, and will not delay the execution.
Adding spans to runner_client.go, and span attribs will give users an effective means of getting remote runner data.

Formatting incoming invoke requests using ochttp format span name is also needed, floods the jaeger ui operation tab otherwise.

Can add a few attributes here for image pull duration, and imagename
https://github.com/fnproject/fn/blob/6cf4799410b5ea07aceac64e5424885513127ad8/api/agent/grpc/runner.proto#L40:L51