fix(semconv): correct & simplify codegen templates#2059
fix(semconv): correct & simplify codegen templates#2059kaylareopelle merged 8 commits intoopen-telemetry:mainfrom
Conversation
(attribute|metric).deprecated is a dict, so dropping it into Yard doc
content gets weird with Yard treating {} as a reference to other Yard
content elsewhere.
This change uses deprecated.note (if present) or deprecated.reason
(always present, but less info) capitalized with a period.
attribute.examples come in too many shapes to include in generated code docs without a complicated template to interpret their shape. WWJD: What Would Java Do? Java doesn't include examples. Let's not, also.
|
Per my usual, walking the commits is intended to make review more straightforward. |
|
Spellcheck failure is on content generated from semconv source models. 😐 |
It'll be fixed for future versions 🎉 open-telemetry/semantic-conventions#3549 |
Record the current semconv version in a separate constant.
kaylareopelle
left a comment
There was a problem hiding this comment.
This is great! Thank you! Would you mind adding something to either the README or the Rake task output to let folks know the task isn't bumping the version anymore? We can pull it out if/when we get back to full automation.
Better directions for how to hold this update process.
|
Example output from the rake task: 🔍 👀 Update: There are two spaces between ℹ️ and VERSION. I put two in because output on my terminal seemed to swallow one space, but they both appear here even though I copied that content from my terminal. How do fonts even? I'm happy to remove that second space or leave it. |
Thanks for the update! I think it looks great as-is. We can go back and fix it if it bugs us. |
The data under this key is now a dict.
.noteis informative when present, but isn't always, so fallback to.reason.@exampleblocksYard
@examplecontent needs to be indented within the code comment in a tricksy way. Combine that with the variety of shapes the data under.examplesis provided and the template becomes complicated and brittle.WWJD: What Would Java Do? - They don't include
.examplesin their generated semantic conventions code. So let's not also.