Skip to content

Commit

Permalink
refactor: Remove experimental code
Browse files Browse the repository at this point in the history
  • Loading branch information
lquerel committed Apr 21, 2024
1 parent daa39f9 commit 25875ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
24 changes: 0 additions & 24 deletions crates/weaver_semconv/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

//! Semantic Convention Registry Definition.
use crate::attribute::AttributeSpec;
use crate::semconv::{SemConvSpec, SemConvSpecWithProvenance};
use crate::{
AttributeSpecWithProvenance, Error, GroupSpecWithProvenance, MetricSpecWithProvenance, Stats,
Expand Down Expand Up @@ -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).
///
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit 25875ce

Please sign in to comment.