googlemanagedprometheus

package module
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// Special attribute key used by Ops Agent prometheus receiver to denote untyped
	// prometheus metric. Internal use only.
	GCPOpsAgentUntypedMetricKey = "prometheus_untyped_metric"
)

Variables

This section is empty.

Functions

func AddScopeInfoMetric added in v0.35.0

func AddScopeInfoMetric(m pmetric.Metrics)

AddScopeInfoMetric adds the otel_scope_info metric to a Metrics slice as specified in https://github.com/open-telemetry/opentelemetry-specification/blob/v1.16.0/specification/compatibility/prometheus_and_openmetrics.md#instrumentation-scope-1 It also updates all other metrics with the corresponding scope_name and scope_version attributes, if they are present.

func AddTargetInfoMetric added in v0.35.0

func AddTargetInfoMetric(m pmetric.Metrics)

AddTargetInfoMetric inserts target_info for each resource. First, it extracts the target_info metric from each ResourceMetric associated with the input pmetric.Metrics and inserts it into a new ScopeMetric for that resource, as specified in https://github.com/open-telemetry/opentelemetry-specification/blob/v1.16.0/specification/compatibility/prometheus_and_openmetrics.md#resource-attributes-1

func AddUntypedMetrics added in v0.41.0

func AddUntypedMetrics(m pmetric.Metrics)

AddUntypedMetrics looks for any Gauge data point with the special Ops Agent untyped metric attribute and duplicates that data point to a matching Sum.

func GetMetricName

func GetMetricName(baseName string, metric pmetric.Metric) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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