File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,13 @@ genpdata:
227227 $(MAKE ) fmt
228228
229229# Generate semantic convention constants. Requires a clone of the opentelemetry-specification repo
230- gensemconv :
230+ gensemconv : $( SEMCONVGEN )
231231 @[ " ${SPECPATH} " ] || ( echo " >> env var SPECPATH is not set" ; exit 1 )
232232 @[ " ${SPECTAG} " ] || ( echo " >> env var SPECTAG is not set" ; exit 1 )
233233 @echo " Generating semantic convention constants from specification version ${SPECTAG} at ${SPECPATH} "
234- semconvgen -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH} /semantic_conventions /. --only=resource -p conventionType=resource -f generated_resource.go
235- semconvgen -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH} /semantic_conventions /. --only=event -p conventionType=event -f generated_event.go
236- semconvgen -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH} /semantic_conventions /. --only=span -p conventionType=trace -f generated_trace.go
234+ $( SEMCONVGEN ) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH} /model /. --only=resource -p conventionType=resource -f generated_resource.go
235+ $( SEMCONVGEN ) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH} /model /. --only=event -p conventionType=event -f generated_event.go
236+ $( SEMCONVGEN ) -o semconv/${SPECTAG} -t semconv/template.j2 -s ${SPECTAG} -i ${SPECPATH} /model /. --only=span -p conventionType=trace -f generated_trace.go
237237
238238# Checks that the HEAD of the contrib repo checked out in CONTRIB_PATH compiles
239239# against the current version of this repo.
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ IMPI := $(TOOLS_BIN_DIR)/impi
3131MISSPELL := $(TOOLS_BIN_DIR)/misspell
3232MULTIMOD := $(TOOLS_BIN_DIR)/multimod
3333PORTO := $(TOOLS_BIN_DIR)/porto
34+ SEMCONVGEN := $(TOOLS_BIN_DIR)/semconvgen
3435YQ := $(TOOLS_BIN_DIR)/yq
3536
3637.PHONY: install-tools
Original file line number Diff line number Diff line change @@ -6,14 +6,15 @@ from definitions in the specification.
66## Generation
77
88To generate the constants you can use the ` gensemconv ` make target. You must provide the path to the root of a clone of
9- the ` opentelemetry-specification ` repository in the ` SPECPATH ` variable and the version of the conventions to generate
9+ the ` semantic-conventions ` repository in the ` SPECPATH ` variable and the version of the conventions to generate
1010in the ` SPECTAG ` variable.
1111
1212``` console
13- $ make gensemconv SPECPATH=~ /dev/opentelemetry-specification SPECTAG=v1.5.0
14- Generating semantic convention constants from specification version v1.5.0 at ~/dev/opentelemetry-specification
15- semconvgen -o semconv/v1.5.0 -t semconv/template.j2 -s v1.5.0 -i ~/dev/opentelemetry-specification/semantic_conventions/resource -p conventionType=resource
16- semconvgen -o semconv/v1.5.0 -t semconv/template.j2 -s v1.5.0 -i ~/dev/opentelemetry-specification/semantic_conventions/trace -p conventionType=trace
13+ $ make gensemconv SPECPATH=/tmp/semantic-conventions SPECTAG=v1.22.0
14+ Generating semantic convention constants from specification version v1.22.0 at /tmp/semantic-conventions
15+ .tools/semconvgen -o semconv/v1.22.0 -t semconv/template.j2 -s v1.22.0 -i /tmp/semantic-conventions/model/. --only=resource -p conventionType=resource -f generated_resource.go
16+ .tools/semconvgen -o semconv/v1.22.0 -t semconv/template.j2 -s v1.22.0 -i /tmp/semantic-conventions/model/. --only=event -p conventionType=event -f generated_event.go
17+ .tools/semconvgen -o semconv/v1.22.0 -t semconv/template.j2 -s v1.22.0 -i /tmp/semantic-conventions/model/. --only=span -p conventionType=trace -f generated_trace.go
1718```
1819
1920When generating the constants for a new version ot the specification it is important to note that only
You can’t perform that action at this time.
0 commit comments