mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Semconv: Add service name attribute (#95743)
This commit is contained in:
parent
d0ba4f18d3
commit
c5178807be
@ -4,6 +4,25 @@ package semconv
|
|||||||
|
|
||||||
import "go.opentelemetry.io/otel/attribute"
|
import "go.opentelemetry.io/otel/attribute"
|
||||||
|
|
||||||
|
// Describes Grafana service attributes.
|
||||||
|
const (
|
||||||
|
// GrafanaServiceNameKey is the attribute Key conforming to the
|
||||||
|
// "grafana.service.name" semantic conventions. It represents the service
|
||||||
|
// name.
|
||||||
|
//
|
||||||
|
// Type: string
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: stable
|
||||||
|
// Examples: 'grafana-apiserver'
|
||||||
|
grafanaServiceNameKey = attribute.Key("grafana.service.name")
|
||||||
|
)
|
||||||
|
|
||||||
|
// GrafanaServiceName returns an attribute KeyValue conforming to the
|
||||||
|
// "grafana.service.name" semantic conventions. It represents the service name.
|
||||||
|
func GrafanaServiceName(val string) attribute.KeyValue {
|
||||||
|
return grafanaServiceNameKey.String(val)
|
||||||
|
}
|
||||||
|
|
||||||
// Describes Grafana datasource attributes.
|
// Describes Grafana datasource attributes.
|
||||||
const (
|
const (
|
||||||
// GrafanaDatasourceTypeKey is the attribute Key conforming to the
|
// GrafanaDatasourceTypeKey is the attribute Key conforming to the
|
||||||
|
12
pkg/semconv/model/registry/service.yml
Normal file
12
pkg/semconv/model/registry/service.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
groups:
|
||||||
|
- id: registry.grafana.service
|
||||||
|
type: attribute_group
|
||||||
|
display_name: Grafana Service Attributes
|
||||||
|
brief: "Describes Grafana service attributes."
|
||||||
|
attributes:
|
||||||
|
- id: grafana.service.name
|
||||||
|
type: string
|
||||||
|
brief: The service name.
|
||||||
|
examples:
|
||||||
|
- "grafana-apiserver"
|
||||||
|
stability: stable
|
7
pkg/semconv/model/trace/service.yaml
Normal file
7
pkg/semconv/model/trace/service.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
groups:
|
||||||
|
- id: trace.grafana.service
|
||||||
|
type: span
|
||||||
|
brief: 'Semantic Convention for Grafana services'
|
||||||
|
stability: stable
|
||||||
|
attributes:
|
||||||
|
- ref: grafana.service.name
|
Loading…
Reference in New Issue
Block a user