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

Update semconv tool with stability fields and MD render. #43

Merged
merged 2 commits into from
May 12, 2021

Conversation

thisthat
Copy link
Member

@thisthat thisthat commented May 6, 2021

This PR fixes #35 introducing 3 level of stability:

  • Stable
  • Experimental
  • Deprecated

The stability can be expressed at semantic convention and attribute level.
If an attributes doesn't have a stability marker, it inherits the stability of the semantic convention.
If no stability marker is set, it defaults to "stable".

The PR also improves the code generator adding support for Markdown rendering.
For example, given the following Yaml

groups:
  - id: test
    type: resource
    brief: test
    attributes:
      - id: provider
        type: string
        brief: >
           	Name *of* **the** `cloud` provider.

and the following template

{%- for attribute in attributes %}
 {{attribute.brief | render_markdown(code="{{@code {0}}}", link="<a href='{0}'>{1}</a>", emphasis="<i>{0}</i>", strong="<b>{0}</b>") }}.
{%- endfor %}

the code generator will produce:

Name <i>of</i> <b>the</b> {@code cloud} provider.

@thisthat thisthat requested review from anuraaga and arminru May 6, 2021 09:52
@thisthat thisthat requested a review from Oberon00 as a code owner May 6, 2021 09:52
@thisthat thisthat requested a review from a team May 6, 2021 09:52
@@ -2,6 +2,11 @@

Please update the changelog as part of any significant pull request.

## v0.3.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do 0.4.0

@arminru
Copy link
Member

arminru commented May 11, 2021

Please also make sure to update https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/syntax.md once this is merged (or in parallel).

Copy link
Member

@Oberon00 Oberon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general. The design decision that can be discussed here is to merge deprecation and stability into a single enum, so once deprecated you can't distinguish if an attribute was formerly experimental or stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

semantic convention marker: stability
4 participants