-
Notifications
You must be signed in to change notification settings - Fork 357
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
API Request -> ServiceBus -> WebJob = not logging end to end transactions #2849
Comments
Hi @CraigGraw , Thank you for your feedback! I checked this internally. We would like to know in what step the correlation broken. |
@v-bbalaiagar I have updated the original description to describe the difference in behaviour between the two ServiceBus packages when used with the WebJob SDK. Also I have added the source code for both of the tests using the old and new packages. To summerize I would expect application insights to be tracking the logs for both the request which sends the service bus message and the processing of the message from the queue (as it is doing in the previous ServiceBus package). I have tried all the options in the WebJob initialisation options but cannot get the behaviour seen before. |
Hi @RohitRanjanMS , Could you please look into this issue |
Adding @JoshLove-msft from the SDK team, @JoshLove-msft can you please have a look at this? |
This is due to the issue described here - microsoft/ApplicationInsights-dotnet#2151 |
@JoshLove-msft thank you for the link. |
you're right that the only supported SeriveBus SDK does not have proper integration with ApplicationInsights SDK yet. It's a gap and we're working on fixing it. In the meantime, can you please use a workaround?
You should see something like this Let us know if it helps! |
@lmolkova Thank you for the information. I have applied the recommended changes and committed them to github. https://github.com/CraigGraw/WebJobServiceBus/tree/master/ApplicationInsights There appears to be no difference to the Application Insights logs. Please let me know if the changes are correct. |
@CraigGraw It looks like there is no telemetry coming from your WebJob Application or it's not correlated. Let's check which case it is:
|
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
@lmolkova The value for OperationName is-> "ServiceBusSessionProcessor.ProcessSessionMessage" The telemetry for the HTTP client call is recorded but does not correlate. |
@CraigGraw Looks like this might be fixed in the next release 🙂 microsoft/ApplicationInsights-dotnet#2593 |
@CraigGraw ApplicationInsights |
@Bosch-Eli-Black https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging.ApplicationInsights Currently it is at version 3.0.33 which includes ApplicationInsights version 2.17.0 |
@CraigGraw there's a PR here #2906 waiting to be approved/merged |
When pushing messages onto a ServiceBus session queue from a HTTP request and then processing the message from a WebJob, Application insights no longer is able to correlate the log information in Azure as an end to end transaction.
Seen when using Azure.Messaging.ServiceBus
It only shows the ServiceBus send part of the transaction, not the dependency httpclient call when processing the message.
The same approach using the package 'Microsoft.Azure.ServiceBus' produces end to end transactions.
As can be seen here, the previous servicebus package when used with WebJob shows the dependency (httpClient call) on the processing of the message.
However the package 'Microsoft.Azure.ServiceBus' is deprecated and no longer supported.
https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/MigrationGuide.md
Tested with Azure Functions and end to end transactions are logging.
Appears to be something wrong in the WebJob SDK integration with Application Insights.
Repro steps
Provide the steps required to reproduce the problem
Sample projects:
https://github.com/CraigGraw/WebJobServiceBus/tree/master/ApplicationInsights (Azure.Messaging.ServiceBus)
https://github.com/CraigGraw/WebJobServiceBus-Deprecated/tree/master/ApplicationInsights (Microsoft.Azure.ServiceBus)
Expected behavior
Application Insights shows full end to end transaction details for the request.
Actual behavior
Application Insights shows only the post onto queue part of the transaction for the request.
Known workarounds
Revert to deprecated ServiceBus package 'Microsoft.Azure.ServiceBus'.
Related information
Provide any related information
.NetCore 3.1 (Tested and reproduced with .Net 6.0)
Microsoft.Azure.ServiceBus 7.7.0
https://github.com/CraigGraw/WebJobServiceBus/tree/master/ApplicationInsights (Azure.Messaging.ServiceBus)
https://github.com/CraigGraw/WebJobServiceBus-Deprecated/tree/master/ApplicationInsights (Microsoft.Azure.ServiceBus)
The text was updated successfully, but these errors were encountered: