Documentation ¶
Index ¶
- func TranslateDDCheckRunJSON(doc []byte) ([]prompb.TimeSeries, error)
- func TranslateDDSeriesJSON(doc []byte) ([]prompb.TimeSeries, error)
- func ZlibDecode(src []byte) ([]byte, error)
- func ZlibEncode(src []byte) ([]byte, error)
- type DDCortexProxy
- func (ddcp *DDCortexProxy) HandlerCheckPost(w http.ResponseWriter, r *http.Request)
- func (ddcp *DDCortexProxy) HandlerCommonAfterJSONTranslate(w http.ResponseWriter, r *http.Request, ptsf []prompb.TimeSeries)
- func (ddcp *DDCortexProxy) HandlerSeriesPost(w http.ResponseWriter, r *http.Request)
- func (ddcp *DDCortexProxy) ReadAndValidateRequest(w http.ResponseWriter, r *http.Request) ([]byte, error)
- type DDTSFragment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TranslateDDCheckRunJSON ¶
func TranslateDDCheckRunJSON(doc []byte) ([]prompb.TimeSeries, error)
func TranslateDDSeriesJSON ¶
func TranslateDDSeriesJSON(doc []byte) ([]prompb.TimeSeries, error)
Expected input JSON document structure: a set of time series fragments that the DD agent POSTs to /api/v1/series. Example:
{ "series": [ { "metric": "datadog.trace_agent.trace_writer.traces", "points": [ [ 1610032230, 0 ], ... ], "tags": [ "version:7.24.1" ], "host": "x1carb6", "type": "rate", "interval": 10 }, { "metric": "datadog.dogstatsd.client.metrics", "points": [ ... } ] }
Note that each object in the `series` array is a time series fragment for a specific metric. Each metric is defined by its name and other meta data (think: labels). The time series fragment is comprised of one or multiple data points / samples.
func ZlibDecode ¶
func ZlibEncode ¶
Types ¶
type DDCortexProxy ¶
type DDCortexProxy struct {
// contains filtered or unexported fields
}
func NewDDCortexProxy ¶
func NewDDCortexProxy( tenantName string, remoteWriteURL string, disableAPIAuthentication bool) *DDCortexProxy
func (*DDCortexProxy) HandlerCheckPost ¶
func (ddcp *DDCortexProxy) HandlerCheckPost(w http.ResponseWriter, r *http.Request)
func (*DDCortexProxy) HandlerCommonAfterJSONTranslate ¶
func (ddcp *DDCortexProxy) HandlerCommonAfterJSONTranslate( w http.ResponseWriter, r *http.Request, ptsf []prompb.TimeSeries, )
func (*DDCortexProxy) HandlerSeriesPost ¶
func (ddcp *DDCortexProxy) HandlerSeriesPost(w http.ResponseWriter, r *http.Request)
func (*DDCortexProxy) ReadAndValidateRequest ¶
func (ddcp *DDCortexProxy) ReadAndValidateRequest(w http.ResponseWriter, r *http.Request) ([]byte, error)
Common request validation and processing for the URL handlers below.
type DDTSFragment ¶
type DDTSFragment struct {
// contains filtered or unexported fields
}
A struct with parameters representing a DD time series fragment. Most of these can be left "undefined" (zero) and will be filled with simple default values, see `toJSON()` below.
Click to show internal directories.
Click to hide internal directories.