]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
src/daemon/unit.h: Reference OpenTelemetry docs.
authorFlorian Forster <ff@octo.it>
Thu, 28 Dec 2023 08:04:57 +0000 (09:04 +0100)
committerFlorian Forster <octo@collectd.org>
Thu, 28 Dec 2023 19:50:08 +0000 (20:50 +0100)
Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
src/daemon/unit.h

index 0afe324f406a30f0737bab0bd80176a38349cc7e..93f522a75e3e7f13b2a75fe195188f937c700608 100644 (file)
 /* default_unit tries to guess a metric family's unit.
  *
  * If fam->unit is not NULL, that pointer is returned. Otherwise, the function
- * tries to heuristically determine a unit for th metric family. If successful,
- * a new string is allocated on the heap and returned. This string must be freed
- * using free(). If unsuccessful, NULL is returned.
+ * tries to heuristically determine a unit for the metric family, based on known
+ * OpenTelemetry metric names:
+ * https://opentelemetry.io/docs/specs/semconv/general/metrics/#instrument-naming
+ * If successful, a new string is allocated on the heap and returned. This string must
+ * be freed using free(). If unsuccessful, NULL is returned.
  *
  * This is designed to be used like this:
  *   fam->unit = default_unit(fam);