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

First stab at documenting the art of defining semantic conventions #1707

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Dec 20, 2024

A lot of todos, which I'd like to tackle in follow up PRs (hopefully with the help of others)

Merge requirement checklist

@lmolkova lmolkova requested review from a team as code owners December 20, 2024 22:27
@lmolkova lmolkova requested a review from Copilot December 20, 2024 22:28
@lmolkova lmolkova added the Skip Changelog Label to skip the changelog check label Dec 20, 2024
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

docs/general/how-to-define-semantic-conventions.md:69

  • The phrase 'are involved into instrumentation efforts' should be 'are involved in instrumentation efforts'.
are involved into instrumentation efforts, and are committed to be the point of contact for

docs/general/how-to-define-semantic-conventions.md Outdated Show resolved Hide resolved
Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

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

This is a great start!

docs/general/how-to-define-semantic-conventions.md Outdated Show resolved Hide resolved

- New conventions MUST have a group of codeowners. See [project management](https://github.com/open-telemetry/community/blob/main/project-management.md) for more details.
<!-- TODO: add CI check for CODEOWNERS file (when a new area is added) -->
- New conventions SHOULD be defined in YAML files. See [YAML Model for Semantic Conventions](/model/README.md) for the details.
Copy link
Member

Choose a reason for hiding this comment

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

With this SHOULD I assume your intention is that things should be added to yaml files where possible, but also it's OK to add conventions as just text in markdown files? For example how to record span names?

If this is right, maybe we can say something like this, to make it more clear?

  • New conventions MUST be defined in YAML files. Conventions that cannot be recorded as part of the YAML model MAY be added in the corresponding markdown file (e.g., conventions for span name)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to put MUST here, but there are plenty of cases where we can't. Span names is a good example, but we have other things we can't yet express: references to metrics, complex attribute types, resources that are expected to be associated with telemetry, etc.

I use SHOULD for new conventions and MUST as a prereq to stabilization.
I feel REQUIRING yaml for experimental stuff is not necessary, but also, it feels wrong to require something none of the conventions fully implement.

Maybe once the tooling covers 90% of scenarios we can revisit it and be more strict?

docs/general/how-to-define-semantic-conventions.md Outdated Show resolved Hide resolved
them if most of the following apply:

- They provide a clear benefit to end users by enhancing telemetry.
- You plan to use the attribute in spans, metrics, events, resources, or other telemetry signals.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- You plan to use the attribute in spans, metrics, events, resources, or other telemetry signals.
- There is a clear plan to use the attribute in spans, metrics, events, resources, or other telemetry signals.

I'm never sure if we should avoid using "you" in conventions 🤔


- They provide a clear benefit to end users by enhancing telemetry.
- You plan to use the attribute in spans, metrics, events, resources, or other telemetry signals.
- The attribute will be utilized in instrumentations.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- The attribute will be utilized in instrumentations.
- The attribute will be utilized in instrumentations.

If the above is true, isn't this already somewhat implicit? (that they are used in spans/metrics/logs etc?

I think what we have been trying to push when folks want to add new things, is that we'd like to see implementations of them, so maybe we can also say:

  • There is a clear plan on how these attributes will be used by instrumentations

Copy link
Contributor Author

@lmolkova lmolkova Dec 27, 2024

Choose a reason for hiding this comment

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

If the above is true, isn't this already somewhat implicit? (that they are used in spans/metrics/logs etc?

I'd like to avoid someone defining conventions without planning to actually implement it. Changed the wording slightly to make it more clear. LMK what you think!

Also, some of the attributes are not really part of any specific telemetry signal. E.g. code, thread, enduser, session - it's something you stamp on any span/log/etc to enrich it. For those we'd probably not require referencing them on a span/metric/etc, but would ask about instrumentations and some plaintext description of how they are used.

There is a clear plan on how these attributes will be used by instrumentations

I like this, thanks!

docs/general/how-to-define-semantic-conventions.md Outdated Show resolved Hide resolved
Copy link
Contributor

@braydonk braydonk left a comment

Choose a reason for hiding this comment

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

Minor grammar feedback

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@lmolkova lmolkova force-pushed the how-to-contribute-new-conventions branch from 2afb348 to 6f90089 Compare December 27, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Skip Changelog Label to skip the changelog check
Projects
Development

Successfully merging this pull request may close these issues.

3 participants