Observability by Design is a paradigm shift in software development, emphasizing the integration of monitoring and observability practices into the software development lifecycle (SDLC). This approach ensures that observability is not an afterthought but a foundational aspect of system design. OpenTelemetry Weaver plays a pivotal role in this paradigm by providing tools and frameworks to automate telemetry collection, enforce semantic conventions, and streamline the development of observability features. This article explores the principles, tools, and practical applications of OpenTelemetry Weaver within the CNCF ecosystem.
Observability by Design extends the principles of Privacy by Design and Security by Design, ensuring that observability is embedded into the architecture and development process. Key principles include:
OpenTelemetry Weaver is a toolchain designed to automate the creation of observability features, ensuring alignment with semantic conventions and reducing manual errors. Its workflow includes:
Semantic conventions define metrics, attributes, and units in YAML format, ensuring consistency across systems. For example, the auction_bid_count
metric includes attributes like auction_id
and bidder
. The registry contains over 900 attributes and 74 domains, providing a standardized framework for telemetry data.
Weaver generates type-safe SDKs in languages like Go, ensuring correct metric names and attributes. For instance, the auction_bid_count
metric is automatically translated into a Go API with type safety, preventing naming errors and enabling IDE auto-completion.
Static validation checks ensure compliance with semantic conventions. Policies written in Rego enforce rules such as naming standards and schema evolution, preventing inconsistencies in telemetry data.
Traditional monitoring systems often fail during deployments due to inconsistent metric naming or missing data. OpenTelemetry Weaver mitigates this by enforcing semantic conventions, ensuring metrics are consistently named and structured. For example, HTTP request durations are standardized, eliminating ambiguity in complex queries.
Weaver supports schema evolution through versioned metric definitions. When metrics are renamed or updated, the system dynamically adapts to new versions, maintaining compatibility with existing dashboards and alerts. This is critical for long-term observability in evolving systems.
OpenTelemetry Weaver aligns with CNCF's goals of standardizing observability tools. By leveraging OpenTelemetry's open-source framework, Weaver integrates seamlessly with CNCF projects like Prometheus, Jaeger, and Tempo, enabling a unified telemetry pipeline.
metric:
name: auction_bid_count
description: Records bid counts in an auction
unit: "1"
attributes:
- name: auction_id
description: Auction activity ID
- name: bidder
description: Bidder identifier
func NewAuctionBidCount() *counter.Counter {
return counter.NewCounter("auction_bid_count", "Records bid counts in an auction", "1")
}
package observability
default allow = false
allow {
input.change.type == "delete"
input.change.attribute == "bidder"
input.required_attributes contains "bidder"
}
Observability by Design, powered by OpenTelemetry Weaver, offers a robust framework for building reliable and scalable telemetry systems. By embedding observability into the SDLC, developers can ensure consistent data collection, reduce manual errors, and adapt to evolving requirements. The integration of semantic conventions, automated SDK generation, and policy validation makes Weaver an essential tool for modern observability practices. As the CNCF ecosystem continues to evolve, tools like Weaver will play a critical role in standardizing and simplifying observability across distributed systems.