This repository contains the JSON schema definitions of the OpenTelemetry declarative configuration data model.
The examples directory contains a variety of sample configuration files to help get started and illustrate useful patterns. The following are noteworthy:
There are several tools available to generate code from a JSON schema. The following shows an example for generating code from the JSON schema in Go:
go-jsonschema \ -p telemetry \ --schema-package=https://opentelemetry.io/otelconfig/opentelemetry_configuration.json=github.com/open-telemetry/opentelemetry-collector/schema \ ./schema/opentelemetry_configuration.json
NOTICE: The stability definitions are applicable after this repository publishes a stable release (1.0.0). Currently, this repository is experimental and makes no stability guarantees.
This repository strictly follows Semantic Versioning 2.0.0. This means that all releases have a version following the format MAJOR.MINOR.PATCH
.
Stability definition consists of the following sections:
file_format
property and implementation behavior when schema versions are not aligned.The objective of stability is to protect users from breaking changes. That is, users providing configuration conforming to a particular stable MAJOR
version of the schema expect to reliably upgrade MINOR
and PATCH
versions without risk that their configuration becomes invalid, or that the interpretation changes.
Similarly, language implementations are expected to provide in-memory configuration model representations, which have their own stability guarantees as defined by respective language SIGs, and which users expect to reliably upgrade. The stability guarantees inform maintainers on the types of changes they need to consider when creating these representations, which may be produced "by hand" or with code generation logic. NOTE: There is no guarantee that the output of off-the-shelf code generation tools will be stable when allowed changes are made.
All schema changes are considered through the lens of maintaining this objective.
Guarantees and allowed changesThe following guarantees apply to MINOR
version changes. There are no guarantees for MAJOR
version changes.
A type is the JSON schema analog to a protobuf message. Types have a type of object
, and use various keywords to describe their properties and conditions which constitute valid data.
Stable types provide the following guarantees. All types except those excluded in applicability are considered stable after a 1.0.0 release.
type
of properties will not change, except the allowed addition of null
.minLength
will not increase and maxLength
will not decrease.minimum
, exclusiveMinimum
will not increase; maximum
, exclusiveMaximum
will not decrease.true
to false
.minProperties
will not increase, maxProperties
will not decrease.minItems
will not increase, maxItems
will not decrease.false
to true
.The following additive changes are allowed:
required
.description
annotation.deprecated
annotation.Stability guarantees do not apply to experimental features and extension points.
Sometimes we need to experiment with new types and properties. For example, to evaluate the configuration experience for experimental features in opentelemetry-specification.
Experimental properties are denoted by a */(development|alpha|beta)
suffix (e.g.foo/development
). The suffix indicates the property value and all types nested within it are exempt from stability guarantees, and are subject to breaking changes in minor versions. Experimental type key values in $defs
should be prefixed with Experimental*
(e.g. ExperimentalFoo
). Note that because we omit the title annotation, the $defs
key value effectively acts as the type title for code generation tools.
Maintainers are not obligated to implement support for experimental properties and types. When they do, they are no obligated to maintain any stability guarantees.
End users should be cautious of adopting experimental properties and types, since in doing so they are subject to breaking changes in MINOR
versions.
The schema contains types which are designed for extension, as indicated by the presence of "additionalProperties": true
. For example, component provider provides mechanisms for referencing custom SDK extension components like exporters, processors, samplers, etc. The stability guarantees surrounding properties not explicitly defined in this repository is out of scope. Users should consult documentation for the components interpreting these additional properties and decide if their stability guarantees are sufficient for adoption.
The top level .file_format
property is special in that it conveys the version of the schema a user's configuration conforms to. Implementations also target a particular version of the schema, which may or may not align with the version specified by the user.
Given the guarantees and allowed changes, implementations may encounter the following scenarios:
file_format
MAJOR
version aligns with the implementation MAJOR
version, AND:
file_format
MINOR
version is less than or equal to the implementation MINOR
version: This is ideal, with versions maximally aligned. Despite this, an implementation might not support every property and type of its target version.file_format
MINOR
version is greater than the implementation MINOR
version: The implementation should detect and emit a warning since there may be configuration features the user specifies which the implementation does not understand. However, this is acceptable in many cases, and not terribly different from the ideal path where an implementation also might not support every configuration feature.file_format
MAJOR
version does not align with the implementation MAJOR
version. The implementation should produce an error, since there may be breaking changes in the properties and semantics on how they are interpreted. Implementations may choose to temporarily support multiple major version to accommodate transitioning users.See CONTRIBUTING.md
For more information about the maintainer role, see the community repository.
For more information about the approver role, see the community repository.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4