Debian Codegraph @

schema/v1.0/ast/spans.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package ast // import "go.opentelemetry.io/otel/schema/v1.0/ast"
5
6 import "go.opentelemetry.io/otel/schema/v1.0/types"
7
8 // Spans corresponds to a section representing a list of changes that happened
9 // to spans schema in a particular version.
10 type Spans struct {
11 Changes []SpansChange
12 }
13
14 // SpanEvents corresponds to a section representing a list of changes that happened
15 // to span events schema in a particular version.
16 type SpanEvents struct {
17 Changes []SpanEventsChange
18 }
19
20 // SpansChange corresponds to a section representing spans change.
21 type SpansChange struct {
22 RenameAttributes *AttributeMapForSpans `yaml:"rename_attributes"`
23 }
24
25 // AttributeMapForSpans corresponds to a section representing a translation of
26 // attributes for specific spans.
27 type AttributeMapForSpans struct {
28 ApplyToSpans []types.SpanName `yaml:"apply_to_spans"`
29 AttributeMap AttributeMap `yaml:"attribute_map"`
30 }
31
32 // SpanEventsChange corresponds to a section representing span events change.
33 type SpanEventsChange struct {
34 RenameEvents *RenameSpanEvents `yaml:"rename_events"`
35 RenameAttributes *RenameSpanEventAttributes `yaml:"rename_attributes"`
36 }
37
38 // RenameSpanEvents corresponds to section representing a renaming of span events.
39 type RenameSpanEvents struct {
40 EventNameMap map[string]string `yaml:"name_map"`
41 }
42
43 // RenameSpanEventAttributes corresponds to section representing a renaming of
44 // attributes of span events.
45 type RenameSpanEventAttributes struct {
46 ApplyToSpans []types.SpanName `yaml:"apply_to_spans"`
47 ApplyToEvents []types.EventName `yaml:"apply_to_events"`
48 AttributeMap AttributeMap `yaml:"attribute_map"`
49 }