Commit Graph

940 Commits

Author SHA1 Message Date
Liudmila Molkova 3767588666 Define attribute requirement levels (#2522)
* nits

* review comments

* No exceptions for Required attributes, clarifications on performance

* Conditional clarifications

* nits

* Conditional -> required conditionally and minor fixes

* Align requirement levels with RFC levels better

* Clarify Note on required attributes

* Update specification/common/attribute-requirement-level.md

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>

* Clarify Note on required attributes

* Remove performance from conditionally required attributes

* Clarify Conditionally Required case when condition is false

* Apply suggestions from code review

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* headings for levels and moving things around

* nits: formatting

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
Co-authored-by: Reiley Yang <reyang@microsoft.com>
2023-11-16 12:50:59 -05:00
Patrice Chalin 97d6ebffcc Ensure common section has a README (#2479) 2023-11-16 12:50:59 -05:00
Tigran Najaryan b5306f3db2 Implement OTEP 0178: Mapping external data to AnyValue (#2385)
OTEP 0178 [0] proposed this mapping. This PR merges the proposal into specification.
The content of this PR is mostly copy/paste of the text of the OTEP minus the
irrelevant sections such as "Alternates", etc.

0 - https://github.com/open-telemetry/oteps/blob/main/text/0178-mapping-to-otlp-anyvalue.md
2023-11-16 12:50:59 -05:00
Reiley Yang ec4cee89ae Fix links (#2426) 2023-11-16 12:50:59 -05:00
David Ashpole 5f93caf5bb Describe how to convert non-string primitives for protocols which only support strings (#2343)
* Describe how to handle converting non-string primitives for protocols that only support strings

* update wording to make clear that only non-string values are converted to strings

* unify language

* Update specification/common/common.md

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-11-16 12:50:59 -05:00
Tigran Najaryan 132fd6aa14 Clarify that Trace/Meter are associated with Instrumentation Scope (#2276)
* Clarify that Trace/Meter are associated with Instrumentation Scope

This is a slightly different take on https://github.com/open-telemetry/opentelemetry-specification/issues/2203

Instead of renaming instrumentation library to instrumentation scope everywhere
this PR suggests targetted editing of wording of the Trace/Meter obtaining API
to allow not just instrumentation library but other instrumentation scopes to be
used as a parameter.

This change does not force renaming of API parameters and is not a breaking change.
We consider it a clarification of usage to match the intent that we had for the "name"
field.

If this PR is accepted there will be a follow up PR that will suggest to rename
InstrumentationLibrary* messages in OTLP proto to InstrumentationScope* message.
Such a change will not be a breaking change for the OTLP wire format and is acceptable.

If this PR is accepted we will also close https://github.com/open-telemetry/opentelemetry-specification/pull/1236
since it will be no longer necessary. The logger name will be recorded as the
instrumentation scope. This clarification will be a follow up PR that clarifies the
behavior in https://github.com/open-telemetry/oteps/blob/main/text/logs/0150-logging-library-sdk.md
2023-11-16 12:50:59 -05:00
Tigran Najaryan c948e38726 Clarify that attribute keys are unique in collections (#2248)
Attributes keys must be unique. The key/value pair collections in the specification
was always intended to model a map.

There was a recent confusion about this. This change clarifies the spec.

Resolves https://github.com/open-telemetry/opentelemetry-specification/issues/2245
2023-11-16 12:50:59 -05:00
Tigran Najaryan 22b6b073e3 Prohibit usage of retired names in semantic conventions (#2191)
* Prohibit usage of retired names in semantic conventions

This change adds a prohibition clause that requires that no old
metric or attribute name is used for a new attribute.

This is important to ensure reversibility of schema transformation
(converting from a new version to an old version of schema).

Without this restriction the following is possible:

Schema version 1. Attribute A exists.
Schema version 2. Attribute A is renamed to B. Appropriate schema file is created.
Schema version 3. Attribute A is introduced (a completely different new attribute).

Now attempting to go from Version 3 to version 1 is impossible since it requires
renaming B to A (for the change in version 2), but a different attribute A already exists.

* Fix based on comments

* Add changelog entry

Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
2023-11-16 12:50:59 -05:00
Patrice Chalin 70eaeee2aa Ensure all ToCs are generated using markdown-toc (#2146) 2023-11-16 12:50:59 -05:00
Patrice Chalin 6c59f11a4a Provide a normative definition of Attribute (singular) rather than Attributes (plural) (#2123)
* Provide a normative definition of Attribute (singular)

- Providing a normative definition of **attribute** (singular)
- Other copyedits

/cc @austinlparker @tedsuo

* Move anchor to make markdown checker happy
2023-11-16 12:50:59 -05:00
Owais Lone 19e4040e36 Exempt resources from attribute limits (#1892)
Resources are not susceptible to scenarios where excessive attributes
can be recorded unlike Spans. Resources are also immutable and it can be
hard for some SDKs to apply the limits at source at the time the
attributes are added to a resource. Furthermore, limits and Resources
both are generally defined and passed on to a TracerProvider which
forces a TracerProvider to either mutate the resource or generate a new
one with duplicate attributes in order to apply the limits to it.

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
2023-11-16 12:50:59 -05:00
Owais Lone 36ebbcad53 Prefer global limit over model-specific default (#1893) 2023-11-16 12:50:59 -05:00
Jakub Malinowski 43e0a08c24 Add an option to limit length of values of attributes and metric values (#1130) 2023-11-16 12:50:59 -05:00
Jakub Malinowski c37549e1d8 Rename Metrics labels to attributes (#1775) 2023-11-16 12:50:59 -05:00
Tigran Najaryan cb6ead3c7a Clarify usage of "otel." attribute namespace (#1640)
I noticed developers adding their own attributes to this namespace
without going through the specification. We need to regulate this
namespace through the specification, just like we do it for other
semantic conventions.
2023-11-16 12:50:59 -05:00
Ted Young 8de36bfb30 Add lifecycle statuses to all documents (#1385) 2023-11-16 12:50:59 -05:00
Tigran Najaryan 4c23074b10 Declare freeze of Trace API Specification 1.0 (#1121)
* Declare freeze of Trace Specification 1.0

We want to freeze Trace specification 1.0 so that we no longer accept substantial changes (unless a fundamental problem is found in the spec).

Resolves https://github.com/open-telemetry/opentelemetry-specification/issues/1120
2023-11-16 12:50:59 -05:00
Christian Neumüller ba5580577a Nulls SHOULD NOT be allowed in arrays. (#1214)
* Nulls SHOULD NOT be allowed in arrays.

* Fill in CHANGELOG link

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
2023-11-16 12:50:59 -05:00
Tigran Najaryan 82b14e151c Add guidance on when to use and not use nested namespaces (#1197)
This topic has come up at least 3 times now. I believe a clarification is
warranted. The clarification is aligned with previous recommendations:
https://github.com/open-telemetry/opentelemetry-specification/pull/789#issuecomment-675506855
https://github.com/open-telemetry/opentelemetry-specification/pull/882#issuecomment-690945900
https://github.com/open-telemetry/opentelemetry-specification/pull/1194#issuecomment-722431982
2023-11-16 12:50:59 -05:00
Przemek Maciolek 501f8a108a Include attribute name pluralization guidelines (#1115) (#1140) 2023-11-16 12:50:59 -05:00
Christian Neumüller 2012c9e386 Remove ordering reqirement for attributes. (#1212)
* Remove ordering for attributes.

* Fill in CHANGELOG link
2023-11-16 12:50:59 -05:00
Christian Neumüller 9d54f2f42b Fix absolute links to spec (#1192)
* Remove absolute links where possible.

* Work around semantic conventions.

* Docfx.

* Fix YAML.

* More docfx.
2023-11-16 12:50:59 -05:00
Armin Ruech 906beb96fc Define `null` as an invalid value for attributes and declare attempts to set `null` as undefined behavior (#992) 2023-11-16 12:50:59 -05:00
Tigran Najaryan a15b95dafa Require that names and namespaces are one global space across all semantic convention areas (#832)
* Require that names and namespaces are one global space across all semantic convention areas

We have semantic conventions for Resources, Spans and Metrics (in the future also Logs are expected).
It was not clear if the attribute names across all convention areas should be globally unique.

This commit asserts that conventions are one space, they are not independent spaces with
their own namespaces each.

We prohibit using the same Span or Resource attribute name or metric label name but give them
slightly different meanings or value sets.

Resolves: https://github.com/open-telemetry/opentelemetry-specification/issues/815

* Address PR comments

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-11-16 12:50:59 -05:00
Bogdan Drutu 15097436c7 Fix lint check in makefile, fix errors (#837)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-11-16 12:50:59 -05:00
Tigran Najaryan 3fb086c80f Extend attribute naming rules to metric labels (#821)
* Extend attribute naming rules to metric labels

We earlier defined naming rules for attributes, however we do not have
similar rules for metric labels. This commit extends the exact same
set of rules to metric labels.

This was brought up in this comment https://github.com/open-telemetry/opentelemetry-specification/pull/807#discussion_r471550053

* Address PR comments
2023-11-16 12:50:59 -05:00
Tigran Najaryan 7a01501836 Add conventions for attribute names (#807)
* Add conventions for attribute names

Resolves: https://github.com/open-telemetry/opentelemetry-specification/issues/726

* Address PR comments

* Re-word company/application specific attribute recommendations
2023-11-16 12:50:59 -05:00
Giovanni Liva 46b79ae1e7 Consistency between Span and Resource attributes (#777)
* Consistency between Span and Resource attributes

* Address feedback

* Wording
2023-11-16 12:50:59 -05:00
Reiley Yang 4a2a4ef946 DocFX sanity check (#742) 2023-11-16 12:50:59 -05:00
Bogdan Drutu 4f5831ca5f Centralize attributes definition (#722)
* Centralize attributes definition

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Update specification/overview.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
2023-11-16 12:50:59 -05:00
Jack Berg b85a0db524 Update spec references to point to local files 2023-11-16 12:50:59 -05:00
Jack Berg 1dc1e04ab6 Point to 1.26.0 of specification 2023-11-16 12:50:59 -05:00
Jack Berg f183527bf7 Fix more links 2023-11-16 12:50:59 -05:00
Jack Berg 84cd08ef20 Change to relative links 2023-11-16 12:50:59 -05:00
Jack Berg d445ea5eec Move attribute documents 2023-11-16 12:50:59 -05:00
Jack Berg eece45b83c Remove files to keep 2023-11-16 12:50:59 -05:00
Trask Stalnaker e56432cc1d Rename/replace `(client|server).socket.(address|port)` attributes with `network.(peer|local).(address|port)`. (#3713)
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
2023-11-16 12:50:59 -05:00
Carlos Alberto Cortez 7ee67a7192 Add a new AddLink() operation to Span. (#3678)
Fixes #454

Related to #3337

As the Messaging SIG merged its last OTEP 222, we will be adding operations
that require Links after Span creation, taking a direct route with `AddLink()`,
albeit without any of the new members suggested in #3337, e.g. `timestamp` (to be
discussed in a separate issue).

```
AddLink(spanContext, attributes /* optional */)
```
2023-11-16 12:50:59 -05:00
Josh Suereth e3352d43bc Remove local stubs of semantic conventions. (#3711) 2023-11-16 12:50:59 -05:00
Patrice Chalin 9d7cdb9292 Hugo front-matter fixes for aliases and linkTitle (#3592)
- Followup changes for
https://github.com/open-telemetry/opentelemetry.io/issues/2793
- There are only changes to Hugo front matter
- Adds `likeTitle`s for "Compatibility" pages
- Adds aliases for pages that have moved or were renamed
- Related:
https://github.com/open-telemetry/opentelemetry.io/issues/3013 -- the
`compatibility/openmetrics` spec page is in the list because it was
renamed

/cc @svrnm @cartermp
2023-11-16 12:50:59 -05:00
Tigran Najaryan bd2b51a249 Explain why custom attributes are not recommended to be placed in Otel namespaces (#3507)
The @open-telemetry/technical-committee discussed and decided to keep the
existing recommendations but clarify them and explain the purpose.
2023-11-16 12:50:59 -05:00
Liudmila Molkova cc85702f85 BREAKING: Introduce common `url.*` attributes, and improve use of namespacing under `http.*` (#3355) 2023-11-16 12:50:59 -05:00
Trask Stalnaker d6f3da6f11 BREAKING: Rename remaining network attributes from `net.*` to `network.*` and align definitions with ECS (#3426) 2023-11-16 12:50:59 -05:00
Liudmila Molkova 1b01442218 BREAKING: Replace `net.peer.*`/`net.host.*` with `client.*`/`server.*` (and `source.*`/`destination.*`) (#3402) 2023-11-16 12:50:59 -05:00
Patrice Chalin f4f8be2cce Use path, not external URL, for link into glossary (#3375)
- Contributes to
https://github.com/open-telemetry/opentelemetry.io/issues/2429
- This is part of an effort to normalize links, for improved link
checking on the OTel website
2023-11-16 12:50:59 -05:00
Trask Stalnaker e182ff311d Mark attribute requirement levels as stable (#3368) 2023-11-16 12:50:59 -05:00
Trask Stalnaker 4adbc387e9 Clarify that attribute requirement levels apply to instrumentation libraries (#3289)
Based on discussion in semconv stability WG

Closes #3283

## Changes

Clarifies that attribute requirement levels apply to instrumentation.
And that, because users can transform their telemetry in a number of
ways (e.g. metric views, span processors, and collector
transformations), these requirement levels cannot be relied on by
telemetry consumers.

---------

Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-11-16 12:50:59 -05:00
Trask Stalnaker c717ab4f4c Attribute requirement level follow-up edits (#3293) 2023-11-16 12:50:59 -05:00
Trask Stalnaker 8b0bccd2de Proofread of attribute requirement levels in preparation for stability (#3270) 2023-11-16 12:50:59 -05:00
Trask Stalnaker b8e3c86a2b Rename Optional attribute requirement level to Opt-In (#3228) 2023-11-16 12:50:59 -05:00