You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
This branch contains the updated quick start guide for Azure Functions.
Closes: #15780
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/).
14
+
## Step 1: Install
15
15
16
-
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
16
+
Choose the features you want to configure, and this guide will show you how:
Sentry captures data by using an SDK within your application's runtime. This means that you have to add `@sentry/node` as a runtime dependency to your application:
24
+
### Install the Sentry SDK
25
+
26
+
Run the command for your preferred package manager to add `@sentry/node` as a runtime dependency to your application:
// Set sampling rate for profiling - this is relative to tracesSampleRate
60
62
profilesSampleRate:1.0,
61
63
// ___PRODUCT_OPTION_END___ profiling
64
+
// ___PRODUCT_OPTION_START___ logs
65
+
66
+
// Enable logs to be sent to Sentry
67
+
enableLogs:true,
68
+
// ___PRODUCT_OPTION_END___ logs
62
69
});
63
70
71
+
// your function code
72
+
```
73
+
74
+
### Capture Errors
75
+
76
+
Because Azure Functions are short-lived, you have to explicitly `flush` Sentry events after calling `captureException`, or they may be lost before being sent to Sentry.
77
+
78
+
```javascript {tabTitle:async}
79
+
constSentry=require("@sentry/node");
80
+
81
+
// your Sentry init code
82
+
64
83
module.exports=asyncfunction (context, req) {
65
84
try {
66
-
awaitnotExistFunction();
85
+
// Your function code
67
86
} catch (e) {
87
+
// use Sentry.withScope to enrich the event with request data
Check out Sentry's [Azure sample apps](https://github.com/getsentry/examples/tree/master/azure-functions/node) for detailed examples. Refer to the [JavaScript docs](/platforms/javascript/) for more configuration options.
uncaught exceptions, and unhandled rejections. If you have something that
5
+
looks like an exception, Sentry can capture it.
6
+
-[**Tracing**](/product/tracing): Track software performance while seeing the
7
+
impact of errors across multiple systems. For example, distributed tracing
8
+
allows you to follow a request from the frontend to the backend and back.
9
+
-[**Profiling**](/product/explore/profiling/): Gain deeper insight than traditional tracing without custom instrumentation, letting you discover slow-to-execute or resource-intensive functions in your app.
10
+
-[**Logs**](/product/explore/logs): Centralize and analyze your application logs to
11
+
correlate them with errors and performance issues. Search, filter, and
12
+
visualize log data to understand what's happening in your applications.
<Expandabletitle="Need help locating the captured errors in your Sentry project?">
2
+
3
+
1. Open the [**Issues**](https://sentry.io/orgredirect/organizations/:orgslug/issues) page and select an error from the issues list to view the full details and context of this error. For an interactive UI walkthrough, click [here](/product/sentry-basics/integrate-frontend/generate-first-error/#ui-walkthrough).
4
+
2. Open the [**Traces**](https://sentry.io/orgredirect/organizations/:orgslug/traces) page and select a trace to reveal more information about each span, its duration, and any errors. For an interactive UI walkthrough, click [here](/product/sentry-basics/distributed-tracing/generate-first-error/#ui-walkthrough).
5
+
3. Open the [**Profiles**](https://sentry.io/orgredirect/organizations/:orgslug/profiling) page, select a transaction, and then a profile ID to view its flame graph. For more information, click [here](/product/explore/profiling/profile-details/).
6
+
4. Open the [**Logs**](https://sentry.io/explore/logs) page and filter by service, environment, or search keywords to view log entries from your application. For an interactive UI walkthrough, click [here](/product/explore/logs/#overview).
0 commit comments