|
1 |
| -# Azure functions (Private Beta) |
| 1 | +# Datadog-Azure function (Private Beta) |
2 | 2 |
|
3 |
| -Function used to forward Azure logs, including Activity and Diagnostic logs from EventHub. |
4 |
| -This is currently in Private beta, instructions and code are subject to modifications. |
| 3 | +The Datadog-Azure function is used to forward Azure logs to Datadog, including Activity and Diagnostic logs from EventHub. |
5 | 4 |
|
6 |
| -# Quick Start |
| 5 | +**This is currently in Private beta, instructions and code are subject to modifications.** |
7 | 6 |
|
8 |
| -The provided NodeJs script must be deployed into your Azure Functions service. We will explain how in this step-by-step tutorial. |
| 7 | +## Quick Start |
9 | 8 |
|
10 |
| -## 1. Create a new EventHub triggered function |
| 9 | +The provided Node.js script must be deployed into your Azure Functions service. Follow the tutorial below to learn how to do so: |
11 | 10 |
|
12 |
| -- Expand your function app and click the + button next to Functions. If this is the first function in your function app, select Custom function. This displays the complete set of function templates. |
13 |
| -- In the search field type `Event Hub` and choose `Event Hub Trigger` |
14 |
| -- Select the `Javascript` language in the right menu |
15 |
| -- Enter a name for the function |
16 |
| -- Add the wanted `Event Hub connection` or create a new one if you haven't have one already |
17 |
| -- Select the `Event Hub consumer group` and the `Event Hub Name` you want to pull logs from |
| 11 | +### 1. Create a new EventHub triggered function |
18 | 12 |
|
19 |
| -## 2. Provide the code |
| 13 | +- Expand your function application and click the `+` button next to `Functions`. If this is the first function in your function application, select `Custom function`. This displays the complete set of function templates. |
| 14 | +- In the search field type `Event Hub` and choose `Event Hub Trigger`. |
| 15 | +- Select the `Javascript` language in the right menu. |
| 16 | +- Enter a name for the function. |
| 17 | +- Add the wanted `Event Hub connection` or create a new one if you haven't have one already. |
| 18 | +- Select the `Event Hub consumer group` and the `Event Hub Name` you want to pull logs from. |
20 | 19 |
|
21 |
| -- Copy paste the code of the function |
22 |
| -- In the `Integrate` part, make sure the `Event Hub Cardinality` is set to `Many` |
| 20 | +### 2. Provide the code |
| 21 | + |
| 22 | +- Copy paste the code of the [Datadog-Azure function](./index.js) |
| 23 | +- In the `Integrate` part, `Event Hub Cardinality` must be set to `Many`. |
23 | 24 |
|
24 | 25 | ## Parameters
|
25 | 26 |
|
26 | 27 | - **API KEY**:
|
27 | 28 |
|
28 |
| -There are 2 possibilities to set your Datadog's API key (available in your Datadog platform): |
| 29 | +There are 2 possibilities to set your [Datadog's API key](https://app.datadoghq.com/account/settings#api): |
29 | 30 |
|
30 |
| -1. Replace `<your-api-key>` in the code with the API Key value |
| 31 | +1. Replace `<DATADOG_API_KEY>` in the code with your API Key value. |
31 | 32 | 2. Set the value through the `DD_API_KEY` environment variable
|
32 | 33 |
|
33 | 34 | - **Custom Tags**:
|
34 | 35 |
|
35 |
| -You have two options to add custom tags to your logs (tags must be a comma-separated list of strings): |
| 36 | +You have two options to add custom tags to your logs: |
36 | 37 |
|
37 | 38 | - Manually by editing the function code to add the tag list to the variable `DD_TAGS`
|
38 | 39 | - Automatically with the `DD_TAGS` environment variable
|
| 40 | + |
| 41 | +Learn more about Datadog tagging in our main [Tagging documentation](https://docs.datadoghq.com/tagging/). |
0 commit comments