prometheus-2.2.3: Prometheus Haskell Client
Safe HaskellNone
LanguageHaskell2010

System.Metrics.Prometheus.MetricId

Synopsis

Documentation

newtype Name Source #

Construct with makeName to ensure that names use only valid characters

Constructors

Name 

Fields

Instances

Instances details
Eq Name Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Ord Name Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Show Name Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

IsString Name Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Methods

fromString :: String -> Name #

Semigroup Name Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Methods

(<>) :: Name -> Name -> Name #

sconcat :: NonEmpty Name -> Name #

stimes :: Integral b => b -> Name -> Name #

Monoid Name Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Methods

mempty :: Name #

mappend :: Name -> Name -> Name #

mconcat :: [Name] -> Name #

newtype Labels Source #

Constructors

Labels 

Fields

Instances

Instances details
Eq Labels Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Methods

(==) :: Labels -> Labels -> Bool #

(/=) :: Labels -> Labels -> Bool #

Ord Labels Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Show Labels Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Semigroup Labels Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

Monoid Labels Source # 
Instance details

Defined in System.Metrics.Prometheus.MetricId

data MetricId Source #

Constructors

MetricId 

Fields

makeValid :: Text -> Text Source #

Make the input match the regex [a-zA-Z_][a-zA-Z0-9_] which defines valid metric and label names, according to https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels Replace invalid characters with _ and add a leading _ if the first character is only valid as a later character.

makeName :: Text -> Name Source #

Construct a Name, replacing disallowed characters.