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

Define SemConv predefined JQ functions #246

Merged
merged 41 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cb9cd58
feat(forge): Support hierarchical weaver config
lquerel Jul 6, 2024
b8faa77
feat(forge): Test override_with
lquerel Jul 8, 2024
da7b6c7
feat(forge): Implement better UX for templates and config.
lquerel Jul 10, 2024
b6bb5ef
chore(forge): Fix a unit test.
lquerel Jul 10, 2024
e818435
feat(forge): Support multiple paths to init a WeaverConfig with overr…
lquerel Jul 11, 2024
fdd51cc
feat(cli): Reintroduce target concept
lquerel Jul 11, 2024
ef59887
feat(cli): Introduce --config parameter in weaver registry generate
lquerel Jul 11, 2024
c55f85b
Merge branch 'main' into hierarchical-config
lquerel Jul 11, 2024
f9bf773
doc(forge): Document the organization and resolution of config files
lquerel Jul 11, 2024
d42a61a
doc(forge): Document the organization and resolution of config files
lquerel Jul 11, 2024
ec39d09
Merge branch 'main' into hierarchical-config
lquerel Jul 11, 2024
add9388
feat(forge): Improve WeaverConfig and TemplateEngine public APIs
lquerel Jul 15, 2024
0f44a4c
Merge remote-tracking branch 'origin/hierarchical-config' into hierar…
lquerel Jul 15, 2024
582516b
feat(forge): Remove FileContent from the public API
lquerel Jul 15, 2024
78d4f40
feat(forge): Create constants for Jinja syntax delimiters
lquerel Jul 15, 2024
399030b
Merge branch 'lquerel-hierarchical-config'
lquerel Jul 15, 2024
0f2d7c7
chore(forge): Remove unused filters function_name, struct_name, ...
lquerel Jul 16, 2024
d93a9c8
chore(build): Merge with main and bump weaver version
lquerel Jul 16, 2024
1e54041
chore(build): Merge with main and bump weaver version
lquerel Jul 16, 2024
35a405b
Merge branch 'main' of https://github.com/lquerel/otel-weaver
lquerel Jul 16, 2024
e5504cf
Merge remote-tracking branch 'upstream/main'
lquerel Jul 16, 2024
0749edd
Merge branch 'open-telemetry:main' into main
lquerel Jul 16, 2024
49197f6
Merge branch 'open-telemetry:main' into main
lquerel Jul 17, 2024
088cf19
feat(forge): Add predefined semconv JQ functions
lquerel Jul 17, 2024
cd08316
feat(forge): Add more predefined semconv JQ functions
lquerel Jul 17, 2024
73d464b
feat(forge): Use new JQ function in rust codegen example
lquerel Jul 17, 2024
4001a24
feat(forge): Define semconv functions
lquerel Jul 18, 2024
7aff7c0
feat(forge): Update documentation
lquerel Jul 18, 2024
321762e
feat(forge): Update documentation
lquerel Jul 18, 2024
4d3b747
Merge branch 'main' into semconv-jq-function
lquerel Jul 18, 2024
c344aa8
feat(forge): Introduce concept of JQ package to import JQ functions
lquerel Jul 18, 2024
ebae346
feat(forge): Simplify the Rust example with the new filters.
lquerel Jul 19, 2024
e8d4389
feat(forge): Update unit tests
lquerel Jul 19, 2024
97747f8
feat(forge): Enable whitespace control on the Rust example
lquerel Jul 20, 2024
726ecb7
feat(forge): Improve documentation intro
lquerel Jul 22, 2024
d3594a7
feat(forge): Improve documentation section Template Directory Structure
lquerel Jul 22, 2024
7d516c3
feat(forge): Improve documentation section Configuration file
lquerel Jul 22, 2024
58e0b7c
Merge branch 'main' into semconv-jq-function
lquerel Jul 22, 2024
f2dfaa4
Merge branch 'main' into semconv-jq-function
lquerel Jul 22, 2024
5dbcc11
feat(forge): Change namespace to root_namespace and improve docs
lquerel Jul 22, 2024
b8172b1
feat(forge): Fix renaming issue
lquerel Jul 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@

All notable changes to this project will be documented in this file.

## [0.7.0] - 2024-07-22

What's Changed

* Add support for new custom semconv JQ filters by @lquerel.
* Update Weaver Forge documentation and include a step-by-step guide for codegen authors by @lquerel.

The following new filters have been added to the Weaver Forge:

* `semconv_group_attributes_by_root_namespace`: Groups the attributes by their root namespace.
* `semconv_attributes($options)`: Extracts and processes semantic convention attributes based on provided options. $options is an object that can contain:
* `exclude_stability`: a list of stability statuses to exclude.
* `exclude_deprecated`: a boolean to exclude deprecated metrics.
* `exclude_root_namespace`: a list of root namespaces to exclude.
* `semconv_attributes`: Convenience function to extract all attributes without any filtering options.
* `semconv_grouped_attributes($options)`: Groups the processed attributes by their root namespace based on provided options. $options is an object that can contain:
* `exclude_stability`: a list of stability statuses to exclude.
* `exclude_deprecated`: a boolean to exclude deprecated metrics.
* `exclude_root_namespace`: a list of root namespaces to exclude.
* `semconv_grouped_attributes`: Convenience function to group all attributes by their root namespace without any filtering options.
* `semconv_group_metrics_by_root_namespace`: Groups the metrics by their root namespace.
* `semconv_metrics($options)`: Extracts and processes semantic convention metrics based on provided options. $options is an object that can contain:
* `exclude_stability`: a list of stability statuses to exclude.
* `exclude_deprecated`: a boolean to exclude deprecated metrics.
* `exclude_root_namespace`: a list of root namespaces to exclude.
* `semconv_metrics`: Convenience function to extract all metrics without any filtering options.
* `semconv_grouped_metrics($options)`: Groups the processed metrics by their root namespace based on provided options. $options is an object that can contain:
* `exclude_stability`: a list of stability statuses to exclude.
* `exclude_deprecated`: a boolean to exclude deprecated metrics.
* `exclude_root_namespace`: a list of root namespaces to exclude.
* `semconv_grouped_metrics`: Convenience function to group all metrics by their root namespace without any filtering options.

## [0.6.0] - 2024-07-16

What's Changed
Expand Down
94 changes: 43 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "weaver"
version = "0.6.0"
version = "0.7.0"
authors = ["OpenTelemetry"]
edition = "2021"
repository = "https://github.com/open-telemetry/weaver"
Expand Down
2 changes: 1 addition & 1 deletion crates/weaver_cache/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "weaver_cache"
version = "0.6.0"
version = "0.7.0"
authors.workspace = true
repository.workspace = true
license.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/weaver_checker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "weaver_checker"
version = "0.6.0"
version = "0.7.0"
authors.workspace = true
repository.workspace = true
license.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/weaver_codegen_test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "weaver_codegen_test"
version = "0.6.0"
version = "0.7.0"
authors.workspace = true
repository.workspace = true
license.workspace = true
Expand Down
7 changes: 5 additions & 2 deletions crates/weaver_codegen_test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use weaver_common::{in_memory, Logger};
use weaver_forge::config::{Params, WeaverConfig};
use weaver_forge::file_loader::FileSystemFileLoader;
use weaver_forge::registry::ResolvedRegistry;
use weaver_forge::{OutputDirective, TemplateEngine};
use weaver_forge::{OutputDirective, TemplateEngine, SEMCONV_JQ};
use weaver_resolver::SchemaResolver;
use weaver_semconv::path::RegistryPath;
use weaver_semconv::registry::SemConvRegistry;
Expand Down Expand Up @@ -53,7 +53,10 @@ fn main() {
.unwrap_or_else(|e| process_error(&logger, e));
let config = WeaverConfig::try_from_path("./templates/registry/rust")
.unwrap_or_else(|e| process_error(&logger, e));
let engine = TemplateEngine::new(config, loader, Params::default());
let mut engine = TemplateEngine::new(config, loader, Params::default());
engine
.import_jq_package(SEMCONV_JQ)
.unwrap_or_else(|e| process_error(&logger, e));
let template_registry = ResolvedRegistry::try_from_resolved_registry(
schema
.registry(REGISTRY_ID)
Expand Down
Loading
Loading