-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
base: master
Are you sure you want to change the base?
Conversation
Preview links (active after the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this started @cswatt! Let me know what you think about my suggestions.
Can we mention that we support runtime metrics and custom metrics and link the relevant documentation?
- https://docs.datadoghq.com/tracing/metrics/runtime_metrics/python/
- https://docs.datadoghq.com/tracing/metrics/runtime_metrics/nodejs
- https://docs.datadoghq.com/metrics/custom_metrics/dogstatsd_metrics_submission/
Could we also have more section (maybe under troubleshooting?) to document that if deploying to a Linux Consumption function with a Github Action that the "Using Azure Service Principal for RBAC as Deployment Credential" method needs to be used?
If your Azure Functions use a version of Node.js earlier than v18, ensure that you use a [compatible version of `dd-trace`][1]. | ||
|
||
To use [automatic instrumentation][2], you must use `dd-trace` v4.48+ (v4 release line) or v5.25+ (v5 release line). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the last week the v4 tracer release line status was updated to end of life. I think we can remove any references to the v4 release line and using versions of Node.js earlier than 18and instead just mention using v5.25+ for auto instrumentation.
pip install ddtrace | ||
``` | ||
|
||
You must use `ddtrace` v2.19+. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the same language here that we use for Node?
To use automatic instrumentation, you must use ddtrace v2.19+
`DD_TRACE_DEBUG` | ||
: Enables (`true`) or disables (`false`) debug logging for the Datadog Tracing Library. Defaults to `false`. | ||
|
||
**Values**: `true`, `false` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about linking to this page for tracer debug logs?
https://docs.datadoghq.com/tracing/troubleshooting/tracer_debug_logs/#enable-debug-mode
## 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 | ||
|
||
<!-- TODO: maybe some more here --> | ||
|
||
You can also view traces on the [Serverless > Azure Functions][5] page. This view is enriched with telemetry collected by the [Datadog Azure integration][6]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about a What's next? section like we have for AWS Lambda where we link to other pages that explain how to view traces in the trace explorer, serverless page, etc.?
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>" | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>" | |
``` |
|
||
<!-- TODO: some more preamble --> | ||
|
||
This page explains how to collect traces from your Azure Functions. To collect metrics, install the [Datadog Azure integration][6]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]. |
### Correlate logs and traces | ||
|
||
<!-- TODO: to be continued --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop this for now while we work on more logging capabilities
**Values**: `true`, `false` | ||
|
||
`DD_LOG_LEVEL` | ||
: Sets logging level for the Datadog Serverless Agent. Defaults to `info`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: Sets logging level for the Datadog Serverless Agent. Defaults to `info`. | |
: Sets logging level for the Datadog Serverless Compatibility Layer. Defaults to `info`. |
What does this PR do? What is the motivation?
Merge instructions
Merge readiness:
Merge queue is enabled in this repo. To have it automatically merged after it receives the required reviews, create the PR (from a branch that follows the
<yourname>/description
naming convention) and then add the following PR comment:Additional notes