mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Semconv: Add k8s.dataplaneservice.name (#91714)
This commit is contained in:
parent
01fc31069f
commit
c5c206d8a6
@ -6,6 +6,7 @@
|
|||||||
- [Attribute Groups](#attribute-groups)
|
- [Attribute Groups](#attribute-groups)
|
||||||
- [grafana.datasource](#grafanadatasource)
|
- [grafana.datasource](#grafanadatasource)
|
||||||
- [grafana.datasource.request](#grafanadatasourcerequest)
|
- [grafana.datasource.request](#grafanadatasourcerequest)
|
||||||
|
- [k8s](#k8s)
|
||||||
- [grafana.plugin](#grafanaplugin)
|
- [grafana.plugin](#grafanaplugin)
|
||||||
|
|
||||||
<!-- tocstop -->
|
<!-- tocstop -->
|
||||||
@ -24,6 +25,7 @@ For more information:
|
|||||||
## Attribute Groups
|
## Attribute Groups
|
||||||
|
|
||||||
### grafana.datasource
|
### grafana.datasource
|
||||||
|
|
||||||
<!-- semconv trace.grafana.datasource -->
|
<!-- semconv trace.grafana.datasource -->
|
||||||
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
||||||
|---|---|---|---|---|---|
|
|---|---|---|---|---|---|
|
||||||
@ -39,6 +41,13 @@ For more information:
|
|||||||
| `grafana.datasource.request.query_count` | int | The number of queries in the request. | `3` | `Recommended` |  |
|
| `grafana.datasource.request.query_count` | int | The number of queries in the request. | `3` | `Recommended` |  |
|
||||||
<!-- endsemconv -->
|
<!-- endsemconv -->
|
||||||
|
|
||||||
|
## k8s
|
||||||
|
|
||||||
|
<!-- semconv trace.k8s -->
|
||||||
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
||||||
|
|---|---|---|---|---|---|
|
||||||
|
| `k8s.dataplaneservice.name` | string | The name of the DataPlaneService. | `v0alpha1.prometheus.grafana.app` | `Recommended` |  |
|
||||||
|
<!-- endsemconv -->
|
||||||
|
|
||||||
### grafana.plugin
|
### grafana.plugin
|
||||||
|
|
||||||
@ -48,3 +57,4 @@ For more information:
|
|||||||
| `grafana.plugin.id` | string | The plugin ID. | `prometheus`; `loki`; `grafana-github-datasource` | `Recommended` |  |
|
| `grafana.plugin.id` | string | The plugin ID. | `prometheus`; `loki`; `grafana-github-datasource` | `Recommended` |  |
|
||||||
| `grafana.plugin.type` | string | The plugin type. | `datasource` | `Recommended` |  |
|
| `grafana.plugin.type` | string | The plugin type. | `datasource` | `Recommended` |  |
|
||||||
<!-- endsemconv -->
|
<!-- endsemconv -->
|
||||||
|
|
||||||
|
@ -61,6 +61,26 @@ func GrafanaDatasourceRequestQueryCount(val int) attribute.KeyValue {
|
|||||||
return grafanaDatasourceRequestQueryCountKey.Int(val)
|
return grafanaDatasourceRequestQueryCountKey.Int(val)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Describes Kubernetes attributes.
|
||||||
|
const (
|
||||||
|
// K8sDataplaneserviceNameKey is the attribute Key conforming to the
|
||||||
|
// "k8s.dataplaneservice.name" semantic conventions. It represents the name
|
||||||
|
// of the DataPlaneService.
|
||||||
|
//
|
||||||
|
// Type: string
|
||||||
|
// RequirementLevel: Optional
|
||||||
|
// Stability: stable
|
||||||
|
// Examples: 'v0alpha1.prometheus.grafana.app'
|
||||||
|
k8sDataplaneserviceNameKey = attribute.Key("k8s.dataplaneservice.name")
|
||||||
|
)
|
||||||
|
|
||||||
|
// K8sDataplaneserviceName returns an attribute KeyValue conforming to the
|
||||||
|
// "k8s.dataplaneservice.name" semantic conventions. It represents the name of
|
||||||
|
// the DataPlaneService.
|
||||||
|
func K8sDataplaneserviceName(val string) attribute.KeyValue {
|
||||||
|
return k8sDataplaneserviceNameKey.String(val)
|
||||||
|
}
|
||||||
|
|
||||||
// Describes Grafana plugin attributes.
|
// Describes Grafana plugin attributes.
|
||||||
const (
|
const (
|
||||||
// GrafanaPluginIdKey is the attribute Key conforming to the
|
// GrafanaPluginIdKey is the attribute Key conforming to the
|
||||||
|
12
pkg/semconv/model/registry/k8s.yml
Normal file
12
pkg/semconv/model/registry/k8s.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
groups:
|
||||||
|
- id: registry.k8s
|
||||||
|
type: attribute_group
|
||||||
|
display_name: Kubernetes Attributes
|
||||||
|
brief: "Describes Kubernetes attributes."
|
||||||
|
attributes:
|
||||||
|
- id: k8s.dataplaneservice.name
|
||||||
|
type: string
|
||||||
|
brief: The name of the DataPlaneService.
|
||||||
|
examples:
|
||||||
|
- "v0alpha1.prometheus.grafana.app"
|
||||||
|
stability: stable
|
7
pkg/semconv/model/trace/k8s.yaml
Normal file
7
pkg/semconv/model/trace/k8s.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
groups:
|
||||||
|
- id: trace.k8s
|
||||||
|
type: span
|
||||||
|
brief: 'Semantic Convention for Grafana Kubernetes resources'
|
||||||
|
stability: stable
|
||||||
|
attributes:
|
||||||
|
- ref: k8s.dataplaneservice.name
|
Loading…
Reference in New Issue
Block a user