opentelemetry.io
opentelemetry.io copied to clipboard
Add `/schemas` in YAML, `/schemas/list` in HTML, and a 404 page for the rest
- Proposal for https://github.com/open-telemetry/opentelemetry-specification/issues/3762
- Fixes #3468
- Adds
/schemas, the list of schemas published on the site, in YAML format - Adds
/schemas/list, the lists of published schemas in human-readable form - Adds a custom 404 page for any URL
/schemas/*that isn't a valid schema, or the pageslistorlatest
Previews
- https://deploy-preview-3537--opentelemetry.netlify.app/schemas - schemas list as YAML
- https://deploy-preview-3537--opentelemetry.netlify.app/schemas/ - schemas list as YAML
- https://deploy-preview-3537--opentelemetry.netlify.app/schemas/list/ - shows schemas list page
Redirect tests
- https://deploy-preview-3537--opentelemetry.netlify.app/schemas/latest --> 1.23.0 (as of the time of writing)
- https://deploy-preview-3537--opentelemetry.netlify.app/schemas/latest/ --> 1.23.0 (as of the time of writing)
- https://deploy-preview-3537--opentelemetry.netlify.app/schemas/x.y.z - nonexistent version --> schemas 404
Screenshots / output
YAML list (/schemas):
# OpenTelemetry Schemas v1.23.0
#
# For details, see https://opentelemetry.io/schemas/list
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.1
- 1.5.0
- 1.4.0
List page (/schemas/list):
404 page (/schemas/x.y.z):
HTTP status tests
$ curl -sI https://deploy-preview-3537--opentelemetry.netlify.app/schemas/x.y.z | grep -E 'HTTP|-type|location'
HTTP/2 404
content-type: text/html; charset=UTF-8
$ curl -sI https://deploy-preview-3537--opentelemetry.netlify.app/schemas/1.23.0 | grep -E 'HTTP|-type|location'
HTTP/2 200
content-type: application/yaml
- Adds
/schemas, the list of schemas published on the site, in YAML format
I think this needs to be defined in the spec repo.
Putting this in draft mode until the machine-readable list appears in the spec repo. https://github.com/open-telemetry/opentelemetry-specification/issues/3762#issuecomment-1810668020