Commit 1f4f85e
feat(semconv): update to v1.25 in a non-breaking way (#1651)
* use v1.10-compat semconvgen to write deprecation notices
* update semconv rake targets and templates for v1.26
* pull from the new semconv repo
* update jinja2 template for the new structure of convention data
* stable semconv names will appear in OpenTelemetry::SemanticConventions
while all semconv names (experimental, deprecated, stable, etc) appear
in OpenTelemetry::SemanticCandidates
- This maps to what other langs (Java, Python, JS) are putting into
"Incubating" modules. We opted for "candidates" because
OpenTelemetry::SemanticConventions::Incubating::... was getting
too long and OpenTelemetry::SemanticIncubating didn't make much
sense.
* generate a module per root semconv namespace to make navigating docs
more focused and to decrease the number of constants loaded when
using more precise requires in downstream code
* generates only attribute name constants and to an attributes subfolder
to prepare for metric name constants to be generated to metrics
subfolders, also for decreasing the scope of what gets loaded when
downstream instrumentation requires these constants
Co-authored-by: Kayla Reopelle (she/her) <[email protected]>
* the code generated
* add ability to exclude specific attrs from code gen
Because converting to SCREAMING_SNAKE_CASE cannot distinguish
between ...
screaming.snake_case
... and ...
screaming.snake.case
So, like other languages, ignore the deprecated messaging.client_id in
favor of its replacement and let backends deal with the changed attr
name.
* reference the full name in the deprecation notice toward stable
* test that constants are available in candidates
277 runs, 500 assertions, 26 failures, 0 errors, 0 skips
Apparently there are some kinks to work out.
* generate v1.25 semconv
There's naming hijinks in the db.* namespace I would like to avoid in
this first effort to bring semconv up-to-recent-date.
* add/expand doc comments on top-level modules
Explain the auto-generated situation.
* correct deprecation notices for several old names
The v1.10 names whose comments were updated in this commit were renamed
or removed in version 1.11-1.25. Made note of their replacements or that
their use should be dropped.
Removed test for one-to-one matching of 1.10 constants to 1.25 "all"
constants. That will never pass without updating the source semconv YAML
to add back the missing names with dep notices. I believe our dep notes
will suffice and we won't auto-generate Resource or Trace again.
* gitignore semconv repo clone; rake improvements
* Move to a tmp/ dir and ignore that.
* Update the git commands to be able to reuse one directory for
the repo working copy, just update what's needed for a different
tag between iterations. (Generally only an improvement for dev envs.)
* Use sh() for shell commands so that tasks fail if their commands fail.
* Appease Rubocop.
* typo/grammar corrections
Co-authored-by: Kayla Reopelle <[email protected]>
* adds kramdown to dev dependencies
Yard's default use of the rdoc markdown provider was choking on links
containing codeblocks, for example: [`ENV`](link/to/somewhere). These
style links are pretty popular in the text details provided with semconv
attributes.
Let's switch to kramdown which is a markdown parser and
renderer that:
* can handle inline code blocks inside a link anchor
* is pure Ruby (no C extensions) so works with JRuby
* reorg module namespaces
* out with Candidates, we're using Incubating like most other SIGs
* shorten the namespace to SemConv
* do not provide an all-in-one rollup require for all namespaces;
downstream users must directly require the namespaces that they use
* attributes that are templates (prefixes, really, for the moment) are
generated as lambdas with _LAMBDA appended to their name; users must
call that lambda with a key for the template to return the attribute
name string
* semconv 1.26 with weaver
With multiple template entries in weaver.yaml, code generation for
stable and incubating can be performed in one invocation of the docker
image. Rakefile targets trimmed down in light of that.
* generate separate attrs and metrics files
Each root namespace gets separate attributes and metrics files.
Include examples of possible values for attributes.
Include a usage example of the template attributes as lambdas.
Fix links in doc comments referencing stable constants.
Co-authored-by: Hannah Ramadan <[email protected]>
Co-authored-by: Kayla Reopelle <[email protected]>
* generate rollup/barrel requires for each root namespace
* extract clean of generated code into separate task
* appease Rubocop
* Layout/HeredocIndentation: Use 2 spaces for indentation in a
heredoc.
* Style/StringLiterals: Prefer single-quoted strings when you don't
need string interpolation or special symbols.
* Style/StringConcatenation: Prefer string interpolation to string
concatenation.
- ... except we don't want *interpolation*; we want to join pathname
components with the correct separator for the operating system. So
we'll use Pathname.join explicitly instead of Pathname's :+ operator
so Rubocop doesn't think we're concatonating strings.
* appease Rubocop
* Style/RedundantCurrentDirectoryInPath: Remove the redundant
current directory path
* Style/RedundantFileExtensionInRequire: Redundant .rb file
extension detected.
* correct yard-doc refs to new short namespaces
* Update Rakefile, tests, Gemfile
* Bump constants to 1.36.0
* appease Rubocop
Bundler/OrderedGems: Gems should be sorted in an alphabetical order within their section of the Gemfile.
Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.
Co-authored-by: Kayla Reopelle <[email protected]>
---------
Co-authored-by: Kayla Reopelle (she/her) <[email protected]>
Co-authored-by: Hannah Ramadan <[email protected]>
Co-authored-by: Kayla Reopelle <[email protected]>
Co-authored-by: Kayla Reopelle <[email protected]>1 parent 4ab7dbb commit 1f4f85e
File tree
248 files changed
+19089
-68
lines changed- semantic_conventions
- lib/opentelemetry
- semantic_conventions
- semconv
- aspnetcore
- client
- code
- db
- dotnet
- error
- exception
- http
- incubating
- android
- app
- artifact
- aspnetcore
- aws
- azure
- az
- browser
- cassandra
- cicd
- client
- cloudevents
- cloudfoundry
- cloud
- code
- container
- cpu
- cpython
- db
- deployment
- destination
- device
- disk
- dns
- dotnet
- elasticsearch
- enduser
- error
- event
- exception
- faas
- feature_flag
- file
- gcp
- gen_ai
- geo
- go
- graphql
- heroku
- host
- http
- hw
- ios
- jvm
- k8s
- kestrel
- linux
- log
- mainframe
- message
- messaging
- network
- net
- nodejs
- oci
- opentracing
- os
- otel
- other
- peer
- pool
- process
- profile
- rpc
- security_rule
- server
- service
- session
- signalr
- source
- system
- telemetry
- test
- thread
- tls
- url
- user_agent
- user
- v8js
- vcs
- webengine
- zos
- jvm
- kestrel
- network
- otel
- server
- service
- signalr
- telemetry
- url
- user_agent
- templates
- registry/ruby
- test
- opentelemetry/semantic_conventions
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
248 files changed
+19089
-68
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
6 | 20 | | |
7 | 21 | | |
8 | 22 | | |
9 | 23 | | |
10 | 24 | | |
11 | 25 | | |
12 | | - | |
13 | | - | |
| 26 | + | |
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
| |||
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 51 | + | |
47 | 52 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
64 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
65 | 126 | | |
66 | | - | |
67 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
68 | 132 | | |
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
9 | 17 | | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
13 | 24 | | |
14 | 25 | | |
| 26 | + | |
0 commit comments