Documentation
¶
Overview ¶
Package registry reads ynf's telemetry registry (telemetry/registry), an OpenTelemetry Weaver registry, and writes the Go constants generated from it. Weaver is not needed to build ynf: this reads the subset of its format ynf's registry uses, and CI checks the registry itself with Weaver's own `registry check`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attribute ¶
type Attribute struct {
ID string `json:"id"`
Type string `json:"type"`
Members []Member `json:"members,omitempty"`
Brief string `json:"brief"`
Stability string `json:"stability"`
Examples []any `json:"examples,omitempty"`
Annotations map[string]any `json:"annotations,omitempty"`
}
Attribute is an attribute ynf defines.
type Event ¶
type Event struct {
Name string `json:"name"`
Brief string `json:"brief"`
Attributes []Use `json:"attributes"`
}
Event is a kind of event: a log record with an event name.
type Member ¶
type Member struct {
ID string `json:"id"`
Value string `json:"value"`
Brief string `json:"brief"`
}
Member is one value of an enumerated attribute.
type Metric ¶
type Metric struct {
Name string `json:"name"`
Instrument string `json:"instrument"`
Unit string `json:"unit"`
Brief string `json:"brief"`
Attributes []Use `json:"attributes"`
}
Metric is a metric ynf records.
type Registry ¶
type Registry struct {
Tool string `json:"tool"`
Version string `json:"version"`
// Semconv is the upstream semantic-conventions release the registry is pinned to.
Semconv Semconv `json:"semantic_conventions"`
// Attributes are the attributes ynf defines, under its own prefix.
Attributes []Attribute `json:"attributes"`
// Standard are the OpenTelemetry attributes ynf uses by name, defined upstream.
Standard []string `json:"standard_attributes"`
Spans []Span `json:"spans"`
Events []Event `json:"events"`
Metrics []Metric `json:"metrics"`
}
Registry is a tool's telemetry names, as `ynf telemetry registry --format json` prints them.
type Semconv ¶
type Semconv struct {
Name string `json:"name"`
Version string `json:"version"`
SchemaURL string `json:"schema_url"`
}
Semconv names the upstream conventions a registry follows.
type Span ¶
type Span struct {
Name string `json:"name"`
Kind string `json:"kind"`
Brief string `json:"brief"`
Attributes []Use `json:"attributes"`
}
Span is a kind of span.
type Use ¶
type Use struct {
Name string `json:"name"`
RequirementLevel string `json:"requirement_level"`
// Cardinality is the most distinct values the attribute may take on a metric (the
// ynr.cardinality annotation), where the registry declares one.
Cardinality int `json:"cardinality,omitempty"`
}
Use is an attribute a signal carries.