dm

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

README

Dimensional Metrics (v4)

The dimensional metrics package (dm) is responsible for processing and emitting the different data types that can be found in a v4 Integration SDK payload.

Sequence diagram

sequenceDiagram
    Emitter->>+DmEmitter: Send(FwRequest)
    loop FwRequest.Dataset
        alt not IgnoreEntity
            alt not EntityAgent
                DmEmitter->>RegisterEntity (worker): Dataset
            RegisterEntity (worker)->>+DmEmitter: Dataset + EntityID
            end
        end
        DmEmitter->>ExternalPlugin: emitInventory
        DmEmitter->>ExternalPlugin: emitEvent
        DmEmitter->>DmProcessor: metrics
        DmProcessor->>DmEmitter: decorated metrics
        DmEmitter->>MetricsSender: SendMetricsWithCommonAttributes
    end

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

View Source
var (
	// Errors
	ProtocolV4NotEnabledErr = errors.New("integration protocol version 4 is not enabled")
	NoContentToParseErr     = errors.New("no content to parse")
)

Functions

func NewLazyLoadedHarvester

func NewLazyLoadedHarvester(config MetricsSenderConfig, transport http.RoundTripper, idProvide id.Provide) metricHarvester

func ParsePayloadV4

func ParsePayloadV4(raw []byte, ffManager feature_flags.Retriever) (dataV4 protocol.DataV4, err error)

ParsePayloadV4 parses a string containing a JSON payload with the format of our SDK for v4 protocol which uses dimensional metrics.

Types

type Agent

type Agent interface {
	GetContext() agent.AgentContext
}

type Calculator

type Calculator struct {
	// contains filtered or unexported fields
}

type Conversion

type Conversion struct {
	// contains filtered or unexported fields
}

type Converter

type Converter interface {
	// contains filtered or unexported methods
}

type Count

type Count struct {
	// contains filtered or unexported fields
}

type Cumulative

type Cumulative struct {
	// contains filtered or unexported fields
}

type DerivingConvertor

type DerivingConvertor interface {
	// contains filtered or unexported methods
}

type Emitter

type Emitter interface {
	Send(fwrequest.FwRequest)
}

func NewEmitter

func NewEmitter(
	agentContext agent.AgentContext,
	dmSender MetricsSender,
	registerClient identityapi.RegisterClient,
	measure instrumentation.Measure,
	ffRetriever feature_flags.Retriever,
) Emitter

type Gauge

type Gauge struct {
	// contains filtered or unexported fields
}

type IntegrationProcessor

type IntegrationProcessor struct {
	IntegrationInterval         time.Duration
	IntegrationLabels           map[string]string
	IntegrationExtraAnnotations map[string]string
}

func (*IntegrationProcessor) ProcessMetrics

func (p *IntegrationProcessor) ProcessMetrics(
	metrics []protocol.Metric,
	common protocol.Common,
	entity entity.Fields) []protocol.Metric

ProcessMetrics metrics processing (decoration)

type MetricsSender

type MetricsSender interface {
	SendMetrics(metrics []protocol.Metric)
	SendMetricsWithCommonAttributes(commonAttributes protocol.Common, metrics []protocol.Metric) error
}

func NewDMSender

func NewDMSender(config MetricsSenderConfig, transport http.RoundTripper, idProvide id.Provide) (s MetricsSender, err error)

NewDMSender creates a Dimensional Metrics sender.

type MetricsSenderConfig

type MetricsSenderConfig struct {
	Fedramp             bool
	LicenseKey          string
	MetricApiURL        string
	SubmissionPeriod    time.Duration
	MaxEntitiesPerReq   int
	MaxEntitiesPerBatch int
}

func NewConfig

func NewConfig(url string, fedramp bool, licenseKey string, submissionPeriod time.Duration, maxEntitiesPerReq int, maxEntitiesPerBatch int) MetricsSenderConfig

type PrometheusHistogram

type PrometheusHistogram struct {
	// contains filtered or unexported fields
}

type PrometheusSummary

type PrometheusSummary struct {
	// contains filtered or unexported fields
}

type Rate

type Rate struct {
	// contains filtered or unexported fields
}

type Summary

type Summary struct {
}

Directories

Path Synopsis
Package cumulative creates Count metrics from cumulative values.
Package cumulative creates Count metrics from cumulative values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL