semconv

package module
v0.0.0-...-150b9d5 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

README

Grafana OpenTelemetry Semantic Conventions

Adding new attributes

  1. Add a new attribute to a new or existing attribute group in model/registry.
  2. Add a reference to the new attribute in a new or existing attribute group in model/trace.
  3. If you are adding a new attribute group, add a new semconv HTML comment tag to the README.md file with the name of the new attribute group.
  4. Run make all to update the generated files.

For more information:

Attribute Groups

grafana.datasource
Attribute Type Description Examples Requirement Level Stability
grafana.datasource.type string The datasource type. prometheus; loki; grafana-github-datasource Recommended Stable
grafana.datasource.uid string The datasource unique identifier. abcdefg-123456 Recommended Stable
grafana.datasource.request
Attribute Type Description Examples Requirement Level Stability
grafana.datasource.request.query_count int The number of queries in the request. 3 Recommended Stable

k8s

Attribute Type Description Examples Requirement Level Stability
k8s.dataplaneservice.name string The name of the DataPlaneService. v0alpha1.prometheus.grafana.app Recommended Stable
grafana.plugin
Attribute Type Description Examples Requirement Level Stability
grafana.plugin.id string The plugin ID. prometheus; loki; grafana-github-datasource Recommended Stable
grafana.plugin.type string The plugin type. datasource Recommended Stable

Documentation

Overview

Package semconv contains Grafana's OpenTelemetry semantic conventions.

This package contains the standard attributes that are emitted by Grafana's OpenTelemetry instrumentation.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Data Source Plugin
	GrafanaPluginTypeDatasource = grafanaPluginTypeKey.String("datasource")
	// Panel Plugin
	GrafanaPluginTypePanel = grafanaPluginTypeKey.String("panel")
	// App Plugin
	GrafanaPluginTypeApp = grafanaPluginTypeKey.String("app")
	// Renderer Plugin
	GrafanaPluginTypeRenderer = grafanaPluginTypeKey.String("renderer")
)

Functions

func GrafanaDatasourceRequestQueryCount

func GrafanaDatasourceRequestQueryCount(val int) attribute.KeyValue

GrafanaDatasourceRequestQueryCount returns an attribute KeyValue conforming to the "grafana.datasource.request.query_count" semantic conventions. It represents the number of queries in the request.

func GrafanaDatasourceType

func GrafanaDatasourceType(val string) attribute.KeyValue

GrafanaDatasourceType returns an attribute KeyValue conforming to the "grafana.datasource.type" semantic conventions. It represents the datasource type.

func GrafanaDatasourceUid

func GrafanaDatasourceUid(val string) attribute.KeyValue

GrafanaDatasourceUid returns an attribute KeyValue conforming to the "grafana.datasource.uid" semantic conventions. It represents the datasource unique identifier.

func GrafanaPluginId

func GrafanaPluginId(val string) attribute.KeyValue

GrafanaPluginId returns an attribute KeyValue conforming to the "grafana.plugin.id" semantic conventions. It represents the plugin ID.

func GrafanaServiceName

func GrafanaServiceName(val string) attribute.KeyValue

GrafanaServiceName returns an attribute KeyValue conforming to the "grafana.service.name" semantic conventions. It represents the service name.

func K8sDataplaneserviceName

func K8sDataplaneserviceName(val string) attribute.KeyValue

K8sDataplaneserviceName returns an attribute KeyValue conforming to the "k8s.dataplaneservice.name" semantic conventions. It represents the name of the DataPlaneService.

Types

This section is empty.

Jump to

Keyboard shortcuts

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