mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 23:00:55 +00:00
Merge branch 'pratik/otel-phase8-log-correlation' into pratik/otel-phase9-metric-gap-fill
# Conflicts: # docker/telemetry/grafana/dashboards/rpc-pathfinding.json # src/libxrpl/telemetry/Telemetry.cpp
This commit is contained in:
@@ -66,4 +66,29 @@ otelUnitCode(Unit unit) noexcept
|
||||
return "ms";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Human-readable description for an instrument of this unit.
|
||||
*
|
||||
* Exported alongside the metric, so this is the text an operator reads in a
|
||||
* metric catalogue. A byte-valued instrument that describes itself as a
|
||||
* duration is exactly the confusion this whole type exists to remove, so the
|
||||
* description is derived from the unit rather than written out at each
|
||||
* instrument site.
|
||||
*
|
||||
* @param unit The unit to describe.
|
||||
* @return A static, null-terminated description.
|
||||
*/
|
||||
constexpr char const*
|
||||
otelUnitDescription(Unit unit) noexcept
|
||||
{
|
||||
switch (unit)
|
||||
{
|
||||
case Unit::Bytes:
|
||||
return "Size in bytes";
|
||||
case Unit::Millis:
|
||||
break;
|
||||
}
|
||||
return "Duration in ms";
|
||||
}
|
||||
|
||||
} // namespace beast::insight
|
||||
|
||||
Reference in New Issue
Block a user