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

Allow multiple semconv in --only flag #157

Merged
merged 8 commits into from
Mar 15, 2023

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Mar 10, 2023

Alternative approach to #156

Usage diff:

Java generates all semconv except resources into one file

docker run --rm \
  -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \
  -v ${SCRIPT_DIR}/templates:/templates \
  -v ${ROOT_DIR}/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/:/output \
  otel/semconvgen:$GENERATOR_VERSION \
-  --exclude resource/** \
+  --only span,event,attribute_group,scope \
  -f /source code \
 ...

Resources:

docker run --rm \
- -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions/resource/:/source \
+ -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \
  -v ${SCRIPT_DIR}/templates:/templates \
  -v ${ROOT_DIR}/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/:/output \
  semconvgen:$GENERATOR_VERSION \
+ --only resource \
  -f /source code \
....

@lmolkova lmolkova requested a review from a team March 10, 2023 05:01
@lmolkova lmolkova requested a review from Oberon00 as a code owner March 10, 2023 05:01
@lmolkova lmolkova changed the title Allowing multiple --only flags Allow multiple semconv in --only flag Mar 10, 2023
@lmolkova
Copy link
Contributor Author

@Oberon00 thanks for the review!

@arminru could you please take a look and merge if you're fine with this change?

@Oberon00 Oberon00 added enhancement New feature or request semconv Related to the semantic convention generator. labels Mar 13, 2023
@Oberon00
Copy link
Member

@lmolkova I guess this one then replaces #156? Maybe add "Closes #156" to the PR description to auto-close it on merge & have it linked in the sidebar.

@lmolkova
Copy link
Contributor Author

@open-telemetry/specs-approvers can someone please take a look and merge? it unblocks code generation for 1.19.0 release open-telemetry/opentelemetry-specification#3299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semconv Related to the semantic convention generator.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants