azure-webjobs-sdk icon indicating copy to clipboard operation
azure-webjobs-sdk copied to clipboard

No dependency telemetry from webjob's IHostedService

Open dzendras opened this issue 2 years ago • 2 comments

A webjob hosts both a TimerTrigger and an implementation of IHostedService. Traces are collected when produced both from the triggered function and from the hosted service. However, dependency telemetry seems to be collected only from the triggered function.

Repro steps

Run the demo app attached. It attempts to read an entity off of an nonexistent table. I expect to see two failed dependencies in AI, but I get only one.

Expected behavior

(http://127.0.0.1:10002/devstoreaccount1/TimerTrigger(PartitionKey='Foo.PartitionKey',RowKey='Foo.RowKey') (http://127.0.0.1:10002/devstoreaccount1/HostedService(PartitionKey='HostedService.PartitionKey',RowKey='HostedService.RowKey')

Actual behavior

(http://127.0.0.1:10002/devstoreaccount1/TimerTrigger(PartitionKey='Foo.PartitionKey',RowKey='Foo.RowKey')

Known workarounds

I am not aware of any.

Related information

WebJobMissingDependencyTelemetry.zip

dzendras avatar Jan 20 '23 08:01 dzendras

@fabiocav Have you by any chance missed this ticket?

dzendras avatar Feb 01 '23 16:02 dzendras

@jviau Is there anyone responding to tickets? I have selected you as you seem to be active. Maybe you could pass this ticket to a relevant person?

dzendras avatar May 31 '23 06:05 dzendras