fork download
  1. mapping.yml: |-
  2. ---
  3. mappings:
  4. # Airflow StatsD metrics mappings (https://a...content-available-to-author-only...e.org/docs/apache-airflow/stable/logging-monitoring/metrics.html)
  5. # === Counters ===
  6. - match: "(.+)\\.(.+)_start$"
  7. match_metric_type: counter
  8. name: "af_agg_job_start"
  9. match_type: regex
  10. labels:
  11. airflow_id: "$1"
  12. job_name: "$2"
  13. - match: "(.+)\\.(.+)_end$"
  14. match_metric_type: counter
  15. name: "af_agg_job_end"
  16. match_type: regex
  17. labels:
  18. airflow_id: "$1"
  19. job_name: "$2"
  20. - match: "(.+)\\.operator_failures_(.+)$"
  21. match_metric_type: counter
  22. name: "af_agg_operator_failures"
  23. match_type: regex
  24. labels:
  25. airflow_id: "$1"
  26. operator_name: "$2"
  27. - match: "(.+)\\.operator_successes_(.+)$"
  28. match_metric_type: counter
  29. name: "af_agg_operator_successes"
  30. match_type: regex
  31. labels:
  32. airflow_id: "$1"
  33. operator_name: "$2"
  34. - match: "*.ti_failures"
  35. match_metric_type: counter
  36. name: "af_agg_ti_failures"
  37. labels:
  38. airflow_id: "$1"
  39. - match: "*.ti_successes"
  40. match_metric_type: counter
  41. name: "af_agg_ti_successes"
  42. labels:
  43. airflow_id: "$1"
  44. - match: "*.zombies_killed"
  45. match_metric_type: counter
  46. name: "af_agg_zombies_killed"
  47. labels:
  48. airflow_id: "$1"
  49. - match: "*.scheduler_heartbeat"
  50. match_metric_type: counter
  51. name: "af_agg_scheduler_heartbeat"
  52. labels:
  53. airflow_id: "$1"
  54. - match: "*.dag_processing.processes"
  55. match_metric_type: counter
  56. name: "af_agg_dag_processing_processes"
  57. labels:
  58. airflow_id: "$1"
  59. - match: "*.scheduler.tasks.killed_externally"
  60. match_metric_type: counter
  61. name: "af_agg_scheduler_tasks_killed_externally"
  62. labels:
  63. airflow_id: "$1"
  64. - match: "*.scheduler.tasks.running"
  65. match_metric_type: counter
  66. name: "af_agg_scheduler_tasks_running"
  67. labels:
  68. airflow_id: "$1"
  69. - match: "*.scheduler.tasks.starving"
  70. match_metric_type: counter
  71. name: "af_agg_scheduler_tasks_starving"
  72. labels:
  73. airflow_id: "$1"
  74. - match: "*.scheduler.orphaned_tasks.cleared"
  75. match_metric_type: counter
  76. name: "af_agg_scheduler_orphaned_tasks_cleared"
  77. labels:
  78. airflow_id: "$1"
  79. - match: "*.scheduler.orphaned_tasks.adopted"
  80. match_metric_type: counter
  81. name: "af_agg_scheduler_orphaned_tasks_adopted"
  82. labels:
  83. airflow_id: "$1"
  84. - match: "*.scheduler.critical_section_busy"
  85. match_metric_type: counter
  86. name: "af_agg_scheduler_critical_section_busy"
  87. labels:
  88. airflow_id: "$1"
  89. - match: "*.sla_email_notification_failure"
  90. match_metric_type: counter
  91. name: "af_agg_sla_email_notification_failure"
  92. labels:
  93. airflow_id: "$1"
  94. - match: "*.ti.start.*.*"
  95. match_metric_type: counter
  96. name: "af_agg_ti_start"
  97. labels:
  98. airflow_id: "$1"
  99. dag_id: "$2"
  100. task_id: "$3"
  101. - match: "*.ti.finish.*.*.*"
  102. match_metric_type: counter
  103. name: "af_agg_ti_finish"
  104. labels:
  105. airflow_id: "$1"
  106. dag_id: "$2"
  107. task_id: "$3"
  108. state: "$4"
  109. - match: "*.dag.callback_exceptions"
  110. match_metric_type: counter
  111. name: "af_agg_dag_callback_exceptions"
  112. labels:
  113. airflow_id: "$1"
  114. - match: "*.celery.task_timeout_error"
  115. match_metric_type: counter
  116. name: "af_agg_celery_task_timeout_error"
  117. labels:
  118. airflow_id: "$1"
  119.  
  120. # === Gauges ===
  121. - match: "*.dagbag_size"
  122. match_metric_type: gauge
  123. name: "af_agg_dagbag_size"
  124. labels:
  125. airflow_id: "$1"
  126. - match: "*.dag_processing.import_errors"
  127. match_metric_type: gauge
  128. name: "af_agg_dag_processing_import_errors"
  129. labels:
  130. airflow_id: "$1"
  131. - match: "*.dag_processing.total_parse_time"
  132. match_metric_type: gauge
  133. name: "af_agg_dag_processing_total_parse_time"
  134. labels:
  135. airflow_id: "$1"
  136. - match: "*.dag_processing.last_runtime.*"
  137. match_metric_type: gauge
  138. name: "af_agg_dag_processing_last_runtime"
  139. labels:
  140. airflow_id: "$1"
  141. dag_file: "$2"
  142. - match: "*.dag_processing.last_run.seconds_ago.*"
  143. match_metric_type: gauge
  144. name: "af_agg_dag_processing_last_run_seconds"
  145. labels:
  146. airflow_id: "$1"
  147. dag_file: "$2"
  148. - match: "*.dag_processing.processor_timeouts"
  149. match_metric_type: gauge
  150. name: "af_agg_dag_processing_processor_timeouts"
  151. labels:
  152. airflow_id: "$1"
  153. - match: "*.executor.open_slots"
  154. match_metric_type: gauge
  155. name: "af_agg_executor_open_slots"
  156. labels:
  157. airflow_id: "$1"
  158. - match: "*.executor.queued_tasks"
  159. match_metric_type: gauge
  160. name: "af_agg_executor_queued_tasks"
  161. labels:
  162. airflow_id: "$1"
  163. - match: "*.executor.running_tasks"
  164. match_metric_type: gauge
  165. name: "af_agg_executor_running_tasks"
  166. labels:
  167. airflow_id: "$1"
  168. - match: "*.pool.open_slots.*"
  169. match_metric_type: gauge
  170. name: "af_agg_pool_open_slots"
  171. labels:
  172. airflow_id: "$1"
  173. pool_name: "$2"
  174. - match: "*.pool.queued_slots.*"
  175. match_metric_type: gauge
  176. name: "af_agg_pool_queued_slots"
  177. labels:
  178. airflow_id: "$1"
  179. pool_name: "$2"
  180. - match: "*.pool.running_slots.*"
  181. match_metric_type: gauge
  182. name: "af_agg_pool_running_slots"
  183. labels:
  184. airflow_id: "$1"
  185. pool_name: "$2"
  186. - match: "*.pool.starving_tasks.*"
  187. match_metric_type: gauge
  188. name: "af_agg_pool_starving_tasks"
  189. labels:
  190. airflow_id: "$1"
  191. pool_name: "$2"
  192. - match: "*.smart_sensor_operator.poked_tasks"
  193. match_metric_type: gauge
  194. name: "af_agg_smart_sensor_operator_poked_tasks"
  195. labels:
  196. airflow_id: "$1"
  197. - match: "*.smart_sensor_operator.poked_success"
  198. match_metric_type: gauge
  199. name: "af_agg_smart_sensor_operator_poked_success"
  200. labels:
  201. airflow_id: "$1"
  202. - match: "*.smart_sensor_operator.poked_exception"
  203. match_metric_type: gauge
  204. name: "af_agg_smart_sensor_operator_poked_exception"
  205. labels:
  206. airflow_id: "$1"
  207. - match: "*.smart_sensor_operator.exception_failures"
  208. match_metric_type: gauge
  209. name: "af_agg_smart_sensor_operator_exception_failures"
  210. labels:
  211. airflow_id: "$1"
  212. - match: "*.smart_sensor_operator.infra_failures"
  213. match_metric_type: gauge
  214. name: "af_agg_smart_sensor_operator_infra_failures"
  215. labels:
  216. airflow_id: "$1"
  217.  
  218. # === Timers ===
  219. - match: "*.dagrun.dependency-check.*"
  220. match_metric_type: observer
  221. name: "af_agg_dagrun_dependency_check"
  222. labels:
  223. airflow_id: "$1"
  224. dag_id: "$2"
  225. - match: "*.dag.*.*.duration"
  226. match_metric_type: observer
  227. name: "af_agg_dag_task_duration"
  228. labels:
  229. airflow_id: "$1"
  230. dag_id: "$2"
  231. task_id: "$3"
  232. - match: "*.dag_processing.last_duration.*"
  233. match_metric_type: observer
  234. name: "af_agg_dag_processing_duration"
  235. labels:
  236. airflow_id: "$1"
  237. dag_file: "$2"
  238. - match: "*.dagrun.duration.success.*"
  239. match_metric_type: observer
  240. name: "af_agg_dagrun_duration_success"
  241. labels:
  242. airflow_id: "$1"
  243. dag_id: "$2"
  244. - match: "*.dagrun.duration.failed.*"
  245. match_metric_type: observer
  246. name: "af_agg_dagrun_duration_failed"
  247. labels:
  248. airflow_id: "$1"
  249. dag_id: "$2"
  250. - match: "*.dagrun.schedule_delay.*"
  251. match_metric_type: observer
  252. name: "af_agg_dagrun_schedule_delay"
  253. labels:
  254. airflow_id: "$1"
  255. dag_id: "$2"
  256. - match: "*.scheduler.critical_section_duration"
  257. match_metric_type: observer
  258. name: "af_agg_scheduler_critical_section_duration"
  259. labels:
  260. airflow_id: "$1"
  261. - match: "*.dagrun.*.first_task_scheduling_delay"
  262. match_metric_type: observer
  263. name: "af_agg_dagrun_first_task_scheduling_delay"
  264. labels:
  265. airflow_id: "$1"
  266. dag_id: "$2"
  267.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:1: error: unknown type name 'mapping'
mapping.yml: |-
^
prog.cpp:1:8: error: cannot use dot operator on a type
mapping.yml: |-
       ^
prog.cpp:4:7: error: invalid preprocessing directive
    # Airflow StatsD metrics mappings (https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/metrics.html)
      ^
prog.cpp:5:7: error: invalid preprocessing directive
    # === Counters ===
      ^
prog.cpp:120:7: error: invalid preprocessing directive
    # === Gauges ===
      ^
prog.cpp:218:7: error: invalid preprocessing directive
    # === Timers ===
      ^
6 errors generated.
stdout
Standard output is empty