Skip to content
Draft
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"scripts": {
"generate-descriptions": "node scripts/generate-descriptions.js",
"generate-markdown": "node scripts/generate-markdown.js",
"fix-meta-schema": "node scripts/fix-meta-schema.js"
"fix-meta-schema": "node scripts/fix-meta-schema.js",
"generate-enriched-schema": "node scripts/generate-enriched-schema.js"
},
"devDependencies": {
"ajv-cli": "5.0.0"
Expand Down
253 changes: 253 additions & 0 deletions schema_out/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
{
"$id": "https://opentelemetry.io/otelconfig/common.json",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Showing these output files for demonstration purposes, but if we go in this direction, maybe we don't check these into git, but include them as release artifacts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after thinking about this more, i think we would definitely want to have whatever the current version is checked in

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also setup the tooling to directly modify the schema JSON files in place. This would also help ensure consistent formatting (i.e. indenting), and is akin to gofmt, prettier, spotless.

"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"IncludeExclude": {
"type": "object",
"additionalProperties": false,
"properties": {
"included": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"description": "Configure list of value patterns to include.\nValues are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, all values are included.\n"
},
"excluded": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"description": "Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).\nValues are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, .included attributes are included.\n"
}
}
},
"NameStringValuePair": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name of the pair."
},
"value": {
"type": [
"string",
"null"
],
"description": "The value of the pair."
}
},
"required": [
"name",
"value"
]
},
"OtlpHttpExporter": {
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"endpoint": {
"type": [
"string",
"null"
],
"description": "Configure endpoint, including the signal specific path.\nIf omitted or null, the http://localhost:4318/v1/{signal} (where signal is 'traces', 'logs', or 'metrics') is used.\n"
},
"tls": {
"$ref": "#/$defs/HttpTls",
"description": "Configure TLS settings for the exporter."
},
"headers": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/NameStringValuePair"
},
"description": "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\n"
},
"headers_list": {
"type": [
"string",
"null"
],
"description": "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n"
},
"compression": {
"type": [
"string",
"null"
],
"description": "Configure compression.\nValues include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n"
},
"timeout": {
"type": [
"integer",
"null"
],
"minimum": 0,
"description": "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n"
},
"encoding": {
"$ref": "#/$defs/OtlpHttpEncoding",
"description": "Configure the encoding used for messages. \nValues include: protobuf, json. Implementations may not support json.\nIf omitted or null, protobuf is used.\n"
}
}
},
"OtlpHttpEncoding": {
"type": [
"string",
"null"
],
"enum": [
"protobuf",
"json"
]
},
"OtlpGrpcExporter": {
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"endpoint": {
"type": [
"string",
"null"
],
"description": "Configure endpoint.\nIf omitted or null, http://localhost:4317 is used.\n"
},
"tls": {
"$ref": "#/$defs/GrpcTls",
"description": "Configure TLS settings for the exporter."
},
"headers": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/NameStringValuePair"
},
"description": "Configure headers. Entries have higher priority than entries from .headers_list.\nIf an entry's .value is null, the entry is ignored.\n"
},
"headers_list": {
"type": [
"string",
"null"
],
"description": "Configure headers. Entries have lower priority than entries from .headers.\nThe value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.\nIf omitted or null, no headers are added.\n"
},
"compression": {
"type": [
"string",
"null"
],
"description": "Configure compression.\nValues include: gzip, none. Implementations may support other compression algorithms.\nIf omitted or null, none is used.\n"
},
"timeout": {
"type": [
"integer",
"null"
],
"minimum": 0,
"description": "Configure max time (in milliseconds) to wait for each export.\nValue must be non-negative. A value of 0 indicates no limit (infinity).\nIf omitted or null, 10000 is used.\n"
}
}
},
"ExperimentalOtlpFileExporter": {
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"output_stream": {
"type": [
"string",
"null"
],
"description": "Configure output stream. \nValues include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.\nIf omitted or null, stdout is used.\n"
}
}
},
"ConsoleExporter": {
"type": [
"object",
"null"
],
"additionalProperties": false
},
"HttpTls": {
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"certificate_file": {
"type": [
"string",
"null"
],
"description": "Configure certificate used to verify a server's TLS credentials. \nAbsolute path to certificate file in PEM format.\nIf omitted or null, system default certificate verification is used for secure connections.\n"
},
"client_key_file": {
"type": [
"string",
"null"
],
"description": "Configure mTLS private client key. \nAbsolute path to client key file in PEM format. If set, .client_certificate must also be set.\nIf omitted or null, mTLS is not used.\n"
},
"client_certificate_file": {
"type": [
"string",
"null"
],
"description": "Configure mTLS client certificate. \nAbsolute path to client certificate file in PEM format. If set, .client_key must also be set.\nIf omitted or null, mTLS is not used.\n"
}
}
},
"GrpcTls": {
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"certificate_file": {
"type": [
"string",
"null"
],
"description": "Configure certificate used to verify a server's TLS credentials. \nAbsolute path to certificate file in PEM format.\nIf omitted or null, system default certificate verification is used for secure connections.\n"
},
"client_key_file": {
"type": [
"string",
"null"
],
"description": "Configure mTLS private client key. \nAbsolute path to client key file in PEM format. If set, .client_certificate must also be set.\nIf omitted or null, mTLS is not used.\n"
},
"client_certificate_file": {
"type": [
"string",
"null"
],
"description": "Configure mTLS client certificate. \nAbsolute path to client certificate file in PEM format. If set, .client_key must also be set.\nIf omitted or null, mTLS is not used.\n"
},
"insecure": {
"type": [
"boolean",
"null"
],
"description": "Configure client transport security for the exporter's connection. \nOnly applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.\nIf omitted or null, false is used.\n"
}
}
}
}
}
Loading
Loading