Skip to content

Grpc response failures do not show up in app insights #9361

@ejizba

Description

@ejizba

Background

When a worker returns a response to grpc startup requests WorkerInit, FunctionsMetadata, and FunctionEnvironmentReload, it can specify the status as "Failure" with an exception included. Starting with the new programming models for Node.js and Python, this is where the worker will load the user's app and parse their functions, so errors here will be common (file doesn't exist, simple syntax error, etc.). However, these exceptions are never forwarded along to the user's app insights and thus they don't know why their app isn't working in Azure. Instead all you see are generic errors like this:

No job functions found. Try making your job classes and methods public.

A host error has occurred during startup operation

Exceeded language worker restart retry count for runtime:node.

The Node.js worker will log the error as a system log, but because of #9360 the user still doesn't see it. I'm filing this issue as a potential smaller enhancement that the host could do instead of fixing the overarching problem of missing worker logs.

Proposed change

I'd like the init, metadata, & envReload response exceptions to be forwarded to the user's app insights. These three should cover our most important errors we want to show the user, although of course in an ideal world we fix #9360 so that we get all worker logs.

Repro steps

Here's an example Node.js repro app that will fail and include the error in the indexing request: https://github.com/ejizba/func-indexing-error

cc @brettsam who I've been discussing this with

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions