grafanacloudconnector

package module
v0.165.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 16 Imported by: 6

README

Grafana Cloud Connector

Status
Distributions contrib
Issues Open issues Closed issues
Code coverage codecov
Code Owners @rlankfo, @jcreixell

Supported Pipeline Types

Exporter Pipeline Type Receiver Pipeline Type Stability Level
traces metrics alpha

Deprecation Notice: The component type has been renamed from grafanacloud to grafana_cloud to follow the OpenTelemetry snake_case naming convention. The old name grafanacloud still works but is deprecated and will be removed in a future release. Please update your configuration to use grafana_cloud.

Overview

The Grafana Cloud Connector (grafanacloudconnector) is a connector component that can analyze telemetry in pipelines to generate usage metrics for the following Grafana Cloud products:

  • Application Observability

Usage

connectors:
  grafana_cloud/connector:

extensions:
  basicauth/grafana_cloud:
    client_auth:
      username: "${env:GRAFANA_CLOUD_INSTANCE_ID}"
      password: "${env:GRAFANA_CLOUD_API_KEY}"

exporters:
  otlphttp/grafana_cloud:
    endpoint: "${env:GRAFANA_CLOUD_OTLP_ENDPOINT}"
    auth:
      authenticator: basicauth/grafana_cloud

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [otlphttp/grafana_cloud, grafana_cloud/connector]

    metrics:
      receivers: [otlp, grafana_cloud/connector]
      exporters: [otlphttp/grafana_cloud]

In this example configuration, usage metrics for Grafana Cloud Application Observability are derived from incoming spans.

Configuration

connectors:
  grafanacloud/connector:
    ## @param host_identifiers List of span attributes used to identify the host running the workloads.
    ## The first matching attribute is used.
    # host_identifiers: ["k8s.node.name", "host.id", "k8s.node.uid"]
    ## @param metrics_flush_interval Interval at which host metrics are flushed.
    ## Valid values are between 15s and 5m.
    # metrics_flush_interval: 60s
Example configuration for the component
connectors:
  grafana_cloud:
    host_identifiers: ["mycompany.myHostAttribute", "k8s.node.name", "host.id", "k8s.node.uid"]
    metrics_flush_interval: 60s

This connector will generate a host info metric based on the first host_identifiers resource attribute found on spans. The rest are skipped. Valid flush intervals are between 15s and 5m.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() connector.Factory

Types

type Config

type Config struct {
	// HostIdentifiers defines the list of resource attributes used to derive
	// a unique `grafana.host.id` value. The first attribute present on a span's
	// resource wins, so all telemetry sources reporting the same host must agree
	// on which attribute they emit to avoid counting that host more than once.
	HostIdentifiers      []string      `mapstructure:"host_identifiers"`
	MetricsFlushInterval time.Duration `mapstructure:"metrics_flush_interval"`
	// contains filtered or unexported fields
}

Config defines the configuration options for the Grafana Cloud connector.

func (Config) Validate

func (c Config) Validate() error

Validate checks if the configuration is valid

Directories

Path Synopsis
internal
metadata
Package metadata contains the autogenerated telemetry and build information for the connector/grafana_cloud component.
Package metadata contains the autogenerated telemetry and build information for the connector/grafana_cloud component.

Jump to

Keyboard shortcuts

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