Skip to content

Commit

Permalink
Rename Transform to Changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Sep 21, 2023
1 parent 78c8318 commit d479e47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions schema/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestParseSchemaFile(t *testing.T) {
t, &Schema{
FileFormat: "1.1.0",
SchemaURL: "https://opentelemetry.io/schemas/1.1.0",
Versions: map[SemConvVersion]Transform{
Versions: map[SemConvVersion]Changeset{
"1.0.0": {},

"1.1.0": {
Expand Down Expand Up @@ -168,6 +168,6 @@ func TestParseSchemaFile(t *testing.T) {

func TestFailParseFileUnknownField(t *testing.T) {
ts, err := ParseFile("testdata/unknown-field.yaml")
assert.ErrorContains(t, err, "field Resources not found in type schema.Transform")
assert.ErrorContains(t, err, "field Resources not found in type schema.Changeset")
assert.Nil(t, ts)
}
6 changes: 3 additions & 3 deletions schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Schema struct {

// Versions are the telemetry transforms that apply for each semantic
// convention version.
Versions map[SemConvVersion]Transform
Versions map[SemConvVersion]Changeset
}

var (
Expand Down Expand Up @@ -76,9 +76,9 @@ func (s *Schema) validate() error {
// "1.7.0").
type SemConvVersion string

// Transform is all the applicable telemetry changes for a particular semantic
// Changeset is all the applicable telemetry changes for a particular semantic
// convention version.
type Transform struct {
type Changeset struct {
All All
Resources Resources
Spans Spans
Expand Down

0 comments on commit d479e47

Please sign in to comment.