Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Dec 22, 2015
1 parent 960818d commit aa06ff7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions librato.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"encoding/json"
"errors"
"fmt"
"runtime"
"strings"
"time"

Expand All @@ -21,6 +22,10 @@ import (

// ////////////////////////////////////////////////////////////////////////////////// //

const VERSION = "1.0"

// ////////////////////////////////////////////////////////////////////////////////// //

// Measurement is interface for different type of measurements
type Measurement interface {
Validate() error
Expand Down Expand Up @@ -214,6 +219,10 @@ var APIEndpoint = "https://metrics-api.librato.com"
// List of sources
var sources []DataSource

// User agent
var userAgent = fmt.Sprintf("ek-librato/%s (go; %s; %s-%s)",
VERSION, runtime.Version(), runtime.GOARCH, runtime.GOOS)

// ////////////////////////////////////////////////////////////////////////////////// //

// NewMetrics create new metrics struct for async metrics sending
Expand Down Expand Up @@ -469,6 +478,7 @@ func execRequest(method, url string, data interface{}) []error {
BasicAuthPassword: Token,

ContentType: "application/json",
UserAgent: userAgent,
}

if data != nil {
Expand Down

0 comments on commit aa06ff7

Please sign in to comment.