1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-08-10 22:31:50 +02:00

chore(semconv): follow weaver folder structure (#6998)

(this PR is a suggestion, feel free to close if it doesn't align with
the vision for this repo)

Moves jinja templates for semantic conventions from the root of
`semconv/` into `semconv/templates/registry/go/`, making them easier to
consume. While this wasn't impeding development in `opentelemetry-go` it
makes it easier to consume the templates from other packages via:

```bash
weaver registry generate --templates https://github.com/open-telemetry/opentelemetry-go.git[semconv/templates] go .
```

which was previously impossible. Specific use-case would be using
[weaver](https://github.com/open-telemetry/weaver) to maintain private
registry of semantic conventions for companies/projects in which case
it's more convenient to be able to rely on the upstream opentelemetry-go
templates as opposed to having to copy them over.

Tested by running:

```bash
TAG='v1.34.0' make semconv-generate
```

which results into empty diff.

## Open questions

Does the changelog deserve an entry for this even without changes to the
API?

Co-authored-by: Robert Pająk <pellared@hotmail.com>
This commit is contained in:
Matouš Dzivjak
2025-07-14 16:24:33 +02:00
committed by GitHub
parent e6ba1ebfbd
commit c4b8e9124e
5 changed files with 1 additions and 1 deletions

View File

@@ -281,7 +281,7 @@ semconv-generate: $(SEMCONVKIT)
docker run --rm \
-u $(DOCKER_USER) \
--env HOME=/tmp/weaver \
--mount 'type=bind,source=$(PWD)/semconv,target=/home/weaver/templates/registry/go,readonly' \
--mount 'type=bind,source=$(PWD)/semconv/templates,target=/home/weaver/templates,readonly' \
--mount 'type=bind,source=$(PWD)/semconv/${TAG},target=/home/weaver/target' \
--mount 'type=bind,source=$(HOME)/.weaver,target=/tmp/weaver/.weaver' \
$(WEAVER_IMAGE) registry generate \