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] Code Generation with Weaver - Example of Code Generation for SemConv Attribute Registry and SemConv Metrics #136

Merged
merged 47 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
328a89f
feat(codegen): create an example of codegen for SemConv Rust
lquerel Apr 26, 2024
d430eb6
feat(codegen): create lib.rs and one rs file per group prefix
lquerel Apr 26, 2024
35959a7
feat(codegen): remove old tera templates
lquerel Apr 26, 2024
618b8d2
feat(codegen): add support for semconv_experimental feature
lquerel Apr 26, 2024
db4dec4
chore: bump minijinja version to 1.0.21
lquerel Apr 27, 2024
d404191
chore: Fix fmt and clippy issues
lquerel Apr 27, 2024
628d46e
feat(forge): Add type_mapping filter
lquerel Apr 28, 2024
65c2464
doc(forge): Update documentation
lquerel Apr 28, 2024
7d26226
chore(forge): Improve test coverage
lquerel Apr 28, 2024
c821e55
feat(forge): Improve SemConv codegen example for Rust
lquerel Apr 29, 2024
00e11d2
chore(forge): Add mini registry and prepare for unit tests
lquerel Apr 29, 2024
37acc4b
chore(forge): Simplify mini_registry
lquerel Apr 29, 2024
074fe69
doc(forge): Add documentation on the JQ filter.
lquerel Apr 29, 2024
f930e80
chore(forge): Fix clippy issue
lquerel Apr 30, 2024
d65680c
Merge branch 'main' into example-codegen-semconv-rust
lquerel Apr 30, 2024
30876fc
chore(forge): Add experimental and deprecated attributes in the gener…
lquerel Apr 30, 2024
9483d63
feat(forge): Add enum string representation support.
lquerel Apr 30, 2024
e2e2df1
feat(forge): Use attribute registry namespace instead of group prefix.
lquerel Apr 30, 2024
8f6826b
feat(forge): Generate metrics and attributes
lquerel May 1, 2024
48403fc
feat(forge): Generate type-safe API for metrics
lquerel May 2, 2024
5fc3248
Merge branch 'main' into example-codegen-semconv-rust
lquerel May 2, 2024
ecbd76d
feat(forge): Separate required from optional attributes in the genera…
lquerel May 2, 2024
34db6ad
feat(forge): Improve metrics type-safe API
lquerel May 3, 2024
405331f
Merge branch 'main' into example-codegen-semconv-rust
lquerel May 3, 2024
581c08c
feat(forge): Add support for Counter and Gauge
lquerel May 3, 2024
0832fb2
feat(forge): Update generated code
lquerel May 3, 2024
5d8bf55
feat(forge): Update documentation
lquerel May 3, 2024
064e844
feat(forge): Fix Clippy lint issues
lquerel May 4, 2024
3f2e188
chore(forge): Exclude generated file from code coverage
lquerel May 4, 2024
3b26644
Merge branch 'main' into example-codegen-semconv-rust
lquerel May 4, 2024
7ec190d
chore(forge): Test infra for code gen [WIP]
lquerel May 4, 2024
da441c3
chore(forge): Remove build.rs
lquerel May 5, 2024
7ee2235
Merge branch 'main' into example-codegen-semconv-rust
lquerel May 6, 2024
c006d17
chore(forge): Move to not_required filter
lquerel May 6, 2024
8757379
Merge remote-tracking branch 'origin/example-codegen-semconv-rust' in…
lquerel May 6, 2024
97ee4a3
chore(forge): Improve error messages
lquerel May 6, 2024
9045e05
chore(forge): Create code generation test infrastructure
lquerel May 7, 2024
423111b
chore(forge): Create code generation test infrastructure
lquerel May 7, 2024
1306e6a
chore(forge): Create code generation test infrastructure
lquerel May 7, 2024
19e07c2
chore(forge): Remove duplicated codes and semconv registry
lquerel May 7, 2024
3534c42
chore(forge): Fix Windows specific issue.
lquerel May 7, 2024
964a5cb
Merge branch 'main' into example-codegen-semconv-rust
lquerel May 7, 2024
b858e7c
chore(forge): Improve error message to debug Windows specific issue.
lquerel May 7, 2024
c0aea47
Merge remote-tracking branch 'origin/example-codegen-semconv-rust' in…
lquerel May 7, 2024
baa9e2a
chore(forge): Add traces to debug Windows specific issue.
lquerel May 7, 2024
2f2ce45
chore(forge): Fix MiniJinja template loader for Windows.
lquerel May 8, 2024
dd0dc61
chore(forge): Fix MiniJinja template loader for Windows.
lquerel May 8, 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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ just.zsh
**/output/*

# Coverage results
lcov.info
lcov.info

# Ignore the output of the `weaver resolve` command
output.json
resolved-schema.yaml
69 changes: 39 additions & 30 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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![codecov](https://codecov.io/gh/open-telemetry/weaver/graph/badge.svg?token=tmWKFoMT2G)](https://codecov.io/gh/open-telemetry/weaver)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
----
[Getting started](#getting-started) | [Main commands](#main-commands) | [Architecture](docs/architecture.md) | [Change log](CHANGELOG.md) | [Contributing](CONTRIBUTING.md) | [Links](#links) |
[Getting started](#getting-started) | [Main commands](#main-commands) | [Generate Doc & Code](crates/weaver_forge/README.md) | [Architecture](docs/architecture.md) | [Change log](CHANGELOG.md) | [Contributing](CONTRIBUTING.md) | [Links](#links) |

## What is OpenTelemetry Weaver?

Expand Down
2 changes: 1 addition & 1 deletion crates/weaver_forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ weaver_resolver = { path = "../weaver_resolver" }
weaver_resolved_schema = { path = "../weaver_resolved_schema" }
weaver_semconv = { path = "../weaver_semconv" }

minijinja = { version = "1.0.20", features = ["loader", "custom_syntax", "debug", "json"] }
minijinja = { version = "1.0.21", features = ["loader", "custom_syntax", "debug", "json"] }
convert_case = "0.6.0"
globset = { version = "0.4.14", features = ["serde1"] }
jaq-core = "1.2.1"
Expand Down
Loading
Loading