Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions .cspell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# For settings, see
# https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/
version: '0.2'
language: en-US
caseSensitive: true
allowCompoundWords: true
useGitignore: true
import:
- https://cdn.jsdelivr.net/npm/@cspell/dict-people-names/cspell-ext.json
ignorePaths:
- '**/*.svg'
- '.*.yml'
- '.*.yaml'
- 'schemas/**'
- 'spec-compliance-matrix/*.yaml'
- 'oteps/assets/0225*.*'
patterns:
- name: CodeBlock
pattern: |
/
^(\s*[~`]{3,}) # Matches 3 or more backticks or tildes to start a code block.
.* # all languages and options, e.g. shell {hl_lines=[12]}
[\s\S]*? # content
\1 # Matches the same symbol which started the match.
/igmx
- name: CodeName
pattern: |
/
([~`]) # Matches a single backtick or tilde to start a code block.
[^~`]*? # Matches any characters except backticks or tildes, non-greedy.
\1 # Matches the same symbol which started the match.
/x
- name: Links
pattern: |
/
\[[^\]]+\] # Matches the link text inside square brackets [ ... ].
\( # Match the opening parentheses for the URL.
[^)]+ # Matches any URL/path until the closing ) — works for both relative and absolute.
\) # Match the closing parentheses for the URL.
/x
- name: Redirect
pattern: |
/
redirect:.+$ # Matches any front-matter redirect line.
/mx
languageSettings:
- languageId:
- markdown
- yaml
ignoreRegExpList:
- CodeBlock
- CodeName
- Links
- Redirect
dictionaries:
# Local word lists
- en-words
# Programming languages and software terms
- cpp
- csharp
- dart
- django
- docker
- dotnet
- elixir
- flutter
- fsharp
- golang
- haskell
- html
- java
- julia
- k8s
- kotlin
- markdown
- node
- npm
- php
- python
- ruby
- rust
- scala
- softwareTerms
- swift
- typescript
# Other
- companies
- aws
- google
- people-names
words:
- BLRP
- Kubecon
- OpAMP
- OTCA
- OTEP
- OTTL
- cumulatives
- deser
- inclusivity
- oteps
- representivity
- relatedly
- Naur
- configurator
- relitigating
- IDCONTEXT
- pdata
- Dpanic
8 changes: 6 additions & 2 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ jobs:
- name: check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: run misspell
run: make misspell
- uses: streetsidesoftware/cspell-action@v8
with:
incremental_files_only: false # check all files, not just changed files
config: .cspell.yaml
suggestions: true
treat_flagged_words_as_errors: true
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ bin
# Vim
.swp

# Misspell binary
internal/tools/bin

# Node.js files for tools (e.g. markdown-toc)
node_modules/
package-lock.json
Expand Down
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-cspell-bundled-dictionaries"
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"rewrap.wrappingColumn": 80,
"editor.rulers": [80],
"cSpell.autoFormatConfigFile": true,
"markdownlint.config": {
"MD004": false,
"MD013": false,
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ release.

### Common

- OTLP Exporters may allow devs to prepend a product identifier in `User-Agent` header.
- OTLP Exporters may allow developers to prepend a product identifier in `User-Agent` header.
([#4560](https://github.com/open-telemetry/opentelemetry-specification/pull/4560))
- ⚠️ **IMPORTANT**: Extending the set of standard attribute value types is no longer a breaking change.
([#4614](https://github.com/open-telemetry/opentelemetry-specification/pull/4614))
Expand Down
17 changes: 3 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ checks directly.
See:

- [MarkdownStyle](#markdown-style)
- [Misspell Check](#misspell-check)
- [CSpell Check](#cspell-check)
- Markdown link checking (docs TODO)

### Autoformatting
Expand All @@ -120,7 +120,6 @@ You can also run these fixes individually.

See:

- [Misspell Correction](#misspell-check)
- Table Generation (docs TODO)

### Markdown style
Expand Down Expand Up @@ -148,24 +147,14 @@ with the Node version of markdownlint. If you are using Visual Studio Code,
you can also use the `fixAll` command of the
[vscode markdownlint extension](https://github.com/DavidAnson/vscode-markdownlint).

### Misspell check
### CSpell check

In addition, please make sure to clean up typos before you submit the change.

To check for typos, run the following command:

```bash
make misspell
```

> [!NOTE]
> The `misspell` make target will also fetch and build the tool if
> necessary. You'll need [Go](https://go.dev) to build the spellchecker.

To quickly fix typos, use

```bash
make misspell-correction
make cspell
```

## Updating the Compliance Matrix
Expand Down
31 changes: 7 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# All documents to be used in spell check.
ALL_DOCS := $(shell find . -type f -name '*.md' -not -path './.github/*' -not -path './node_modules/*' -not -path '*semantic_conventions*' -not -name 'spec-compliance-matrix.md' | sort)
PWD := $(shell pwd)

TOOLS_DIR := ./internal/tools
MISSPELL_BINARY=bin/misspell
MISSPELL = $(TOOLS_DIR)/$(MISSPELL_BINARY)

# Detect Python and pip commands
PYTHON := $(shell command -v python3 2>/dev/null || command -v python 2>/dev/null)
PIP := $(shell command -v pip3 2>/dev/null || command -v pip 2>/dev/null)
Expand All @@ -28,18 +22,12 @@ SEMCONVGEN_VERSION=0.17.0

# TODO: add `yamllint` step to `all` after making sure it works on Mac.
.PHONY: all
all: install-tools markdownlint markdown-link-check misspell

$(MISSPELL):
cd $(TOOLS_DIR) && go build -o $(MISSPELL_BINARY) github.com/client9/misspell/cmd/misspell
all: install-tools markdownlint markdown-link-check cspell

.PHONY: misspell
misspell: $(MISSPELL)
$(MISSPELL) -error $(ALL_DOCS)

.PHONY: misspell-correction
misspell-correction: $(MISSPELL)
$(MISSPELL) -w $(ALL_DOCS)
.PHONY: cspell
cspell:
@if ! npm ls cspell; then npm install; fi
npx cspell . --no-progress

.PHONY: markdown-link-check
markdown-link-check:
Expand Down Expand Up @@ -104,14 +92,9 @@ yamllint:

# Run all checks in order of speed / likely failure.
.PHONY: check
check: misspell markdownlint markdown-link-check
check: cspell markdownlint markdown-link-check
@echo "All checks complete"

# Attempt to fix issues / regenerate tables.
.PHONY: fix
fix: misspell-correction
@echo "All autofixes complete"

# Generate spec compliance matrix from YAML source
.PHONY: compliance-matrix
compliance-matrix: check-python
Expand All @@ -120,6 +103,6 @@ compliance-matrix: check-python
@echo "Compliance matrix generation complete"

.PHONY: install-tools
install-tools: $(MISSPELL)
install-tools:
npm install
@echo "All tools installed"
5 changes: 0 additions & 5 deletions internal/tools/go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions internal/tools/go.sum

This file was deleted.

27 changes: 0 additions & 27 deletions internal/tools/tools.go

This file was deleted.

2 changes: 1 addition & 1 deletion oteps/0149-exponential-histogram.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ message ExponentialBucketCounts {

Notes:

* ExponentialBuckets will be added as "oneof" the bucket types in [#272](https://github.com/open-telemetry/opentelemetry-proto/pull/272)
* ExponentialBuckets will be added as "one-of" the bucket types in [#272](https://github.com/open-telemetry/opentelemetry-proto/pull/272)
* Per [#257](https://github.com/open-telemetry/opentelemetry-proto/issues/257), only a histogram accepting "double" will be defined.
* Per [#259](https://github.com/open-telemetry/opentelemetry-proto/issues/259), bucket counts type is "double".

Expand Down
2 changes: 1 addition & 1 deletion oteps/logs/0097-log-data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ this data model.
<tr>
<td>MSGID</td>
<td>string</td>
<td>Defines the type of the event. Part of event source identity. Example: "TCPIN"</td>
<td>Defines the type of the event. Part of event source identity. Example: `"TCPIN"`</td>
<td>Name</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion oteps/metrics/0072-metric-observer.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Callbacks must not be called synchronously with application code via
any OpenTelemetry API. This prevents the application from potentially
deadlocking itself by being called synchronously from its own thread.
Implementations that cannot provide this guarantee should prefer not
to implement Observer instrsuments.
to implement Observer instruments.

Callbacks may be called synchronously in the SDK on behalf of an
exporter, provided it does not contradict the requirement above.
Expand Down
2 changes: 1 addition & 1 deletion oteps/trace/4673-experimental-probability-sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ each OpenTelemetry SDK.
The `ConsistentProbabilityBased` Sampler MUST set `r` when it makes a
root sampling decision.

##### Requirement: ConsistentProbabilityBased sampler unsets p when not sampled
##### Requirement: ConsistentProbabilityBased sampler un-sets p when not sampled

The `ConsistentProbabilityBased` Sampler MUST unset `p` from the
`tracestate` when it decides not to sample.
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"devDependencies": {
"@cspell/dict-people-names": "1.1.16",
"cspell": "9.6.3",
"markdown-link-check": "3.14.2",
"markdown-toc": "1.2.0",
"markdownlint-cli": "0.47.0"
Expand Down
2 changes: 1 addition & 1 deletion specification/logs/data-model-appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ this data model.
<tr>
<td>MSGID</td>
<td>string</td>
<td>Defines the type of the event. Part of event source identity. Example: "TCPIN"</td>
<td>Defines the type of the event. Part of event source identity. Example: `"TCPIN"`</td>
<td>`Attributes["syslog.msgid"]`</td>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions specification/metrics/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ in OTLP represents a sampled value at a given time. A Gauge stream consists of:
- (optional) A timestamp (`start_time_unix_nano`) which best represents the
first possible moment a measurement for this timeseries could have been
recorded.
- (optional) a set of examplars (see [Exemplars](#exemplars)).
- (optional) a set of exemplars (see [Exemplars](#exemplars)).
- (optional) Data point flags (see [Data point flags](#data-point-flags)).

In OTLP, a point within a Gauge stream represents the last-sampled event for a
Expand Down Expand Up @@ -1089,7 +1089,7 @@ Every OTLP metric data point has two associated timestamps. The
first, mandatory timestamp is the one associated with the observation,
the moment when the measurement became current or took effect, and is
referred to as `TimeUnixNano`. The second, optional timestamp is used
to indicate when a sequence of points is unbroken and to inidcate when a
to indicate when a sequence of points is unbroken and to indicate when a
timeseries began accumulating measurements. The second timestamp is referred to
as `StartTimeUnixNano`.

Expand Down
Loading