Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Registry manifest and OTEL schema update #400

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

lquerel
Copy link
Contributor

@lquerel lquerel commented Oct 3, 2024

Tasks:

  • Identify the best approach to track renamings and deletions in SemConv. See the discussion here.
  • Specify the format and structure of the file used to track the SemConv registry name, version, schema location, and other details.
  • Parse OTEL Schema.
  • Implement the registry manifest struct.
  • Parse/Read the otel-registry-manifest.yaml.
  • Implement the new format for the deprecated field.
  • Create a sub-command to generate a diff from two versions of the same semconv registry.
    • Generate JSON and YAML report
    • Generate OTEL Schema update
    • Generate migration guides (?) See the discussion on the migration guide.

Notes: Some people would like to generate database migration scripts based on the diff between two registries. This reinforces the need to decouple the registry diff from how the diff is used (e.g., generation of OTEL schema, migration guides (documentation), db migration script, etc.).

Closes: #186

@lquerel lquerel self-assigned this Oct 3, 2024
@lquerel lquerel added the enhancement New feature or request label Oct 3, 2024
crates/weaver_semconv/src/manifest.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/manifest.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/manifest.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/manifest.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/manifest.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/manifest.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
crates/weaver_semconv/src/deprecated.rs Fixed Show fixed Hide fixed
src/registry/mod.rs Fixed Show fixed Hide fixed
src/registry/mod.rs Fixed Show fixed Hide fixed
use crate::util::{load_semconv_specs, resolve_telemetry_schema};
use crate::{DiagnosticArgs, ExitDirectives};
use clap::Args;
use miette::Diagnostic;

Check failure

Code scanning / clippy

unused import: miette::Diagnostic Error

unused import: miette::Diagnostic
use crate::util::{load_semconv_specs, resolve_telemetry_schema};
use crate::{DiagnosticArgs, ExitDirectives};
use clap::Args;
use miette::Diagnostic;

Check failure

Code scanning / clippy

unused import: miette::Diagnostic Error

unused import: miette::Diagnostic
use crate::{DiagnosticArgs, ExitDirectives};
use clap::Args;
use miette::Diagnostic;
use serde::Serialize;

Check failure

Code scanning / clippy

unused import: serde::Serialize Error

unused import: serde::Serialize
use crate::{DiagnosticArgs, ExitDirectives};
use clap::Args;
use miette::Diagnostic;
use serde::Serialize;

Check failure

Code scanning / clippy

unused import: serde::Serialize Error

unused import: serde::Serialize
use clap::Args;
use miette::Diagnostic;
use serde::Serialize;
use std::path::PathBuf;

Check failure

Code scanning / clippy

unused import: std::path::PathBuf Error

unused import: std::path::PathBuf
use clap::Args;
use miette::Diagnostic;
use serde::Serialize;
use std::path::PathBuf;

Check failure

Code scanning / clippy

unused import: std::path::PathBuf Error

unused import: std::path::PathBuf
use std::path::PathBuf;
use weaver_cache::registry_path::RegistryPath;
use weaver_cache::RegistryRepo;
use weaver_common::diagnostic::{DiagnosticMessage, DiagnosticMessages};

Check failure

Code scanning / clippy

unused import: DiagnosticMessage Error

unused import: DiagnosticMessage
use std::path::PathBuf;
use weaver_cache::registry_path::RegistryPath;
use weaver_cache::RegistryRepo;
use weaver_common::diagnostic::{DiagnosticMessage, DiagnosticMessages};

Check failure

Code scanning / clippy

unused import: DiagnosticMessage Error

unused import: DiagnosticMessage
// Generate the diff between the two versions of the registries.
let _changes = main_resolved_schema.diff(&baseline_resolved_schema);
let schema = TelemetrySchema::try_from_file(args.schema.clone())?;
dbg!(schema);

Check failure

Code scanning / clippy

the dbg! macro is intended as a debugging tool Error

the dbg! macro is intended as a debugging tool
// Generate the diff between the two versions of the registries.
let _changes = main_resolved_schema.diff(&baseline_resolved_schema);
let schema = TelemetrySchema::try_from_file(args.schema.clone())?;
dbg!(schema);

Check failure

Code scanning / clippy

the dbg! macro is intended as a debugging tool Error

the dbg! macro is intended as a debugging tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Automate OTEL Schema Generation and Update Process with Migration Guide Support
1 participant