Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RawMessageCount = telemetry.Int64("raw_request_ct", "Raw request count", "1") RawMessagesSentCount = telemetry.Int64("raw_messages_sent_ct", "Raw messages sent count", "1") MessagesPostedCount = telemetry.Int64("messages_posted_ct", "Messages posted count", "1") RawEventsCount = telemetry.Int64("raw_events_ct", "Raw events count", "1") OpCodesCount = telemetry.Int64("opcode_events_ct", "OpCode events count", "1") )
View Source
var (
TagStatus, _ = telemetry.NewTagKey("status")
TagEventName, _ = telemetry.NewTagKey("event_name")
TagOpCode, _ = telemetry.NewTagKey("op_code")
)
View Source
var ( RawMessageCountView = &telemetry.View{ Name: "raw_requests", TagKeys: []telemetry.TagKey{}, Measure: RawMessageCount, Description: "The number of raw messages received", Aggregation: telemetry.CountView(), } RawMessagesSentCountView = &telemetry.View{ Name: "raw_messages_sent", TagKeys: []telemetry.TagKey{}, Measure: RawMessagesSentCount, Description: "The number of raw messages sent", Aggregation: telemetry.CountView(), } MessagesPostedCountView = &telemetry.View{ Name: "messages_posted", TagKeys: []telemetry.TagKey{ TagStatus, }, Measure: MessagesPostedCount, Description: "The number of messages posted to discord", Aggregation: telemetry.CountView(), } RawEventsCountView = &telemetry.View{ Name: "raw_events", TagKeys: []telemetry.TagKey{ TagEventName, }, Measure: RawEventsCount, Description: "The number of events processed by the messagehandler", Aggregation: telemetry.CountView(), } OpCodesCountView = &telemetry.View{ Name: "opcode_events", TagKeys: []telemetry.TagKey{ TagOpCode, }, Measure: OpCodesCount, Description: "The number of opcode events processed by the messagehandler", Aggregation: telemetry.CountView(), } )
Functions ¶
Types ¶
type ActivityRecorder ¶
func NewActivityRecorder ¶
func NewActivityRecorder(timescale float64) *ActivityRecorder
func (*ActivityRecorder) Avg ¶
func (r *ActivityRecorder) Avg() float64
func (*ActivityRecorder) Incr ¶
func (r *ActivityRecorder) Incr(v float64)
func (*ActivityRecorder) Timescale ¶
func (r *ActivityRecorder) Timescale() float64
Click to show internal directories.
Click to hide internal directories.