Skip to content

Commit 358fe0d

Browse files
committed
Update docs.
1 parent 5c86edf commit 358fe0d

3 files changed

Lines changed: 99 additions & 20 deletions

File tree

website/blog/2026-07-23_proto-v0.59.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ designed for — calendar versions, partial versions, and tool-specific quirks.
6363
been a constant source of edge cases, so in this release, we threw it all away and wrote a custom
6464
grammar-based parser designed for how proto actually consumes versions.
6565

66-
What does this unlock? For starters, first-class version scopes: a named prefix attached to a
67-
version or requirement, such as `openjdk-21.0.2`, `zulu-26`, or `pypy-2.1`. Scopes are what power
66+
What does this unlock? For starters, first-class
67+
[version scopes](/docs/proto/tool-spec#version-scopes): a named prefix attached to a version or
68+
requirement, such as `openjdk-21.0.2`, `zulu-26`, or `pypy-2.1`. Scopes are what power
6869
Java distributions above, are passed through the WASM plugin API for any plugin to consume, and
6970
remote version lists are now cached per scope.
7071

@@ -112,10 +113,11 @@ This release fixes two long-standing `PATH` issues in `proto run` and shim execu
112113

113114
### Calendar version build segments
114115

115-
As part of the new parser, the proto-specific underscore "micro/build" segment has been removed
116-
from calendar versions. Use standard build metadata instead.
116+
As part of the new parser, the proto-specific "micro" build segment (dot or underscore separated)
117+
has been removed from calendar versions. Use standard build metadata instead.
117118

118119
```
120+
2024-02-26.123 -> 2024-02-26+123
119121
2024-02-26_123-alpha.0 -> 2024-02-26-alpha.0+123
120122
```
121123

website/docs/proto/reporting.mdx

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,54 @@ This is opt-in, and enabled with the following global options (or environment va
5757

5858
- `--otel` (`PROTO_OTEL`) - Export traces and metrics over OTLP.
5959
- `--otel-logs` (`PROTO_OTEL_LOGS`) - Also export log events as OTLP logs.
60-
- `--otel-service-name <name>` (`PROTO_OTEL_SERVICE_NAME`) - The service name to report.
60+
- `--otel-service-name <name>` (`PROTO_OTEL_SERVICE_NAME`) - The service name to report. If not
61+
provided, the standard `OTEL_SERVICE_NAME` environment variable is used.
62+
<VersionLabel version="0.59.0" />
6163

6264
The OTLP destination and transport are configured using the standard `OTEL_EXPORTER_OTLP_*`
6365
environment variables, like `OTEL_EXPORTER_OTLP_ENDPOINT`.
6466

6567
```shell
68+
$ export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
69+
$ proto --otel install node
70+
```
71+
72+
### Transports<VersionLabel version="0.59.0" />
73+
74+
OTLP payloads can be delivered over HTTP (`http/protobuf`) or gRPC (`grpc`). The transport is
75+
selected with the standard environment variables, where the per-signal variable takes precedence
76+
over the generic one:
77+
78+
- `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL`, `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`,
79+
`OTEL_EXPORTER_OTLP_LOGS_PROTOCOL` - The transport for an individual signal.
80+
- `OTEL_EXPORTER_OTLP_PROTOCOL` - The transport for all signals. When not set, defaults to
81+
`http/protobuf`.
82+
83+
The same precedence applies to endpoints, using `OTEL_EXPORTER_OTLP_ENDPOINT` and the per-signal
84+
`OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` (and friends) variables. When an endpoint starts with
85+
`https://`, TLS is enabled, and the collector's certificate is verified against the operating
86+
system's trust store.
87+
88+
```shell
89+
# OTLP over gRPC
90+
$ export OTEL_EXPORTER_OTLP_PROTOCOL="grpc"
6691
$ export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317"
6792
$ proto --otel install node
6893
```
6994

95+
:::caution
96+
97+
The HTTP transport and TLS support are currently considered experimental.
98+
99+
:::
100+
101+
### Disabling signals<VersionLabel version="0.59.0" />
102+
103+
The standard environment variables can also force signals off, even when the options above have
104+
enabled them. `OTEL_SDK_DISABLED=true` disables all signals, while `OTEL_TRACES_EXPORTER=none`,
105+
`OTEL_METRICS_EXPORTER=none`, and `OTEL_LOGS_EXPORTER=none` disable an individual signal. These
106+
variables can only disable a signal, never enable one.
107+
70108
### Metrics
71109

72110
When OTEL is enabled, proto records the following metrics. Names ending in `.attempts` are counters,

website/docs/proto/tool-spec.mdx

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ tool = "1.2.3"
120120
### Guidelines
121121

122122
- major, minor, patch - `0-9` of any length
123-
- pre, build - `a-z`, `0-9`, `-`, `.`
123+
- pre, build - `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`
124+
- Must start with a letter or number.
125+
- A leading `v` or `V` prefix is accepted and ignored (`v1.2.3`).
124126

125127
> [Learn more about this format!](https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions)
126128
@@ -138,31 +140,65 @@ tool = "2025-02-26"
138140

139141
- `<year>-<month>` - 2024-02
140142
- `<year>-<month>-<day>` - 2024-02-26
141-
- `<year>-<month>-<day>.<build>` - 2024-02-26.123
142-
- `<year>-<month>-<day>_<build>` - 2024-02-26_123
143-
- `<year>-<month>-<day>.<build>-<pre>` - 2024-02-26.123-alpha.0
144-
- `<year>-<month>-<day>_<build>-<pre>` - 2024-02-26_123-alpha.0
145143
- `<year>-<month>-<day>-<pre>` - 2024-02-26-alpha.0
144+
- `<year>-<month>-<day>+<build>` - 2024-02-26+123
145+
- `<year>-<month>-<day>-<pre>+<build>` - 2024-02-26-alpha.0+123
146146

147147
### Guidelines
148148

149-
- year - `0-9` of 1-4 length
149+
- year - `0-9` of 2-4 length
150150
- If the year is not YYYY format, it will use the year 2000 as the base. For example, `24` becomes
151151
`2024`, and `124` becomes `2124`.
152152
- month - `0-9` of 1-2 length
153153
- Supports with and without a leading zero (`02` vs `2`).
154154
- Does not support invalid months (`0` or `13`).
155155
- day - `0-9` of 1-2 length
156-
- Can be omitted, even with build/pre.
156+
- Can be omitted, even with pre/build.
157157
- Supports with and without a leading zero (`02` vs `2`).
158158
- Does not support invalid days (`0` or `32`).
159-
- build - `0-9` of any length
160-
- Also known as a "micro" number.
161-
- The leading dot `.` format is preferred.
162-
- pre - `a-z`, `0-9`, `-`, `.`
159+
- pre - `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`
160+
- Must start with a letter, so that it is not mistaken for a day number.
161+
- build - `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`
162+
- Uses the same `+` prefixed build metadata syntax as semver.
163+
- A leading `v` or `V` prefix is accepted and ignored (`v2024-02`).
164+
165+
:::caution
166+
167+
The dot (`2024-02-26.123`) and underscore (`2024-02-26_123`) suffixed "micro" build segments from
168+
older proto versions were removed in v0.59. Use build metadata instead, for example
169+
`2024-02-26+123`.
170+
171+
:::
163172

164173
> [Learn more about this format!](https://calver.org/#scheme)
165174
175+
## Version scopes<VersionLabel version="0.59.0" />
176+
177+
Both version formats support an optional scope, which is a named prefix attached to the version
178+
with a dash. What a scope represents is defined by each tool's plugin — for example, the built-in
179+
Java plugin uses scopes to choose a [distribution vendor](./tools) — but the format itself is
180+
universal.
181+
182+
```toml title=".prototools"
183+
java = "openjdk-21.0.2"
184+
jdk = "temurin-21"
185+
```
186+
187+
### Syntax
188+
189+
- `<scope>-<version>` - openjdk-21.0.2, zulu-2026-01-15
190+
- `<scope>-<requirement>` - temurin-21, ^zulu-26
191+
192+
### Guidelines
193+
194+
- scope - `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`
195+
- Must start with a letter or number.
196+
- May itself contain dashes, as the scope ends where a valid version or requirement begins. For
197+
example, `graalvm-community-24.1.2` is the scope `graalvm-community` with the version `24.1.2`.
198+
- Scopes also work within [requirements and ranges](#requirements-and-ranges), for example
199+
`temurin-21 || zulu-22`.
200+
- Available version lists are fetched and cached separately for each scope.
201+
166202
## Requirements and ranges
167203

168204
Besides an explicit version, we also support partial versions known as version requirements or
@@ -178,8 +214,9 @@ tool-c = ">=2000-10"
178214

179215
### Syntax
180216

181-
- Requirement - `[<op>]<pattern>` - `1.2.3`, `>4.5`, `~3`, `^2000-10`, etc
182-
- AND range - `<requirement>[,] <requirement> ...` - `>=1, <2`, `^1.3 <=1.3.9`, etc
217+
- Requirement - `[<op>]<pattern>` - `1.2.3`, `>4.5`, `~3`, `^2000-10`, `1.x`, etc
218+
- AND range - `<requirement>[,|&&] <requirement> ...` - `>=1, <2`, `>=1 && <2`, `^1.3 <=1.3.9`,
219+
etc
183220
- OR range - `<requirement> || <requirement> ...` - `^1.2 || ^2.3`, `~2000-10 || ~2010-2`, etc
184221

185222
### Guidelines
@@ -191,9 +228,11 @@ tool-c = ">=2000-10"
191228
compatible)
192229
- To specify an _exact_ version, use the `=` operator explicitly.
193230
- pattern
194-
- Dot-separated semver, with optional major and patch numbers.
231+
- Dot-separated semver, with optional minor and patch numbers.
195232
- Dash-separated calver, with optional month and day numbers.
196-
- Pre-release and build metadata are only supported when suffixed to full versions.
233+
- Numbers may be a wildcard (`*`, `x`, `X`) to match any value, for example `1.x` or `2024-2-*`.
234+
- May be prefixed with a [version scope](#version-scopes).
235+
- Pre-releases may be suffixed to partial versions, but must start with a letter.
197236

198237
For example, if you want to use `npm` 11.6.2 but 11.6.3 has an issue, use:
199238
`npm = "^11.6.4 || =11.6.2"`

0 commit comments

Comments
 (0)