This is the Fluentd output plugin for Azure Application Insights
Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms. Use it to monitor your live web application. It will automatically detect performance anomalies. It includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app. It's designed to help you continuously improve performance and usability.
$ gem install fluent-plugin-application-insights
To send data to Application Insights, add the following piece to your fluentd configuration file:
<match **>
@type application_insights
instrumentation_key <your instrumentation key>
</match>
Here is the configuration options for this plugin:
instrumentation_key
- Required, the Application Insights instrumentation keyservice_endpoint_uri
- The endpoint of the Application Insights for Azure Sovereign Cloudssend_buffer_size
- The batch size to send data to Application Insights service (default1000
). Setting this to a large size will usually result in better output throughput.standard_schema
- The parameter indicating whether the record is in standard schema. i.e., the format that is recognized by Application Insights backend (defaultfalse
). If the record is not in standard schema, it will be tracked as Application Insights trace telemetry. Otherwise, the record is just forwarded to the backend. See Standard Schema for more info.message_property
- The property name for the trace message (defaultmessage
).time_property
- The property name for the timestamp (defaultnil
).
Fluentd input plugin will assign a timestamp for each emitted record, and this timestamp is used as the telemetry creation time by default. Set thetime_property
if you want to use the value of this property instead of the one assigned by the input plugin.severity_property
- The property name for severity level (defaultseverity
). If the severity property doesn't exist, the record will be treated as information level. See Severity Level for more info.severity_level_verbose
- The value of severity property that maps to Application Insights' verbose severity level (defaultverbose
).severity_level_information
- The value of severity property that maps to Application Insights' information severity level (defaultinformation
).severity_level_warning
- The value of severity property that maps to Application Insights' warning severity level (defaultwarning
).severity_level_error
- The value of severity property that maps to Application Insights' error severity level (defaulterror
).severity_level_critical
- The value of severity property that maps to Application Insights' critical severity level (defaultcritical
).context_tag_sources
- The dictionary that instructs the Application Insights plugin to set Application Insights context tags using record properties.
In this dictionary keys are Application Insights context tags to set, and values are the source properties that are used to set the context tags value. For the source property, you can specify the property name or jsonpath like syntax for nested property, see record_accessor syntax for more info. For example:Here is the list of all context tag keyscontext_tag_sources { "ai.cloud.role": "kubernetes_container_name", "ai.cloud.roleInstance": "$.docker.container_id" }
The standard schema for Application Insights telemetry is defined here.
Below is an example of a Request telemetry in standard schema format. data
, data.baseType
and data.baseData
are required properties. Different telemetry types will have different properties associated with the baseData
object.
{
"name": "Microsoft.ApplicationInsights.Request",
"time": "2018-02-28T00:24:00.5676240Z",
"tags":{
"ai.cloud.role": "webfront",
"ai.cloud.roleInstance":"85a1e424491d07b6c1ed032f"
},
"data": {
"baseType": "RequestData",
"baseData": {
"ver":2,
"id":"|85a1e424-491d07b6c1ed032f.",
"name":"PUT Flights/StartNewFlightAsync",
"duration":"00:00:01.0782934",
"success":true,
"responseCode":"204",
"url":"http://localhost:5023/api/flights
}
}
Refer to Contributing Guide.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.