Monitoring Azure Functions Service
The Azure Functions Service sensor is automatically deployed and installed after you install the Instana agent.
Note: For other supported Azure services, see Azure documentation.
Configuration
Make sure that Azure configuration is added to the agent configuration file <agentinstall_dir>/etc/instana/configuration.yaml
.
Azure Functions sensor can be disabled, and it can be filtered by tags and resource groups. You can configure Azure Functions sensor by using the agent configuration in <agentinstall_dir>/etc/instana/configuration.yaml
by:
com.instana.plugin.azure.functionapp:
# Valid values: true, false
enabled: false # enabled (true) by default
# Comma separated list of tags in key:value format
include_tags:
# Comma separated list of tags in key:value format
exclude_tags:
# Comma separated list of resource groups
include_resource_groups:
# Comma separated list of resource groups
exclude_resource_groups:
Azure Functions sensor can be disabled. To disable monitoring of the Azure Functions services, use the following configuration:
com.instana.plugin.azure.functionapp:
enabled: false
Multiple tags and resource groups can be defined, which are separated by a comma. Tags need to be provided as a key-value pair, which are separated by colon (:
). To make the configuration easier, you can define which tags and resource
groups you want to include in discovery or exclude from discovery. In case of defining tag or resource group in both lists (include and exclude), the exclude list has a higher priority. If there is no need for services filtering, don't define
the configuration. It's not mandatory to define all values to enable filtering.
To include services by tags into discovery, use the following configuration:
com.instana.plugin.azure.functionapp:
include_tags: # Comma separated list of tags in key:value format (e.g. env:prod,env:staging)
To exclude services by tags from discovery, use the following configuration:
com.instana.plugin.azure.functionapp:
exclude_tags: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)
To include services by resource groups into discovery, use the following configuration:
com.instana.plugin.azure.functionapp:
include_resource_groups: # Comma separated list of resource groups (e.g. rg_prod,rg_staging)
To exclude services by resource groups discovery, use the following configuration:
com.instana.plugin.azure.functionapp:
exclude_resource_groups: # Comma separated list of resource groups (e.g. rg_dev,rg_test)
Discovery filtering can be configured on the global level for all Azure services. In case of defining filters for Azure Functions service, global filters will be overridden. For more details about global Azure service discovery filtering, see Azure configuration.
Introducing Instana Tracing to Azure Functions Application
At the moment, these are requirements for using Instana with Azure Functions:
- Your Azure Function Application is .NET Core application.
- Your Azure Function Application is deployed on Azure using
Docker Container
option.
To make Instana work in your Azure Function Application, add the following lines to your Dockerfile
:
DOTNET_STARTUP_HOOKS="[AzureWebJobsScriptRoot]/bin/Instana.Tracing.Core.dll" \
CORECLR_ENABLE_PROFILING=1 \
CORECLR_PROFILER="{cf0d821e-299b-5307-a3d8-b283c03916dd}" \
CORECLR_PROFILER_PATH="[AzureWebJobsScriptRoot]/bin/instana_tracing/CoreProfiler.so" \
INSTANA_ENDPOINT_URL="[Serverless-ingress-URL-for-your-region]" \
INSTANA_AGENT_KEY="[Your-Instana-agent-key]"
INSTANA_ENDPOINT_URL
value depends on your region. For more information, see Endpoints for serverless monitoring documentation.
For more information about setting up Instana in .NET Core, see .NET Core documentation.
Instead of installing and using Instana Nuget packages, Azure Function Application requires that all Instana Nuget packages are copied to the release folder where the application is released on Azure. This is required when Azure Function Application
is deployed on Azure using Docker Container
option.
For more information about our packages, see .NET Tracing documentation.
Make sure that you are using the latest version by downloading latest Instana.Tracing.Core, Instana.Tracing.Core.Sdk and Instana.Tracing.Core.Rewriter.Linux packages.
After the downloading process is finished, copy the following files to some folders in your Azure Function Application, which is easily accessible from Dockerfile
:
Instana.Tracing.Core.dll
Instana.Tracing.Core.Common.dll
Instana.Tracing.Core.Instrumentation.dll
Instana.Tracing.Core.Transport.dll
Instana.Tracing.Api.dll
CoreProfiler.so
instrumentation.json
Then, copy these files to the release folder on Azure as follows:
COPY "/[path-to-your-patch-folder]/Instana.Tracing.Core.dll" "[AzureWebJobsScriptRoot]/bin/Instana.Tracing.Core.dll"
COPY "/[path-to-your-patch-folder]/Instana.Tracing.Core.Common.dll" "[AzureWebJobsScriptRoot]/bin/Instana.Tracing.Core.Common.dll"
COPY "/[path-to-your-patch-folder]/Instana.Tracing.Core.Instrumentation.dll" "[AzureWebJobsScriptRoot]/bin/Instana.Tracing.Core.Instrumentation.dll"
COPY "/[path-to-your-patch-folder]/Instana.Tracing.Core.Transport.dll" "[AzureWebJobsScriptRoot]/bin/Instana.Tracing.Core.Transport.dll"
COPY "/[path-to-your-patch-folder]/Instana.Tracing.Api.dll" "[AzureWebJobsScriptRoot]/bin/Instana.Tracing.Api.dll"
COPY "/[path-to-your-patch-folder]/CoreProfiler.so" "[AzureWebJobsScriptRoot]/bin/instana_tracing/CoreProfiler.so"
COPY "/[path-to-your-patch-folder]/instrumentation.json" "[AzureWebJobsScriptRoot]/bin/instana_tracing/instrumentation.json "
Note: Don't install the Instana.Tracing.Core
packages directly in your Azure Function Application. The tracing won't work if there are duplicated library files after the application is deployed.
Then, delete the Instana.Tracing.Core
packages, and follow the instructions that is already described in this topic for copying library files to the release folder inside your Dockerfile
.
Supported triggers
You can find the list of Azure Functions triggers that Instana supports. Some of them are tested so far and the behavior is known. For the rest of them, the instrumentation is still not tested. The following table will be updated as soon as the state changes.
One behavior is seen during testing, that is, if the Azure Function's Run method is STATIC, some missing data is inside the generated span, such as Function name
or even Trigger name
in case of Queue trigger. The reason for it is if the method is STATIC, Instana instrumentation can not collect all the necessary data about your Run method. You are recommended to use NON-STATIC methods
whenever possible.
Trigger Name | Tested | Visible span data with STATIC methods | Visible span data with NON-STATIC methods |
---|---|---|---|
Blob | Not tested. |
|
|
CosmosDB | Not tested. |
|
|
Event Grid | Not tested. |
|
|
Event Hub | Not tested. |
|
|
Kafka | Not tested. |
|
|
HTTP | Instrumentation works with both STATIC and NON-STATIC methods. | Trigger, Method name, Runtime | Trigger, Method name, Runtime, Function name |
Queue | Instrumentation works with only NON-STATIC methods. | Method name, Runtime | Trigger, Method name, Runtime, Function name |
RabbitMQ | Not tested. |
|
|
Service Bus | Not tested. |
|
|
SignalR | Not tested. |
|
|
Table | Not tested. |
|
|
Timer | Instrumentation works with both STATIC and NON-STATIC methods. | Trigger, Method name, Runtime | Trigger, Method name, Runtime, Function name |
Metrics collection
To view the metrics, select Infrastructure in the sidebar of the Instana user interface, click a specific monitored host, and then you can see a host dashboard with all the collected metrics and monitored processes.
Metrics for Functions Service are pulled every minute, which is the resolution that Azure provides for monitoring of these services.
Metric Name | Description |
---|---|
Requests | The total number of requests regardless of their resulting HTTP status code. For WebApps and FunctionApps. |
Bytes Received | The count of bytes received by Azure Spring Cloud from the clients. |
Bytes Sent | The count of bytes sent by Azure Spring Cloud to the clients. |
Http101 | The count of requests resulting in an HTTP status code 101. |
Http2xx | The count of requests resulting in an HTTP status code = 200 but < 300. |
Http3xx | The count of requests resulting in an HTTP status code = 300 but < 400. |
Http4xx | The count of requests resulting in an HTTP status code = 400 but < 500. |
Http5xx | The count of requests resulting in an HTTP status code = 500 but < 600. |
Memory Working Set | The current amount of memory used by the app, in MiB. For WebApps and FunctionApps. |
Average Memory Working Set | The average amount of memory used by the app, in megabytes (MiB). For WebApps and FunctionApps. |
Http Response Time | The time taken for the app to serve requests, in seconds. For WebApps and FunctionApps. |
IoReadBytesPerSecond | The rate at which the app process is reading bytes from I/O operations. For WebApps and FunctionApps. |
IoWriteBytesPerSecond | The rate at which the app process is writing bytes to I/O operations. For WebApps and FunctionApps. |
IoReadOperationsPerSecond | The rate at which the app process is issuing read I/O operations. For WebApps and FunctionApps. |
IoWriteOperationsPerSecond | The rate at which the app process is issuing write I/O operations. For WebApps and FunctionApps. |
RequestsInApplicationQueue | The number of requests in the application request queue. For WebApps and FunctionApps. |
HealthCheckStatus | Health check status. For WebApps and FunctionApps. |
FileSystemUsage | Percentage of filesystem quota consumed by the app. For WebApps and FunctionApps. |
Configuration data
FunctionApps
FunctionApp Service Details | Description |
---|---|
Id | The unique ID for Function App. |
Name | The name of the FunctionApp instance. |
Type | The FunctionApp type. |
Location | The region where the instance is located. |
Kind | Indicates the type of FunctionApp account. |
Subscription | The subscription ID of the FunctionApp service instance. |
Resource Group | The resource group of the FunctionApp service instance. |
State | Current deployment state of the instance. |
Functions
Functions Service Details | Description |
---|---|
Id | The unique ID for Function. |
Name | The name of the Functions service instance. |
Type | Functions Service type. |
Location | The region where the instance is located. |
Subscription | The subscription ID of the Functions service instance. |
Resource Group | The resource group of the Functions service instance. |