Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce schema for registry entries #4805

Merged
merged 15 commits into from
Jul 31, 2024
Merged
30 changes: 30 additions & 0 deletions .github/workflows/check-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Registry Validation

on:
pull_request:
# Make sure this only runs when registry entries are touched.
paths:
- 'data/registry/**'

jobs:
registry-validation:
name: REGISTRY validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create and use reduced-dependencies package.json
run: |
mkdir -p tmp
jq '.devDependencies |= with_entries(
select(.key | test("gulp|markdown|through|require|yargs|js-yaml|ajv|ajv-formats|ajv-errors"))
)
| del(.dependencies, .optionalDependencies)' \
package.json > tmp/package-ci.json
cp tmp/package-ci.json package.json
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: tmp/package-ci.json
- run: npm install --ignore-scripts --omit=optional
- run: npm run check:registry
2 changes: 1 addition & 1 deletion .github/workflows/check-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
mkdir -p tmp
jq '.devDependencies |= with_entries(
select(.key | test("gulp|markdown|through|require|yargs"))
select(.key | test("gulp|markdown|through|require|yargs|js-yaml|ajv|ajv-formats|ajv-errors"))
)
| del(.dependencies, .optionalDependencies)' \
package.json > tmp/package-ci.json
Expand Down
188 changes: 188 additions & 0 deletions data/registry-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://opentelemetry.io/ecosystem/registry/schema.json",
"$comment": "https://opentelemetry.io/ecosystem/registry/adding/",
"description": "A schema for entries in the OpenTelemetry registry",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the entry",
"errorMessage": "The title of the entry must be a string and can not be empty",
"minLength": 1
},
"registryType": {
"type": "string",
"description": "The type of the entry",
"enum": [
"core",
"exporter",
"extension",
"instrumentation",
"log-bridge",
"processor",
"receiver",
"resource-detector",
"utilities"
]
},
"language": {
"type": "string",
"description": "The programming language of the entry",
"examples": ["collector"]
},
"description": {
"type": "string",
"description": "A description of the entry",
"errorMessage": "The description of the entry must be a string and can not be empty"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of tags for the entry",
"uniqueItems": true
},
"license": {
"type": "string",
"description": "The license of the entry",
"examples": ["Apache 2.0", "MIT"]
},
"createdAt": {
"type": "string",
"description": "The date the entry was created",
"format": "date"
},
"authors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"oneOf": [
{
"pattern": "OpenTelemetry Authors",
"errorMessage": "The name of the author can not contain 'OpenTelemetry' except for 'OpenTelemetry Authors'"
},
{
"pattern": "^(?!.*OpenTelemetry).*$"
}
],
"description": "The name of the author",
"errorMessage": "The name of the author must be a string"
},
"email": {
"type": "string",
"description": "The email address of the author",
"format": "email"
},
"url": {
"type": "string",
"description": "The URL of the author",
"pattern": "^https:\\/\\/github\\.com\\/([a-zA-Z0-9](?:-?[a-zA-Z0-9]){0,38})$",
"errorMessage": "The URL of the author must be a valid GitHub user URL"
}
},
"if": {
"properties": {
"name": {
"const": "OpenTelemetry Authors"
}
}
},
"then": {
"required": ["name"]
},
"else": {
"required": ["name"],
"anyOf": [
{
"required": ["email"]
},
{
"required": ["url"]
}
],
"errorMessage": "An author must have an email or a URL"
},
"additionalProperties": false
},
"description": "A list of authors of the entry",
"minItems": 1
},
"urls": {
"type": "object",
"properties": {
"repo": {
"type": "string",
"description": "The URL of the repository"
},
"docs": {
"type": "string",
"description": "The URL of the documentation"
}
},
"required": ["repo"],
"additionalProperties": false
},
"package": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the package"
},
"version": {
"type": "string",
"description": "The version of the package"
},
"registry": {
"type": "string",
"description": "The registry of the package",
"enum": [
"crates",
"npm",
"pip",
"gems",
"maven",
"nuget",
"packagist",
"go",
"go-collector",
"hex"
]
},
"quickInstall": {
"type": "boolean",
"description": "A flag to indicate if a quick install can be shown"
}
},
"required": ["name", "registry"],
"additionalProperties": false
},
"deprecated": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for deprecation",
"errorMessage": "The reason for deprecation must be a string and can not be empty"
}
},
"required": ["reason"],
"additionalProperties": false
},
"isNative": {
"type": "boolean",
"description": "A flag to indicate if the entry is native"
},
"isFirstParty": {
"type": "boolean",
"description": "A flag to indicate if the entry is first party"
}
},
"additionalProperties": false,
"required": ["title", "description", "urls", "authors"]
}
2 changes: 2 additions & 0 deletions data/registry/collector-extension-googleclientauth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ urls:
repo: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/googleclientauthextension
license: Apache 2.0
description:
This extension provides Google OAuth2 Client Credentials and Metadata for gRPC
and HTTP based exporters.
authors:
- name: OpenTelemetry Authors
createdAt: 2024-04-18
Expand Down
3 changes: 3 additions & 0 deletions data/registry/collector-receiver-splunkenterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ tags:
- collector
license: Apache 2.0
description:
The Splunk Enterprise Receiver is a pull based tool which enables the
ingestion of performance metrics describing the operational status of a user's
Splunk Enterprise deployment to an appropriate observability tool.
authors:
- name: OpenTelemetry Authors
urls:
Expand Down
1 change: 0 additions & 1 deletion data/registry/exporter-dotnet-prometheus-aspnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ tags:
- dotnet
- core
- exporter
- dotnet
license: Apache 2.0
description:
An OpenTelemetry Prometheus exporter for configuring an ASP.NET Core
Expand Down
2 changes: 2 additions & 0 deletions data/registry/instrumentation-js-dataloader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ tags:
- instrumentation
- js
license: Apache 2.0
authors:
- name: OpenTelemetry Authors
description:
This module provides an instrumentation library for the injection of trace
context to dataloader
Expand Down
2 changes: 1 addition & 1 deletion data/registry/instrumentation-js-nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license: MIT
description: Next.js supports OpenTelemetry instrumentation out of the box.
authors:
- name: Vercel, Inc.
url: https://github.com/vercel/
url: https://github.com/vercel
urls:
repo: https://github.com/vercel/next.js/tree/canary/packages/next/src/server/lib/trace
docs: https://nextjs.org/docs/app/building-your-application/optimizing/open-telemetry
Expand Down
2 changes: 2 additions & 0 deletions data/registry/instrumentation-js-redis-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ tags:
- instrumentation
- js
license: Apache 2.0
authors:
- name: OpenTelemetry Authors
description:
This module provides automatic instrumentation for the `redis@^4.0.0` package.
urls:
Expand Down
1 change: 1 addition & 0 deletions data/registry/otel-lua.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license: Apache 2.0
description: An unofficial implementation of OpenTelemetry in lua.
authors:
- name: yangxikun
url: https://github.com/yangxikun
urls:
repo: https://github.com/yangxikun/opentelemetry-lua
createdAt: 2022-12-17
2 changes: 1 addition & 1 deletion data/registry/otel-ocaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description:
several exporters to talk to signal collectors
authors:
- name: Imandra
url: https://imandra.ai
url: https://github.com/imandra-ai
urls:
repo: https://github.com/imandra-ai/ocaml-opentelemetry/
createdAt: 2022-10-26
2 changes: 1 addition & 1 deletion data/registry/tools-ansible-grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description:
multiple machines
authors:
- name: Ishan Jain
url: https://www.github.com/ishanjainn
url: https://github.com/ishanjainn
- name: Grafana Labs
urls:
repo: https://github.com/grafana/grafana-ansible-collection/tree/main/roles/opentelemetry_collector
Expand Down
2 changes: 1 addition & 1 deletion data/registry/tools-cpp-conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:
license: MIT
description: Conan package for `opentelemetry-cpp`.
authors:
- name:
- name: The conan authors
urls:
repo: https://conan.io/center/recipes/opentelemetry-cpp
createdAt: 2023-02-13
2 changes: 1 addition & 1 deletion data/registry/tools-cpp-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:
license: MIT
description: A vcpkg package for opentelemetry-cpp.
authors:
- name:
- name: The vcpkg Authors
urls:
repo: https://github.com/microsoft/vcpkg/tree/master/ports/opentelemetry-cpp
createdAt: 2023-02-13
2 changes: 1 addition & 1 deletion data/registry/tools-python-resourcedetector-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ tags:
license: Apache 2.0
description: >
This library provides support for detecting GCP resources like GCE, GKE, etc.
authors:
- name: Google
url: https://github.com/GoogleCloudPlatform
urls:
repo: https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/tree/main/opentelemetry-resourcedetector-gcp
createdAt: 2020-08-13
1 change: 0 additions & 1 deletion data/registry/tools-rust-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ tags:
license: Apache 2.0
authors:
- name: OpenTelemetry Authors

urls:
repo: https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-aws
createdAt: 2021-02-08
Expand Down
Loading
Loading