From 935ea574f155b783da951f43c8ca7a814055de41 Mon Sep 17 00:00:00 2001 From: Kenny Guo <110429254+kennykguo@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:43:29 -0500 Subject: [PATCH 1/7] Update README.md Updated the outdated links in the readme.md file to redirect user to the semantic-conventions folder. --- semantic-conventions/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/semantic-conventions/README.md b/semantic-conventions/README.md index 9d1bc5a7..85441231 100644 --- a/semantic-conventions/README.md +++ b/semantic-conventions/README.md @@ -92,11 +92,10 @@ semantic conventions that have the tag `network`. The image supports [Jinja](https://jinja.palletsprojects.com/en/2.11.x/) templates to generate code from the models. -For example, opentelemetry-java [generates typed constants for semantic conventions](https://github.com/open-telemetry/opentelemetry-java/blob/main/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java) -using [this template](https://github.com/open-telemetry/opentelemetry-java/blob/main/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2). +For example, opentelemetry-java [generates typed constants for semantic conventions]. Refer to https://github.com/open-telemetry/semantic-conventions-java for all semantic conventions. The commands used to generate that are -[here in the opentelemetry-java repo](https://github.com/open-telemetry/opentelemetry-java/blob/main/buildscripts/semantic-convention/generate.sh). +[here in the opentelemetry-java repo](https://github.com/open-telemetry/semantic-conventions-java) Note especially the `docker run` commands. For example to generate the aforementioned `SemanticAttributes.java`, the following command is used: From d852dca6dcce37fdea1fe59278a1120295fffec0 Mon Sep 17 00:00:00 2001 From: Kenny Guo <110429254+kennykguo@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:30:06 -0500 Subject: [PATCH 2/7] Update semantic-conventions/README.md Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com> --- semantic-conventions/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/semantic-conventions/README.md b/semantic-conventions/README.md index 85441231..4c50f095 100644 --- a/semantic-conventions/README.md +++ b/semantic-conventions/README.md @@ -97,6 +97,7 @@ For example, opentelemetry-java [generates typed constants for semantic conventi The commands used to generate that are [here in the opentelemetry-java repo](https://github.com/open-telemetry/semantic-conventions-java) Note especially the `docker run` commands. For example to generate the aforementioned `SemanticAttributes.java`, +Note especially the `docker run` commands. For example to generate a constants file called `SemanticAttributes.java`, the following command is used: ```bash From 5a96f9d663f265656ed96f923be1c425f6b5dbf9 Mon Sep 17 00:00:00 2001 From: Kenny Guo <110429254+kennykguo@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:31:15 -0500 Subject: [PATCH 3/7] Update semantic-conventions/README.md Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com> --- semantic-conventions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-conventions/README.md b/semantic-conventions/README.md index 4c50f095..55d644f2 100644 --- a/semantic-conventions/README.md +++ b/semantic-conventions/README.md @@ -92,7 +92,7 @@ semantic conventions that have the tag `network`. The image supports [Jinja](https://jinja.palletsprojects.com/en/2.11.x/) templates to generate code from the models. -For example, opentelemetry-java [generates typed constants for semantic conventions]. Refer to https://github.com/open-telemetry/semantic-conventions-java for all semantic conventions. +For example, opentelemetry-java generates typed constants for semantic conventions. Refer to https://github.com/open-telemetry/semantic-conventions-java for all semantic conventions. The commands used to generate that are [here in the opentelemetry-java repo](https://github.com/open-telemetry/semantic-conventions-java) From 5987707e80bc083b79f7995b299c2891c4c21c98 Mon Sep 17 00:00:00 2001 From: Kenny Guo <110429254+kennykguo@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:34:34 -0500 Subject: [PATCH 4/7] Update README.md Redundant sentence --- semantic-conventions/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/semantic-conventions/README.md b/semantic-conventions/README.md index 55d644f2..babb5d85 100644 --- a/semantic-conventions/README.md +++ b/semantic-conventions/README.md @@ -96,7 +96,6 @@ For example, opentelemetry-java generates typed constants for semantic conventio The commands used to generate that are [here in the opentelemetry-java repo](https://github.com/open-telemetry/semantic-conventions-java) -Note especially the `docker run` commands. For example to generate the aforementioned `SemanticAttributes.java`, Note especially the `docker run` commands. For example to generate a constants file called `SemanticAttributes.java`, the following command is used: From bdcca7e42627d31b1c275eed4908be665dc41d11 Mon Sep 17 00:00:00 2001 From: Kenny Guo <110429254+kennykguo@users.noreply.github.com> Date: Tue, 23 Jan 2024 20:12:58 -0500 Subject: [PATCH 5/7] Update semantic-conventions/README.md Accepted suggestion from wbh1 Co-authored-by: Will Hegedus --- semantic-conventions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-conventions/README.md b/semantic-conventions/README.md index babb5d85..6c2f8d18 100644 --- a/semantic-conventions/README.md +++ b/semantic-conventions/README.md @@ -95,7 +95,7 @@ The image supports [Jinja](https://jinja.palletsprojects.com/en/2.11.x/) templat For example, opentelemetry-java generates typed constants for semantic conventions. Refer to https://github.com/open-telemetry/semantic-conventions-java for all semantic conventions. The commands used to generate that are -[here in the opentelemetry-java repo](https://github.com/open-telemetry/semantic-conventions-java) +[here in the semantic-conventions-java repo](https://github.com/open-telemetry/semantic-conventions-java/blob/2be178a7fd62d1073fa9b4f0f0520772a6496e0b/build.gradle.kts#L96-L141) Note especially the `docker run` commands. For example to generate a constants file called `SemanticAttributes.java`, the following command is used: From b3caedf7dfd369cb03cad3c9622421aa034a33b0 Mon Sep 17 00:00:00 2001 From: Kenny Guo <110429254+kennykguo@users.noreply.github.com> Date: Tue, 23 Jan 2024 20:14:27 -0500 Subject: [PATCH 6/7] Update README.md Accepted suggestion from wb1. --- semantic-conventions/README.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/semantic-conventions/README.md b/semantic-conventions/README.md index 6c2f8d18..728ec200 100644 --- a/semantic-conventions/README.md +++ b/semantic-conventions/README.md @@ -96,23 +96,6 @@ For example, opentelemetry-java generates typed constants for semantic conventio The commands used to generate that are [here in the semantic-conventions-java repo](https://github.com/open-telemetry/semantic-conventions-java/blob/2be178a7fd62d1073fa9b4f0f0520772a6496e0b/build.gradle.kts#L96-L141) -Note especially the `docker run` commands. For example to generate a constants file called `SemanticAttributes.java`, -the following command is used: - -```bash -docker run --rm \ - -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions/trace:/source \ - -v ${SCRIPT_DIR}/templates:/templates \ - -v ${ROOT_DIR}/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/:/output \ - otel/semconvgen:$GENERATOR_VERSION \ - --yaml-root /source \ - code \ - --template /templates/SemanticAttributes.java.j2 \ - --output /output/SemanticAttributes.java \ - -Dclass=SemanticAttributes \ - -DschemaUrl=$SCHEMA_URL \ - -Dpkg=io.opentelemetry.semconv.trace.attributes -``` By default, all models are fed into the specified template at once, i.e. only a single file is generated. This is helpful to generate constants for the semantic attributes, [example from opentelemetry-java](https://github.com/open-telemetry/opentelemetry-java/tree/main/buildscripts/semantic-convention). From 343c1430f83c6046d02782a9646bb49bdd211ffe Mon Sep 17 00:00:00 2001 From: Kenny Guo <110429254+kennykguo@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:48:49 -0500 Subject: [PATCH 7/7] Update semantic-conventions/README.md Accepted changes Co-authored-by: Jesse <83730324+dev-jesse@users.noreply.github.com> --- semantic-conventions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-conventions/README.md b/semantic-conventions/README.md index 728ec200..b62da331 100644 --- a/semantic-conventions/README.md +++ b/semantic-conventions/README.md @@ -98,7 +98,7 @@ The commands used to generate that are [here in the semantic-conventions-java repo](https://github.com/open-telemetry/semantic-conventions-java/blob/2be178a7fd62d1073fa9b4f0f0520772a6496e0b/build.gradle.kts#L96-L141) By default, all models are fed into the specified template at once, i.e. only a single file is generated. -This is helpful to generate constants for the semantic attributes, [example from opentelemetry-java](https://github.com/open-telemetry/opentelemetry-java/tree/main/buildscripts/semantic-convention). +This is helpful to generate constants for the semantic attributes, [example from opentelemetry-java](https://github.com/open-telemetry/semantic-conventions-java#generating-semantic-conventions). If the parameter `--file-per-group {pattern}` is set, a single yaml model is fed into the template and the value of `pattern` is resolved from the model and attached as prefix to the output argument.