Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hasura.Server.Telemetry.Counters
Description
Counters used in telemetry collection. Additional counters can be added here.and serviced in Hasura.Server.Telemetry.
Synopsis
- data RequestDimensions = RequestDimensions {}
- data RequestTimings = RequestTimings {
- telemTimeIO :: !Seconds
- telemTimeTot :: !Seconds
- data RequestTimingsCount = RequestTimingsCount {
- telemTimeIO :: !Seconds
- telemTimeTot :: !Seconds
- telemCount :: !Word
- data QueryType
- data Locality
- = Empty
- | Local
- | Remote
- | Heterogeneous
- data Transport
- newtype RunningTimeBucket = RunningTimeBucket {}
- recordTimingMetric :: MonadIO m => RequestDimensions -> RequestTimings -> m ()
- data ServiceTimingMetrics = ServiceTimingMetrics {}
- data ServiceTimingMetric = ServiceTimingMetric {}
- dumpServiceTimingMetrics :: MonadIO m => m ServiceTimingMetrics
Documentation
data RequestDimensions Source #
The properties that characterize this request. The dimensions over which we collect metrics for each serviced request.
Constructors
RequestDimensions | |
Fields
|
Instances
data RequestTimings Source #
Accumulated time metrics.
Constructors
RequestTimings | |
Fields
|
Instances
Semigroup RequestTimings Source # | Sum |
Defined in Hasura.Server.Telemetry.Counters Methods (<>) :: RequestTimings -> RequestTimings -> RequestTimings # sconcat :: NonEmpty RequestTimings -> RequestTimings # stimes :: Integral b => b -> RequestTimings -> RequestTimings # |
data RequestTimingsCount Source #
RequestTimings
along with the count
Constructors
RequestTimingsCount | |
Fields
|
Instances
Was this request a mutation (involved DB writes)?
Instances
FromJSON QueryType Source # | |
ToJSON QueryType Source # | |
Enum QueryType Source # | |
Defined in Hasura.Server.Telemetry.Counters Methods succ :: QueryType -> QueryType # pred :: QueryType -> QueryType # fromEnum :: QueryType -> Int # enumFrom :: QueryType -> [QueryType] # enumFromThen :: QueryType -> QueryType -> [QueryType] # enumFromTo :: QueryType -> QueryType -> [QueryType] # enumFromThenTo :: QueryType -> QueryType -> QueryType -> [QueryType] # | |
Generic QueryType Source # | |
Show QueryType Source # | |
Eq QueryType Source # | |
Ord QueryType Source # | |
Defined in Hasura.Server.Telemetry.Counters | |
Hashable QueryType Source # | |
type Rep QueryType Source # | |
Was this a PG local query, or did it involve remote execution?
Constructors
Empty | No data was fetched |
Local | local DB data |
Remote | remote schema |
Heterogeneous | mixed |
Instances
FromJSON Locality Source # | |
ToJSON Locality Source # | |
Monoid Locality Source # | |
Semigroup Locality Source # | |
Enum Locality Source # | |
Defined in Hasura.Server.Telemetry.Counters | |
Generic Locality Source # | |
Show Locality Source # | |
Eq Locality Source # | |
Ord Locality Source # | |
Defined in Hasura.Server.Telemetry.Counters | |
Hashable Locality Source # | |
type Rep Locality Source # | |
Defined in Hasura.Server.Telemetry.Counters type Rep Locality = D1 ('MetaData "Locality" "Hasura.Server.Telemetry.Counters" "graphql-engine-1.0.0-inplace" 'False) ((C1 ('MetaCons "Empty" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Local" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Remote" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Heterogeneous" 'PrefixI 'False) (U1 :: Type -> Type))) |
Was this a query over http or websockets?
Instances
FromJSON Transport Source # | |
ToJSON Transport Source # | |
Enum Transport Source # | |
Defined in Hasura.Server.Telemetry.Counters Methods succ :: Transport -> Transport # pred :: Transport -> Transport # fromEnum :: Transport -> Int # enumFrom :: Transport -> [Transport] # enumFromThen :: Transport -> Transport -> [Transport] # enumFromTo :: Transport -> Transport -> [Transport] # enumFromThenTo :: Transport -> Transport -> Transport -> [Transport] # | |
Generic Transport Source # | |
Show Transport Source # | |
Eq Transport Source # | |
Ord Transport Source # | |
Defined in Hasura.Server.Telemetry.Counters | |
Hashable Transport Source # | |
type Rep Transport Source # | |
newtype RunningTimeBucket Source #
The timings and counts here were from requests with total time longer than
$sel:bucketGreaterThan:RunningTimeBucket
(but less than any larger bucket cutoff times).
Constructors
RunningTimeBucket | |
Fields |
Instances
recordTimingMetric :: MonadIO m => RequestDimensions -> RequestTimings -> m () Source #
Save a timing metric sample in our in-memory store. These will be accumulated and uploaded periodically in Hasura.Server.Telemetry.
data ServiceTimingMetrics Source #
The final shape of this part of our metrics data JSON. This should allow reasonably efficient querying using GIN indexes and JSONB containment operations (which treat arrays as sets).
Constructors
ServiceTimingMetrics | |
Fields
|
Instances
data ServiceTimingMetric Source #
Constructors
ServiceTimingMetric | |
Fields |