question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improved integration for Azure Functions

See original GitHub issue

Azure functions support DI.

Right now the entry point is on IWebHost. This is not expose on serverless environments. Which means users need to Init and Dispose the SDK on each execution or some other work around that at Init once but await SentrySdk.FlushAsync by hand.

This task is to improve the story so that it’s easy to plug Sentry’s SDK with Azure Functions via DI (i.e: single Hook into IFunctionsHostBuilder).

Related to #730 #529

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:24 (14 by maintainers)

github_iconTop GitHub Comments

4reactions
mattjohnsonpintcommented, May 22, 2023

Our initial support for Azure Functions (isolated worker) has been released. (Thanks @SeanFeldman!)

You’ll find it on Nuget as Sentry.AzureFunctions.Worker NuGet

Documentation is pending. For now, see the sample at https://github.com/getsentry/sentry-dotnet/blob/main/samples/Sentry.Samples.AzureFunctions.Worker/Program.cs.

Please leave any general feedback here on this issue, but open a new issue for any bugs or significant oversights.

Note, we do not have a version for in-process functions ready at this time, but may in the future. Thanks.

4reactions
SeanFeldmancommented, May 10, 2023

High-level plan

Azure Functions has undergone a significant change in the last few years. A big investment was made into Isolated Worker SDK (Out of Process). The Isolated worker SDK is the recommended way to build Azure Functions. In-Process SDK is still supported but not for long. More about the Azure Functions roadmap here.

The plan for Sentry support is to build first-class support for the Isolated Worker SDK and introduce an equivalent, if possible, for In-Process SDK. High-level objectives are:

  • .UseSentry() on the Functions specific host builder API to be consistent with other .NET technologies such as ASP.NET Core.
  • Setting optimal defaults
  • Automatically track errors, sessions (release health), and performance
  • Manage transaction names according to the trigger type in a way that makes sense (HTTP route for HTTP triggered functions vs alternative for non-HTTP triggers) --> reflection workaround. Tracking issue with Functions SDK here.
  • Out-of-the-box exception processor that cleans up the data that’s getting logged
  • Functions cancellation token to mark Sentry transaction as Cancelled
  • Support for triggers
    • HTTP
    • Timer
    • Blob, Storage queue, Azure Service Bus, etc will follow the same pattern
  • Add a sample
  • Deduplication of Sentry tags (AzureFunctions_FunctionName vs functionName)
    • Replace with tag filters --> PR #2360
  • Review support for In-Proc SDK support
  • Usage Documentation
Read more comments on GitHub >

github_iconTop Results From Across the Web

General availability: Improved scaling model for Azure ...
Target based scaling is an improvement on the Azure Functions Consumption and Premium plans scaling experience, providing a faster and more ...
Read more >
Azure Functions Integration
WARNING: This integration guide is an evolving document. It gets updated any time we find better ways to integrate Simple Injector with Azure...
Read more >
Improved Durable Functions coming to Microsoft's Azure ...
Microsoft's Anirudh Garg, who leads the engineering team for Azure Functions, has posted abut planned improvements to the service for 2023, ...
Read more >
Azure Functions and its Complete Overview
Easy Integration with Other Azure services – Azure Functions can be easily integrated with the other Azure Services like Azure Service bus, Event...
Read more >
Why use Azure Functions to Facilitate Data Integration ...
This article will cover exactly where and when Azure Functions can be leveraged within a data integration development pattern.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found