OTTL Playground
As the demand for observability and monitoring solutions grows, OpenTelemetry has emerged as a key framework for collecting, processing, and exporting telemetry data. Within this ecosystem, the OpenTelemetry Transformation Language (OTTL) is a powerful way to customize telemetry data transformation, but it can be daunting for both new and experienced users alike.
To help addressing these challenges, we are thrilled to introduce the OTTL Playground (https://ottl.run), a powerful and user-friendly tool designed to allow users to experiment with OTTL effortlessly. The playground provides a rich interface for users to create, modify, and test statements in real-time, making it easier to understand how different configurations impact the OpenTelemetry data transformation. Users can instantly validate OTTL transformations, from input to output, along with diffs. This allows new users to explore the nuances of OTTL without the risk of disrupting production environments.
How does it work?
The OTTL Playground allows you to run OTTL statements using different processors and versions. Currently, it supports the transform processor and the filter processor, with additional evaluators potentially being added in the future.
To start exploring, simply visit https://ottl.run. Once the processor configuration and OTLP payload are filled, click on the “Run” button in the top-right corner of the screen, and the result will instantly appear on the right-sided result panel.
The above example uses the transform processor to rename a trace resource attribute, and its effect on the data can be easily spotted on the diff-based result panel.
Examples of processor configurations and OTLP payloads can be loaded by selecting an option from the dropdown menu in the top-right corner of the Configuration and OTLP Payload panels.
Different results flavors
The primary goal of the OTTL Playground is to help users understand how processors and their OTTL statements impact telemetry data. The Playground offers several types of results to aid in this understanding, including visual results, JSON results, and execution debug logs.
- Visual delta: Shows a diff-based comparison, providing an intuitive and immediate understanding of how the data is transformed. This makes it easier for users to grasp complex changes without delving into raw data.
- Annotated delta: This visualization is similar to the visual delta, but instead of a graphical representation, it shows the JSON diff values, providing a detailed step-by-step explanation of the changes made to the original data.
- JSON: Offers a detailed view of the data, allowing users to see the exact output of their OTTL statements. This is particularly useful for debugging and verifying precise data transformations.
- Execution logs: The OTTL and processors have very detailed debug logs, which provide a step-by-step account of the processing. This is invaluable for troubleshooting and understanding the sequence of transformations applied to the data.
Together, these features empower users to experiment confidently with OTTL statements, ensuring they can fine-tune their telemetry data transformations with clarity and precision.
Sharing
The OTTL Playground supports sharing configurations easily. By clicking on the “Copy Link” button located in the top right corner of the interface, users can generate a unique URL that encapsulates their current playground state. This link can then be shared with colleagues or community members, allowing others to quickly load and review the exact setup. This feature facilitates collaboration and troubleshooting by enabling seamless sharing of specific OTTL configurations and results.
Given that the shareable links are public and might carry data on it, we advise you to refrain from submitting any confidential information.
Playground architecture
The OTTL Playground is a static website that operates entirely within the client's browser. It leverages WebAssembly, compiled from the actual OpenTelemetry Collector code, to deliver results identical to those of a real collector distribution, all while maintaining near-native performance.
The user interface of the OTTL Playground uses WebComponents, which offers several benefits. This modular approach makes the UI more maintainable and scalable, enabling reusability, and allowing developers to create and reuse the Playground elements across different projects.
The road so far
As we wrap up, it's important to note that the OTTL Playground is still in its beta phase. This means we're actively working on refining its features and improving its performance based on user feedback.
We're incredibly excited about the potential this tool holds for simplifying the OTTL usage and enhancing collaboration within the community. We invite you to explore the OTTL Playground, share your experiences, and help us shape it into a more efficient and user-friendly tool. Stay tuned for more updates and new features in the coming months!
This project is being developed in collaboration with the OTel community, and you can track its progress and contribute through this GitHub issue. The source code is available in this repository.