schemaprocessor

package module
v0.52.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2022 License: Apache-2.0 Imports: 12 Imported by: 2

README

Schema Transformer Processor

🚧 Currently under development, subject to change 🚧

Supported Pipelines: traces, metrics, logs

The Schema Processor is used to convert existing telemetry data or signals to a version of the semantic convention defined as part of the configuration. The processor works by using a set of target schema URLs that are used to match incoming signals. On a match, the processor will fetch the schema translation file (if not cached) set by the incoming signal and apply the transformations required to export as the target semantic convention version.

Furthermore, it is also possible for organisations and vendors to publish their own semantic conventions and be used by this processor, be sure to follow schema overview for all the details.

Caching Schema Translation Files

In order to improve efficiency of the processor, the prefetch option allows the processor to start downloading and preparing the translations needed for signals that match the schema URL.

Schema Formats

A schema URl is made up in two parts, Schema Family and Schema Version, the schema URL is broken down like so:

|                       Schema URL                           |
| https://example.com/telemetry/schemas/ |  |      1.0.1     |
|             Schema Family              |  | Schema Version |

The final path in the schema URL MUST be the schema version and the preceding portion of the URL is the Schema Family. To read about schema formats, please read more here

Targets Schemas

Targets define a set of schema URLs with a schema identifier that will be used to translate any schema URL that matches the target URL to that version. In the event that the processor matches a signal to a target, the processor will translate the signal from the published one to the defined identifier; for example using the configuration below, a signal published with the https://opentelemetry.io/schemas/1.8.0 schema will be translated by the collector to the https//opentelemetry.io/schemas/1.6.1 schema. Within the schema targets, no duplicate schema families are allowed and will report an error if detected.

Example

processors:
  schema:
    prefetch:
    - https://opentelemetry.io/schemas/1.9.0
    targets:
    - https://opentelemetry.io/schemas/1.6.1
    - http://example.com/telemetry/schemas/1.0.1

For more complete examples, please refer to config.yml.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ProcessorFactory

Types

type Config

type Config struct {
	config.ProcessorSettings `mapstructure:",squash"`

	// PreCache is a list of schema URLs that are downloaded
	// and cached at the start of the collector runtime
	// in order to avoid fetching data that later on could
	// block processing of signals. (Optional field)
	Prefetch []string `mapstructure:"prefetch"`

	// Targets define what schema families should be
	// translated to, allowing older and newer formats
	// to conform to the target schema identifier.
	Targets []string `mapstructure:"targets"`
}

Config defines the user provided values for the Schema Processor

func (*Config) Validate

func (c *Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL