2013-04-03 20:33:32 +04:00
|
|
|
// Copyright (c) 2013, Prometheus Team
|
2013-01-19 17:48:30 +04:00
|
|
|
// All rights reserved.
|
|
|
|
//
|
2013-02-12 05:36:06 +04:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be found
|
|
|
|
// in the LICENSE file.
|
2013-01-18 18:47:40 +04:00
|
|
|
|
2013-04-03 20:33:32 +04:00
|
|
|
package prometheus
|
2013-01-18 18:47:40 +04:00
|
|
|
|
|
|
|
var (
|
|
|
|
// NilLabels is a nil set of labels merely for end-user convenience.
|
2013-01-19 17:48:30 +04:00
|
|
|
NilLabels map[string]string = nil
|
|
|
|
|
2013-02-18 08:09:21 +04:00
|
|
|
// The default http.Handler for exposing telemetric data over a web services
|
|
|
|
// interface.
|
|
|
|
DefaultHandler = DefaultRegistry.Handler()
|
|
|
|
|
2013-04-03 20:33:32 +04:00
|
|
|
// This is the default registry with which Metric objects are associated.
|
2013-02-18 08:09:21 +04:00
|
|
|
DefaultRegistry = NewRegistry()
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2013-01-19 17:48:30 +04:00
|
|
|
// A prefix to be used to namespace instrumentation flags from others.
|
|
|
|
FlagNamespace = "telemetry."
|
|
|
|
|
|
|
|
// The format of the exported data. This will match this library's version,
|
|
|
|
// which subscribes to the Semantic Versioning scheme.
|
2013-04-25 19:43:03 +04:00
|
|
|
APIVersion = "0.0.2"
|
2013-01-19 17:48:30 +04:00
|
|
|
|
2013-04-25 19:43:03 +04:00
|
|
|
// The content type and schema information set on telemetry data responses.
|
|
|
|
TelemetryContentType = `application/json; schema="prometheus/telemetry"; version=` + APIVersion
|
2013-06-27 20:46:16 +04:00
|
|
|
// The content type and schema information set on telemetry data responses.
|
|
|
|
DelimitedTelemetryContentType = `application/vnd.google.protobuf; proto="io.prometheus.client.MetricFamily"; encoding="delimited"`
|
2013-01-19 17:48:30 +04:00
|
|
|
|
2013-02-18 08:09:21 +04:00
|
|
|
// The customary web services endpoint on which telemetric data is exposed.
|
2013-06-27 20:46:16 +04:00
|
|
|
ExpositionResource = "/metrics"
|
2013-02-12 05:36:06 +04:00
|
|
|
|
2013-01-19 17:48:30 +04:00
|
|
|
baseLabelsKey = "baseLabels"
|
|
|
|
docstringKey = "docstring"
|
|
|
|
metricKey = "metric"
|
|
|
|
nameLabel = "name"
|
2013-04-03 20:33:32 +04:00
|
|
|
|
|
|
|
counterTypeValue = "counter"
|
|
|
|
floatBitCount = 64
|
|
|
|
floatFormat = 'f'
|
|
|
|
floatPrecision = 6
|
|
|
|
gaugeTypeValue = "gauge"
|
|
|
|
histogramTypeValue = "histogram"
|
|
|
|
typeKey = "type"
|
|
|
|
valueKey = "value"
|
|
|
|
labelsKey = "labels"
|
2013-01-18 18:47:40 +04:00
|
|
|
)
|