From d80a965cbc8267599babe79e0a6c4db65bd72937 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 27 Oct 2021 15:48:06 -0400 Subject: [PATCH 1/9] Add the specification to the docs --- .gitignore | 5 ++ .htmltest.yml | 7 +++ config.yaml | 2 + content/en/docs/specification/_index.md | 79 +++++++++++++++++++++++++ package.json | 10 ++-- scripts/adjust-spec-pages.pl | 79 +++++++++++++++++++++++++ scripts/cp-spec-pages.sh | 19 ++++++ 7 files changed, 196 insertions(+), 5 deletions(-) create mode 100644 content/en/docs/specification/_index.md create mode 100755 scripts/adjust-spec-pages.pl create mode 100755 scripts/cp-spec-pages.sh diff --git a/.gitignore b/.gitignore index ea629f7a84fe..b57217bcf2a7 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,8 @@ assets/jsconfig.json # IntelliJ *.iml + +# Generated content +/content/en/docs/specification/**/*.md +/content/en/docs/specification/**/*.png +!/content/en/docs/specification/_index.md diff --git a/.htmltest.yml b/.htmltest.yml index 3bd9fe3626ce..f3eefb61d08e 100644 --- a/.htmltest.yml +++ b/.htmltest.yml @@ -2,3 +2,10 @@ DirectoryPath: public IgnoreDirectoryMissingTrailingSlash: true IgnoreAltMissing: true IgnoreInternalEmptyHash: true +IgnoreInternalURLs: + # TODO: fix the source of these inlined TOC links + - HAHAHUGOSHORTCODE-s0-HBHB + - HAHAHUGOSHORTCODE-s1-HBHB + - HAHAHUGOSHORTCODE-s2-HBHB + - HAHAHUGOSHORTCODE-s5-HBHB + - HAHAHUGOSHORTCODE-s7-HBHB diff --git a/config.yaml b/config.yaml index c057049cf256..3c747080e8f1 100644 --- a/config.yaml +++ b/config.yaml @@ -159,3 +159,5 @@ module: target: static - source: content-modules/opentelemetry-specification/schemas target: static/schemas + - source: content-modules/opentelemetry-specification/internal/img + target: static/img diff --git a/content/en/docs/specification/_index.md b/content/en/docs/specification/_index.md new file mode 100644 index 000000000000..af80706deb6d --- /dev/null +++ b/content/en/docs/specification/_index.md @@ -0,0 +1,79 @@ +--- +title: Specification +no_list: true +weight: 2 +--- + +![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/open-telemetry/specification.svg) + +The OpenTelemetry specification describes the cross-language requirements and expectations for all OpenTelemetry implementations. Substantive changes to the specification must be proposed using the [OpenTelemetry Enhancement Proposal](https://github.com/open-telemetry/oteps) process. Small changes, such as clarifications, wording changes, spelling/grammar corrections, etc. can be made directly via pull requests. + +Questions that needs additional attention can be brought to the regular +specifications meeting. EU and US timezone friendly meeting is held every +Tuesday at 8 AM pacific time. Meeting notes are held in the [google +doc](https://docs.google.com/document/d/1-bCYkN-DWJq4jw1ybaDZYYmx-WAe6HnwfWbkm8d57v8/edit?usp=sharing). +APAC timezone friendly meeting is held Tuesdays, 4PM pacific time. See +[OpenTelemetry calendar](https://github.com/open-telemetry/community#calendar). + +Escalations to technical committee may be made over the +[e-mail](https://github.com/open-telemetry/community#tc-technical-committee). +Technical committee holds regular meetings, notes are held +[here](https://docs.google.com/document/d/17v2RMZlJZkgoPYHZhIFTVdDqQMIAH8kzo8Sl2kP3cbY/edit?usp=sharing). + +## Table of Contents + +- [Overview](overview) +- [Glossary](glossary) +- [Versioning and stability for OpenTelemetry clients](versioning-and-stability) +- [Library Guidelines](library-guidelines) + - [Package/Library Layout](library-layout) + - [General error handling guidelines](error-handling) +- API Specification + - [Context](context/context) + - [Propagators](context/api-propagators) + - [Baggage](baggage/api) + - [Tracing](trace/api) + - [Metrics](metrics/api) +- SDK Specification + - [Tracing](trace/sdk) + - [Resource](resource/sdk) + - [Configuration](sdk-configuration) +- Data Specification + - [Semantic Conventions](overview#semantic-conventions) + - [Protocol](protocol) + - [Metrics](metrics/datamodel) + - [Logs](logs/data-model) +- About the Project + - [Timeline](#project-timeline) + - [Notation Conventions and Compliance](#notation-conventions-and-compliance) + - [Versioning the Specification](#versioning-the-specification) + - [Acronym](#acronym) + +## Project Timeline + +The current project status as well as information on notable past releases is found at +[the OpenTelemetry project page](/status/). + +Information about current work and future development plans is found at the +[specification development milestones](https://github.com/open-telemetry/opentelemetry-specification/milestones). + +## Notation Conventions and Compliance + +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in the [specification](overview) are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [[RFC2119](https://tools.ietf.org/html/rfc2119)] [[RFC8174](https://tools.ietf.org/html/rfc8174)] when, and only when, they appear in all capitals, as shown here. + +An implementation of the [specification](overview) is not compliant if it fails to satisfy one or more of the "MUST", "MUST NOT", "REQUIRED", "SHALL", or "SHALL NOT" requirements defined in the [specification](overview). +Conversely, an implementation of the [specification](overview) is compliant if it satisfies all the "MUST", "MUST NOT", "REQUIRED", "SHALL", and "SHALL NOT" requirements defined in the [specification](overview). + +## Versioning the Specification + +Changes to the [specification](overview) are versioned according to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html) and described in [CHANGELOG][]. Layout changes are not versioned. Specific implementations of the specification should specify which version they implement. + +Changes to the change process itself are not currently versioned but may be independently versioned in the future. + +## Acronym + +The official acronym used by the OpenTelemetry project is "OTel". + +Please refrain from using "OT" in order to avoid confusion with the now deprecated "OpenTracing" project. + +[CHANGELOG.md]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/CHANGELOG.md diff --git a/package.json b/package.json index c8af69a478c2..eda97796ae0c 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,13 @@ "get:milestones": "node -r esm ./scripts/fetchMilestones.js", "postbuild:preview": "npm run _check-links", "postbuild:production": "npm run _check-links", - "prebuild:preview": "npm run submodule:get && npm run get:milestones", - "prebuild:production": "npm run submodule:get && npm run get:milestones", - "prebuild": "npm run submodule:get", + "prebuild:preview": "npm run submodule:get && npm run get:milestones && ./scripts/cp-spec-pages.sh", + "prebuild:production": "npm run submodule:get && npm run get:milestones && ./scripts/cp-spec-pages.sh", + "prebuild": "npm run submodule:get && ./scripts/cp-spec-pages.sh", "precheck-links": "npm run build", "preinstall": "npm run submodule:get", - "preserve": "npm run submodule:get", - "preserve:hugo": "npm run submodule:get", + "preserve": "npm run submodule:get && ./scripts/cp-spec-pages.sh", + "preserve:hugo": "npm run submodule:get && ./scripts/cp-spec-pages.sh", "schemas:update": "npm run submodule:update content-modules/opentelemetry-specification", "serve": "npm run _serve", "serve:hugo": "npm run _serve:hugo", diff --git a/scripts/adjust-spec-pages.pl b/scripts/adjust-spec-pages.pl new file mode 100755 index 000000000000..17ea8729cc88 --- /dev/null +++ b/scripts/adjust-spec-pages.pl @@ -0,0 +1,79 @@ +#!/usr/bin/perl -w -i + +$^W = 1; + +use strict; +use warnings; +use diagnostics; + +my $file = ''; +my $title = ''; +my $linkTitle = ''; +my $gD = 0; +my $semConvRef = 'https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/README.md'; + +sub printTitle() { + + print "---\n"; + print "title: $title\n"; + print "weight: 1\n" if $title eq "Overview"; + ($linkTitle) = $title =~ /^OpenTelemetry (.*)/; + # ($linkTitle) = $linkTitle =~ /^Metrics (.*)/; + $linkTitle = 'FaaS' if $ARGV =~ /faas-metrics.md$/; + $linkTitle = 'HTTP' if $ARGV =~ /http-metrics.md$/; + print "linkTitle: $linkTitle\n" if $linkTitle; + print "---\n"; +} + +sub skipDetailsOrToc() { + while(<>) { + last if /<\/details>|