Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add semantic conventions for specification v1.18.0 #7169

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .chloggen/semconv_v1.18.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: semconv

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Generated Semantic conventions 1.18.

# One or more tracking issues or pull requests related to the change
issues: [7168]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
1 change: 1 addition & 0 deletions semconv/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require github.com/stretchr/testify v1.8.1

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
2 changes: 2 additions & 0 deletions semconv/go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
18 changes: 14 additions & 4 deletions semconv/semconv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"path/filepath"
"testing"

version "github.com/hashicorp/go-version"
"github.com/stretchr/testify/assert"
)

Expand All @@ -28,17 +29,26 @@ func TestAllSemConvFilesAreCrated(t *testing.T) {

files, err := os.ReadDir(".")
assert.NoError(t, err)

constraints, err := version.NewConstraint("> v1.16.0")
assert.NoError(t, err)

for _, f := range files {
if !f.IsDir() {
continue
}

end := len(expectedFiles)
if f.Name() == "v1.17.0" { // no nonstandard.go file requiered.
end--
ver, err := version.NewVersion(f.Name())
assert.NoError(t, err)

expected := make([]string, len(expectedFiles))
copy(expected, expectedFiles)

if constraints.Check(ver) {
expected[len(expected)-1] = "generated_event.go"
}

for _, ef := range expectedFiles[0:end] {
for _, ef := range expected {
assert.FileExists(t, filepath.Join(".", f.Name(), ef))
}
}
Expand Down
129 changes: 129 additions & 0 deletions semconv/v1.18.0/generated_event.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading