graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Server.Telemetry.Counters

Description

Counters used in telemetry collection. Additional counters can be added here.and serviced in Hasura.Server.Telemetry.

Synopsis

Documentation

data RequestDimensions Source #

The properties that characterize this request. The dimensions over which we collect metrics for each serviced request.

Instances

Instances details
FromJSON RequestDimensions Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

ToJSON RequestDimensions Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Generic RequestDimensions Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Associated Types

type Rep RequestDimensions :: Type -> Type #

Show RequestDimensions Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Eq RequestDimensions Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Ord RequestDimensions Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Hashable RequestDimensions Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep RequestDimensions Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep RequestDimensions = D1 ('MetaData "RequestDimensions" "Hasura.Server.Telemetry.Counters" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "RequestDimensions" 'PrefixI 'True) (S1 ('MetaSel ('Just "telemQueryType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QueryType) :*: (S1 ('MetaSel ('Just "telemLocality") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Locality) :*: S1 ('MetaSel ('Just "telemTransport") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Transport))))

data RequestTimings Source #

Accumulated time metrics.

Constructors

RequestTimings 

Fields

data RequestTimingsCount Source #

RequestTimings along with the count

Constructors

RequestTimingsCount 

Fields

Instances

Instances details
FromJSON RequestTimingsCount Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

ToJSON RequestTimingsCount Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Semigroup RequestTimingsCount Source #

Sum

Instance details

Defined in Hasura.Server.Telemetry.Counters

Generic RequestTimingsCount Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Associated Types

type Rep RequestTimingsCount :: Type -> Type #

Show RequestTimingsCount Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Eq RequestTimingsCount Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Ord RequestTimingsCount Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep RequestTimingsCount Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep RequestTimingsCount = D1 ('MetaData "RequestTimingsCount" "Hasura.Server.Telemetry.Counters" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "RequestTimingsCount" 'PrefixI 'True) (S1 ('MetaSel ('Just "telemTimeIO") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Seconds) :*: (S1 ('MetaSel ('Just "telemTimeTot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Seconds) :*: S1 ('MetaSel ('Just "telemCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word))))

data QueryType Source #

Was this request a mutation (involved DB writes)?

Constructors

Mutation 
Query 

Instances

Instances details
FromJSON QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

ToJSON QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Enum QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Generic QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Associated Types

type Rep QueryType :: Type -> Type #

Show QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Eq QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Ord QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Hashable QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep QueryType Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep QueryType = D1 ('MetaData "QueryType" "Hasura.Server.Telemetry.Counters" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "Mutation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Query" 'PrefixI 'False) (U1 :: Type -> Type))

data Locality 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

Instances details
FromJSON Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

ToJSON Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Monoid Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Semigroup Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Enum Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Generic Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Associated Types

type Rep Locality :: Type -> Type #

Methods

from :: Locality -> Rep Locality x #

to :: Rep Locality x -> Locality #

Show Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Eq Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Ord Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Hashable Locality Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep Locality Source # 
Instance details

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)))

data Transport Source #

Was this a query over http or websockets?

Constructors

HTTP 
WebSocket 

Instances

Instances details
FromJSON Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

ToJSON Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Enum Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Generic Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Associated Types

type Rep Transport :: Type -> Type #

Show Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Eq Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Ord Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Hashable Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep Transport Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep Transport = D1 ('MetaData "Transport" "Hasura.Server.Telemetry.Counters" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "HTTP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WebSocket" 'PrefixI 'False) (U1 :: Type -> Type))

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).

Instances

Instances details
FromJSON RunningTimeBucket Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

ToJSON RunningTimeBucket Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Generic RunningTimeBucket Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Associated Types

type Rep RunningTimeBucket :: Type -> Type #

Show RunningTimeBucket Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Eq RunningTimeBucket Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Ord RunningTimeBucket Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Hashable RunningTimeBucket Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep RunningTimeBucket Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep RunningTimeBucket = D1 ('MetaData "RunningTimeBucket" "Hasura.Server.Telemetry.Counters" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "RunningTimeBucket" 'PrefixI 'True) (S1 ('MetaSel ('Just "bucketGreaterThan") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Seconds)))

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

Instances details
FromJSON ServiceTimingMetrics Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

ToJSON ServiceTimingMetrics Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Generic ServiceTimingMetrics Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Associated Types

type Rep ServiceTimingMetrics :: Type -> Type #

Show ServiceTimingMetrics Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Eq ServiceTimingMetrics Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Ord ServiceTimingMetrics Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep ServiceTimingMetrics Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep ServiceTimingMetrics = D1 ('MetaData "ServiceTimingMetrics" "Hasura.Server.Telemetry.Counters" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ServiceTimingMetrics" 'PrefixI 'True) (S1 ('MetaSel ('Just "collectionTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "serviceTimingMetrics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ServiceTimingMetric])))

data ServiceTimingMetric Source #

Instances

Instances details
FromJSON ServiceTimingMetric Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

ToJSON ServiceTimingMetric Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Generic ServiceTimingMetric Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Associated Types

type Rep ServiceTimingMetric :: Type -> Type #

Show ServiceTimingMetric Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Eq ServiceTimingMetric Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

Ord ServiceTimingMetric Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep ServiceTimingMetric Source # 
Instance details

Defined in Hasura.Server.Telemetry.Counters

type Rep ServiceTimingMetric = D1 ('MetaData "ServiceTimingMetric" "Hasura.Server.Telemetry.Counters" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ServiceTimingMetric" 'PrefixI 'True) (S1 ('MetaSel ('Just "dimensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RequestDimensions) :*: (S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RunningTimeBucket) :*: S1 ('MetaSel ('Just "metrics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RequestTimingsCount))))