Skip to main content

Module editors

Module editors 

Source
Expand description

Standard OTTL editor functions.

Editors are callback functions invoked as top-level OTTL statements (e.g. set(target, value)). This module provides the set of editors defined by the OpenTelemetry Transformation Language specification so that integrators can bootstrap a CallbackMap without re-implementing common logic.

§Example

// Start with the standard editors…
let mut editors = ottl::editors::standard();

// …and extend with project-specific editors if needed.
editors.insert("my_editor".to_string(), Arc::new(|args: &mut dyn ottl::Args| {
    todo!()
}));

Functions§

standard
Returns a CallbackMap pre-populated with the standard OTTL editor functions.