From 25875ce95a6de1ab41b5a2f3cbf50501212ef732 Mon Sep 17 00:00:00 2001 From: Laurent Querel Date: Sun, 21 Apr 2024 13:17:48 -0700 Subject: [PATCH] refactor: Remove experimental code --- crates/weaver_semconv/src/registry.rs | 24 ------------------------ docs/architecture.md | 4 ++-- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/crates/weaver_semconv/src/registry.rs b/crates/weaver_semconv/src/registry.rs index a681c825..ed0ecc3e 100644 --- a/crates/weaver_semconv/src/registry.rs +++ b/crates/weaver_semconv/src/registry.rs @@ -2,7 +2,6 @@ //! Semantic Convention Registry Definition. -use crate::attribute::AttributeSpec; use crate::semconv::{SemConvSpec, SemConvSpecWithProvenance}; use crate::{ AttributeSpecWithProvenance, Error, GroupSpecWithProvenance, MetricSpecWithProvenance, Stats, @@ -157,23 +156,6 @@ impl SemConvRegistry { self.semconv_spec_count } - /// Returns an attribute definition from its reference or `None` if the - /// reference does not exist. - #[must_use] - pub fn attribute(&self, attr_ref: &str) -> Option<&AttributeSpec> { - self.attributes.get(attr_ref).map(|attr| &attr.attribute) - } - - /// Returns an attribute definition and its provenance from its reference - /// or `None` if the reference does not exist. - #[must_use] - pub fn attribute_with_provenance( - &self, - attr_ref: &str, - ) -> Option<&AttributeSpecWithProvenance> { - self.attributes.get(attr_ref) - } - /// Returns an iterator over all the unresolved groups defined in the semantic convention /// registry. Each group is associated with its provenance (path or URL). /// @@ -191,12 +173,6 @@ impl SemConvRegistry { }) } - /// Returns a metric definition and its provenance from its name - #[must_use] - pub fn metric_with_provenance(&self, metric_name: &str) -> Option<&MetricSpecWithProvenance> { - self.metrics.get(metric_name) - } - /// Returns a set of stats about the semantic convention registry. pub fn stats(&self) -> Stats { Stats { diff --git a/docs/architecture.md b/docs/architecture.md index eca9afb5..eeacf623 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -37,9 +37,9 @@ description and the current status of each crate: | Crate | Description | Status | |--------------------------------------------------------------------|----------------------------------------------------------------------|------------------| -| [weaver_semconv](/crates/weaver_semconv/README.md) | Semantic Convention Registry Data Model | Alpha | +| [weaver_semconv](/crates/weaver_semconv/README.md) | Semantic Convention Registry Data Model | Beta | | [weaver_version](/crates/weaver_version/README.md) | OpenTelemetry Schema Versioning Data Model | Alpha | -| [weaver_logger](/crates/weaver_logger/README.md) | Generic logger supported colorized output | Alpha | +| [weaver_common](/crates/weaver_common/README.md) | Logging and error management | Alpha | | [weaver_forge](/crates/weaver_forge/README.md) | Template engine used to generate artifacts from any serde json value | Alpha | | [weaver_diff](/crates/weaver_diff/README.md) | Diffing tool to compare two versions of a text (used in unit tests) | Alpha | | [weaver_resolved_schema](/crates/weaver_resolved_schema/README.md) | Resolved Schema Data Model | Work-In-Progress |