Skip to content
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

DOCS-9940: Serverless Monitoring for Azure Functions #27294

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Duncan Harvey <35278470+duncanpharvey@users.noreply.github.com>
  • Loading branch information
cswatt and duncanpharvey authored Feb 10, 2025
commit 63d27c19d567a656987994db382782c3e979bcce
19 changes: 9 additions & 10 deletions content/en/serverless/azure_functions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<!-- TODO: some more preamble -->

This page explains how to collect traces from your Azure Functions. To collect metrics, install the [Datadog Azure integration][6].
This page explains how to collect traces, trace metrics, runtime metrics, and custom metrics from your Azure Functions. To collect additional metrics, install the [Datadog Azure integration][6].

## Setup

Expand All @@ -23,7 +23,7 @@

To use [automatic instrumentation][2], you must use `dd-trace` v4.48+ (v4 release line) or v5.25+ (v5 release line).

Datadog recommends pinning the package versions and regularly upgrading to the latest versions of both `@datadog/serverless-compat` and `dd-trace` to ensure you have access to enhancements and bug fixes.

Check notice on line 26 in content/en/serverless/azure_functions/_index.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.

2. **Start the Datadog serverless compatibility layer and initialize the Node.js tracer**. Add the following lines to your main application entry point file (for example, `app.js`):

Expand Down Expand Up @@ -71,15 +71,14 @@
- Set `DD_API_KEY` to your [Datadog API key][1].
- Set `DD_SITE` to {{< region-param key=dd_site code="true" >}}. (Ensure that your correct [Datadog site][2] is selected in the drop-down on the right side of this page.)

5. **Correlate traces with metrics by setting tags**. You can collect metrics from your Azure Functions by installing the [Datadog Azure integration][6]. To correlate these metrics with your traces, configure the following tags as environment variables. You can add custom tags as `DD_TAGS`.

```
DD_ENV="<ENVIRONMENT>"
DD_SERVICE="<SERVICE_NAME>"
DD_VERSION="<VERSION>"
DD_TAGS="<KEY_1:VALUE_1>,<KEY_2:VALUE_2>"
```
5. **Unified Service Tagging**. You can collect metrics from your Azure Functions by installing the [Datadog Azure integration][6]. To correlate these metrics with your traces, first set the `env`, `service`, and `version` tags on your resource in Azure. Then configure the following environment variables. You can add custom tags as `DD_TAGS`.

```
DD_ENV="<ENVIRONMENT>"
DD_SERVICE="<SERVICE_NAME>"
DD_VERSION="<VERSION>"
DD_TAGS="<KEY_1:VALUE_1>,<KEY_2:VALUE_2>"
```
## View traces in Datadog

In Datadog, navigate to the [Trace Explorer][4] page and search for the service name you set in the `DD_SERVICE` environment variable
Expand All @@ -98,7 +97,7 @@
**Values**: `true`, `false`

`DD_LOG_LEVEL`
: Sets logging level for the Datadog Serverless Agent. Defaults to `info`.
: Sets logging level for the Datadog Serverless Compatibility Layer. Defaults to `info`.

**Values**: `trace`, `debug`, `info`, `warn`, `error`, `critical`, `off`

Expand Down
Loading