View Source PromEx.Utils (PromEx v1.11.0)

This module provides several general purpose utilities for use in PromEx plugs.

Summary

Types

The kinds of exceptions that can occur

Functions

Converts a time_unit to its plural form.

Normalize exception messages for use as metric labels.

Take a module name and normalize it for use as a metric label.

Types

Link to this type

duration_unit_plural()

View Source
@type duration_unit_plural() ::
  :seconds | :milliseconds | :microseconds | :nanoseconds
@type exception_kind() :: :error | :exit | :throw

The kinds of exceptions that can occur

Functions

@spec make_plural_atom(System.time_unit()) :: atom()

Converts a time_unit to its plural form.

Link to this function

normalize_exception(arg1, reason, stacktrace)

View Source
@spec normalize_exception(exception_kind(), term(), term()) :: String.t()

Normalize exception messages for use as metric labels.

Link to this function

normalize_module_name(name)

View Source
@spec normalize_module_name(String.t() | atom()) :: String.t()

Take a module name and normalize it for use as a metric label.