apiVersion: v1
kind: ConfigMap
metadata:
  name: airflow-appinsight-statsd-config
data:
  appinsightsconfig.js: |
    {
      backends: ["appinsights-statsd"],  // [Required] The Application Insighst StatsD backend
      aiInstrumentationKey: process.env.APPLICATION_INSIGHTS_INSTRUMENTATION_KEY,  // [Required] Your instrumentation key
      aiPrefix: "osdu_airflow",  // [Optional] Send only metrics with this prefix
      aiRoleName: process.env.AIRFLOWROLE,  // [Optional] Add this role name context tag to every metric
      aiRoleInstance: process.env.HOSTNAME,  // [Optional] Add this role instance context tag to every metric
      aiTrackStatsDMetrics: true,  // [Optional] Send StatsD internal metrics to Application Insights
      log: {
          backend: "syslog",    // where to log: stdout or syslog [string, default: stdout]
          level: ""       // log level for [node-]syslog [string, default: LOG_INFO]
      },
      debug: false
    }