Categorygithub.com/quickmetrics/qckm-go
modulepackage
1.2.2
Repository: https://github.com/quickmetrics/qckm-go.git
Documentation: pkg.go.dev

# README

GoDoc

A quickmetrics client for go

Installation

go get github.com/quickmetrics/qckm-go

Full Example

package main

import "github.com/quickmetrics/qckm-go"

func init() {
  qm.Init(qm.Options{
    ApiKey: "YOUR_API_KEY"
  })
}

func main() {
  qm.Event("hello.world", 1)
}

Setup

Initialize with your API key before sending events. You'll only have to do this once in your app lifecycle.

  qm.Init(qm.Options{
    ApiKey:       "YOUR_API_KEY",
    MaxBatchSize: 500,
    MaxBatchWait: 5,
    BatchWorkers: 1,
    Verbose:      true,
  })

Send events

qm.Event("your.event", 123.456)

qm.EventDimension("click.color", "blue", 1)

qm.Time(startTime, "response.time")

qm.TimeDimension(startTime, "response.time", "POST /login")

And that's it!

For more info on naming conventions and examples check out our docs at https://app.quickmetrics.io/docs

# Functions

Event sends a metric with values.
EventDimensions sends a name, secondary dimension and value.
FlushEvents processes any events left in the queue and sends them to the qickmetrics server.
FlushEventsSync processes any events left in the queue and sends them to the qickmetrics server.
No description provided by the author
No description provided by the author
Time is a helper to time functions pass it the star time and it'll calculate the duration.
TimeDimension is a helper to time functions pass it the star time and it'll calculate the duration.

# Structs

initialization options.