1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-10-08 23:21:56 +02:00
Files
opentelemetry-go/Makefile

330 lines
10 KiB
Makefile
Raw Normal View History

# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
TOOLS_MOD_DIR := ./internal/tools
ALL_DOCS := $(shell find . -name '*.md' -type f | sort)
ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS))
ALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | grep -E -v '^./example|^$(TOOLS_MOD_DIR)' | sort)
GO = go
TIMEOUT = 60
# User to run as in docker images.
DOCKER_USER=$(shell id -u):$(shell id -g)
DEPENDENCIES_DOCKERFILE=./dependencies.Dockerfile
.DEFAULT_GOAL := precommit
.PHONY: precommit ci
precommit: generate toolchain-check license-check misspell go-mod-tidy golangci-lint-fix verify-readmes verify-mods test-default
ci: generate toolchain-check license-check lint vanity-import-check verify-readmes verify-mods build test-default check-clean-work-tree test-coverage
# Tools
TOOLS = $(CURDIR)/.tools
$(TOOLS):
@mkdir -p $@
$(TOOLS)/%: $(TOOLS_MOD_DIR)/go.mod | $(TOOLS)
cd $(TOOLS_MOD_DIR) && \
$(GO) build -o $@ $(PACKAGE)
MULTIMOD = $(TOOLS)/multimod
$(TOOLS)/multimod: PACKAGE=go.opentelemetry.io/build-tools/multimod
SEMCONVGEN = $(TOOLS)/semconvgen
$(TOOLS)/semconvgen: PACKAGE=go.opentelemetry.io/build-tools/semconvgen
CROSSLINK = $(TOOLS)/crosslink
$(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink
SEMCONVKIT = $(TOOLS)/semconvkit
$(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit
VERIFYREADMES = $(TOOLS)/verifyreadmes
$(TOOLS)/verifyreadmes: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/verifyreadmes
GOLANGCI_LINT = $(TOOLS)/golangci-lint
fix(deps): update module github.com/golangci/golangci-lint to v2 (#6499) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | `v1.64.8` -> `v2.0.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.64.8/v2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.64.8/v2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>golangci/golangci-lint (github.com/golangci/golangci-lint)</summary> ### [`v2.0.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v202) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.1...v2.0.2) 1. Misc. - Fixes flags parsing for formatters - Fixes the filepath used by the exclusion `source` option 2. Documentation - Adds a section about flags migration - Cleaning pages with v1 options ### [`v2.0.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v201) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.0...v2.0.1) 1. Linters/formatters bug fixes - `golines`: fix settings during linter load 2. Misc. - Validates the `version` field before the configuration - `forbidigo`: fix migration ### [`v2.0.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v200) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.8...v2.0.0) 1. Enhancements - 🌟 New `golangci-lint fmt` command with dedicated formatter configuration (https://golangci-lint.run/welcome/quick-start/#formatting) - ♻️ New `golangci-lint migrate` command to help migration from v1 to v2 (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#command-migrate)) - ⚠️ New default values (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - ⚠️ No exclusions by default (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#issuesexclude-use-default)) - ⚠️ New default sort order (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#outputsort-order)) - 🌟 New option `run.relative-path-mode` (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#runrelative-path-mode)) - 🌟 New linters configuration (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#linters)) - 🌟 New output format configuration (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#output)) - 🌟 New `--fast-only` flag (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#lintersfast)) - 🌟 New option `linters.exclusions.warn-unused` to log a warning if an exclusion rule is unused. 2. New linters/formatters - Add `golines` formatter https://github.com/segmentio/golines 3. Linters new features - ⚠️ Merge `staticcheck`, `stylecheck`, `gosimple` into one linter (`staticcheck`) (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#lintersenablestylecheckgosimplestaticcheck)) - `go-critic`: from 0.12.0 to 0.13.0 - `gomodguard`: from 1.3.5 to 1.4.1 (block explicit indirect dependencies) - `nilnil`: from 1.0.1 to 1.1.0 (new option: `only-two`) - `perfsprint`: from 0.8.2 to 0.9.1 (checker name in the diagnostic message) - `staticcheck`: new `quickfix` set of rules - `testifylint`: from 1.5.2 to 1.6.0 (new options: `equal-values`, `suite-method-signature`, `require-string-msg`) - `wsl`: from 4.5.0 to 4.6.0 (new option: `allow-cuddle-used-in-block`) 4. Linters bug fixes - `bidichk`: from 0.3.2 to 0.3.3 - `errchkjson`: from 0.4.0 to 0.4.1 - `errname`: from 1.0.0 to 1.1.0 - `funlen`: fix `ignore-comments` option - `gci`: from 0.13.5 to 0.13.6 - `gosmopolitan`: from 1.2.2 to 1.3.0 - `inamedparam`: from 0.1.3 to 0.2.0 - `intrange`: from 0.3.0 to 0.3.1 - `protogetter`: from 0.3.9 to 0.3.12 - `unparam`: from [`8a5130c`](https://redirect.github.com/golangci/golangci-lint/commit/8a5130ca722f) to [`0df0534`](https://redirect.github.com/golangci/golangci-lint/commit/0df0534333a4) 5. Misc. - 🧹 Configuration options renaming (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - 🧹 Remove options (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - 🧹 Remove flags (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - 🧹 Remove alternative names (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#alternative-linter-names)) - 🧹 Remove or replace deprecated elements (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - Adds an option to display some commands as JSON: - `golangci-lint config path --json` - `golangci-lint help linters --json` - `golangci-lint help formatters --json` - `golangci-lint linters --json` - `golangci-lint formatters --json` - `golangci-lint version --json` 6. Documentation - [Migration guide](https://golangci-lint.run/product/migration-guide/) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2025-03-26 10:46:44 -07:00
$(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/v2/cmd/golangci-lint
MISSPELL = $(TOOLS)/misspell
$(TOOLS)/misspell: PACKAGE=github.com/client9/misspell/cmd/misspell
GOCOVMERGE = $(TOOLS)/gocovmerge
$(TOOLS)/gocovmerge: PACKAGE=github.com/wadey/gocovmerge
STRINGER = $(TOOLS)/stringer
$(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer
PORTO = $(TOOLS)/porto
$(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto
GOTMPL = $(TOOLS)/gotmpl
$(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl
GORELEASE = $(TOOLS)/gorelease
$(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease
GOVULNCHECK = $(TOOLS)/govulncheck
$(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck
.PHONY: tools
tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(SEMCONVGEN) $(VERIFYREADMES) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE)
feat(ci): Add codespell to Makefile and GitHub Actions (#3996) * feat(ci): Add codespell to Makefile and GitHub Actions This is a followup from https://github.com/open-telemetry/opentelemetry-go/pull/3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn * Use docker to run python and codespell Since this is a Go project, having a dependency on python seemed disconcerting. So, docker is used to create a virtual environment with a python image and also run the tools that were installed. * Remove wording on requirement for python * Apply suggestions from code review Co-authored-by: Damien Mathieu <42@dmathieu.com> * Pin versions into requirements.txt * Pin version in requirements.txt * Fix typo in license * Revert typo fix on deleted file * Update .github/workflows/codespell.yaml Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-18 09:06:27 -07:00
# Virtualized python tools via docker
# The directory where the virtual environment is created.
VENVDIR := venv
# The directory where the python tools are installed.
PYTOOLS := $(VENVDIR)/bin
# The pip executable in the virtual environment.
PIP := $(PYTOOLS)/pip
# The directory in the docker image where the current directory is mounted.
WORKDIR := /workdir
# The python image to use for the virtual environment.
PYTHONIMAGE := $(shell awk '$$4=="python" {print $$2}' $(DEPENDENCIES_DOCKERFILE))
feat(ci): Add codespell to Makefile and GitHub Actions (#3996) * feat(ci): Add codespell to Makefile and GitHub Actions This is a followup from https://github.com/open-telemetry/opentelemetry-go/pull/3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn * Use docker to run python and codespell Since this is a Go project, having a dependency on python seemed disconcerting. So, docker is used to create a virtual environment with a python image and also run the tools that were installed. * Remove wording on requirement for python * Apply suggestions from code review Co-authored-by: Damien Mathieu <42@dmathieu.com> * Pin versions into requirements.txt * Pin version in requirements.txt * Fix typo in license * Revert typo fix on deleted file * Update .github/workflows/codespell.yaml Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-18 09:06:27 -07:00
# Run the python image with the current directory mounted.
DOCKERPY := docker run --rm -u $(DOCKER_USER) -v "$(CURDIR):$(WORKDIR)" -w $(WORKDIR) $(PYTHONIMAGE)
feat(ci): Add codespell to Makefile and GitHub Actions (#3996) * feat(ci): Add codespell to Makefile and GitHub Actions This is a followup from https://github.com/open-telemetry/opentelemetry-go/pull/3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn * Use docker to run python and codespell Since this is a Go project, having a dependency on python seemed disconcerting. So, docker is used to create a virtual environment with a python image and also run the tools that were installed. * Remove wording on requirement for python * Apply suggestions from code review Co-authored-by: Damien Mathieu <42@dmathieu.com> * Pin versions into requirements.txt * Pin version in requirements.txt * Fix typo in license * Revert typo fix on deleted file * Update .github/workflows/codespell.yaml Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-18 09:06:27 -07:00
# Create a virtual environment for Python tools.
$(PYTOOLS):
# The `--upgrade` flag is needed to ensure that the virtual environment is
# created with the latest pip version.
@$(DOCKERPY) bash -c "python3 -m venv $(VENVDIR) && $(PIP) install --upgrade --cache-dir=$(WORKDIR)/.cache/pip pip"
feat(ci): Add codespell to Makefile and GitHub Actions (#3996) * feat(ci): Add codespell to Makefile and GitHub Actions This is a followup from https://github.com/open-telemetry/opentelemetry-go/pull/3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn * Use docker to run python and codespell Since this is a Go project, having a dependency on python seemed disconcerting. So, docker is used to create a virtual environment with a python image and also run the tools that were installed. * Remove wording on requirement for python * Apply suggestions from code review Co-authored-by: Damien Mathieu <42@dmathieu.com> * Pin versions into requirements.txt * Pin version in requirements.txt * Fix typo in license * Revert typo fix on deleted file * Update .github/workflows/codespell.yaml Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-18 09:06:27 -07:00
# Install python packages into the virtual environment.
$(PYTOOLS)/%: $(PYTOOLS)
@$(DOCKERPY) $(PIP) install --cache-dir=$(WORKDIR)/.cache/pip -r requirements.txt
feat(ci): Add codespell to Makefile and GitHub Actions (#3996) * feat(ci): Add codespell to Makefile and GitHub Actions This is a followup from https://github.com/open-telemetry/opentelemetry-go/pull/3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn * Use docker to run python and codespell Since this is a Go project, having a dependency on python seemed disconcerting. So, docker is used to create a virtual environment with a python image and also run the tools that were installed. * Remove wording on requirement for python * Apply suggestions from code review Co-authored-by: Damien Mathieu <42@dmathieu.com> * Pin versions into requirements.txt * Pin version in requirements.txt * Fix typo in license * Revert typo fix on deleted file * Update .github/workflows/codespell.yaml Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-18 09:06:27 -07:00
CODESPELL = $(PYTOOLS)/codespell
$(CODESPELL): PACKAGE=codespell
# Generate
.PHONY: generate
generate: go-generate vanity-import-fix
.PHONY: go-generate
go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%)
go-generate/%: DIR=$*
go-generate/%: $(STRINGER) $(GOTMPL)
@echo "$(GO) generate $(DIR)/..." \
&& cd $(DIR) \
&& PATH="$(TOOLS):$${PATH}" $(GO) generate ./...
.PHONY: vanity-import-fix
vanity-import-fix: $(PORTO)
@$(PORTO) --include-internal -w .
# Generate go.work file for local development.
.PHONY: go-work
go-work: $(CROSSLINK)
$(CROSSLINK) work --root=$(shell pwd) --go=1.22.7
# Build
.PHONY: build
build: $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%)
build/%: DIR=$*
build/%:
@echo "$(GO) build $(DIR)/..." \
&& cd $(DIR) \
&& $(GO) build ./...
build-tests/%: DIR=$*
build-tests/%:
@echo "$(GO) build tests $(DIR)/..." \
&& cd $(DIR) \
&& $(GO) list ./... \
| grep -v third_party \
| xargs $(GO) test -vet=off -run xxxxxMatchNothingxxxxx >/dev/null
# Tests
TEST_TARGETS := test-default test-bench test-short test-verbose test-race test-concurrent-safe
.PHONY: $(TEST_TARGETS) test
test-default test-race: ARGS=-race
test-bench: ARGS=-run=xxxxxMatchNothingxxxxx -test.benchtime=1ms -bench=.
test-short: ARGS=-short
test-verbose: ARGS=-v -race
test-concurrent-safe: ARGS=-run=ConcurrentSafe -count=100 -race
test-concurrent-safe: TIMEOUT=120
$(TEST_TARGETS): test
test: $(OTEL_GO_MOD_DIRS:%=test/%)
test/%: DIR=$*
test/%:
@echo "$(GO) test -timeout $(TIMEOUT)s $(ARGS) $(DIR)/..." \
&& cd $(DIR) \
&& $(GO) list ./... \
| grep -v third_party \
| xargs $(GO) test -timeout $(TIMEOUT)s $(ARGS)
COVERAGE_MODE = atomic
COVERAGE_PROFILE = coverage.out
.PHONY: test-coverage
test-coverage: $(GOCOVMERGE)
@set -e; \
printf "" > coverage.txt; \
for dir in $(ALL_COVERAGE_MOD_DIRS); do \
echo "$(GO) test -coverpkg=go.opentelemetry.io/otel/... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" $${dir}/..."; \
(cd "$${dir}" && \
$(GO) list ./... \
| grep -v third_party \
| grep -v 'semconv/v.*' \
| xargs $(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" && \
$(GO) tool cover -html=coverage.out -o coverage.html); \
done; \
$(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt
.PHONY: benchmark
benchmark: $(OTEL_GO_MOD_DIRS:%=benchmark/%)
benchmark/%:
@echo "$(GO) test -run=xxxxxMatchNothingxxxxx -bench=. $*..." \
&& cd $* \
&& $(GO) list ./... \
| grep -v third_party \
| xargs $(GO) test -run=xxxxxMatchNothingxxxxx -bench=.
.PHONY: golangci-lint golangci-lint-fix
golangci-lint-fix: ARGS=--fix
golangci-lint-fix: golangci-lint
golangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%)
golangci-lint/%: DIR=$*
golangci-lint/%: $(GOLANGCI_LINT)
@echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \
&& cd $(DIR) \
&& $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS)
.PHONY: crosslink
crosslink: $(CROSSLINK)
@echo "Updating intra-repository dependencies in all go modules" \
&& $(CROSSLINK) --root=$(shell pwd) --prune
.PHONY: go-mod-tidy
go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%)
go-mod-tidy/%: DIR=$*
go-mod-tidy/%: crosslink
@echo "$(GO) mod tidy in $(DIR)" \
&& cd $(DIR) \
&& $(GO) mod tidy -compat=1.21
.PHONY: lint
lint: misspell go-mod-tidy golangci-lint govulncheck
.PHONY: vanity-import-check
vanity-import-check: $(PORTO)
@$(PORTO) --include-internal -l . || ( echo "(run: make vanity-import-fix)"; exit 1 )
.PHONY: misspell
misspell: $(MISSPELL)
@$(MISSPELL) -w $(ALL_DOCS)
.PHONY: govulncheck
govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%)
govulncheck/%: DIR=$*
govulncheck/%: $(GOVULNCHECK)
@echo "govulncheck ./... in $(DIR)" \
&& cd $(DIR) \
&& $(GOVULNCHECK) ./...
feat(ci): Add codespell to Makefile and GitHub Actions (#3996) * feat(ci): Add codespell to Makefile and GitHub Actions This is a followup from https://github.com/open-telemetry/opentelemetry-go/pull/3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn * Use docker to run python and codespell Since this is a Go project, having a dependency on python seemed disconcerting. So, docker is used to create a virtual environment with a python image and also run the tools that were installed. * Remove wording on requirement for python * Apply suggestions from code review Co-authored-by: Damien Mathieu <42@dmathieu.com> * Pin versions into requirements.txt * Pin version in requirements.txt * Fix typo in license * Revert typo fix on deleted file * Update .github/workflows/codespell.yaml Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-18 09:06:27 -07:00
.PHONY: codespell
codespell: $(CODESPELL)
feat(ci): Add codespell to Makefile and GitHub Actions (#3996) * feat(ci): Add codespell to Makefile and GitHub Actions This is a followup from https://github.com/open-telemetry/opentelemetry-go/pull/3980 to add the automation for checking for code spelling errors to a different PR. [Codespell][] makes use of the `.codespellrc` file automatically as a config file for convenience. The configuration file specifies directories and flags to pass to `codespell`. Codespell also makes use of the `.codespellignore` file to ignore certain word spellings. There is a new section in `Makefile` for installing python tooling. It is similar to how the go tools are installed. It sets up a virtualenv in `venv `and installs python tooling there if it hasn't been installed yet. The new [codespell workflow][] will run in pull requests to annotate misspelled words. It is set up to only warn the user with annotations in the pull request if there are typos, but we can fail the pull request as well if we want to by deleting the [warn_only][] key. [codespell]: https://github.com/codespell-project/codespell [codespell workflow]: https://github.com/codespell-project/actions-codespell [warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn * Use docker to run python and codespell Since this is a Go project, having a dependency on python seemed disconcerting. So, docker is used to create a virtual environment with a python image and also run the tools that were installed. * Remove wording on requirement for python * Apply suggestions from code review Co-authored-by: Damien Mathieu <42@dmathieu.com> * Pin versions into requirements.txt * Pin version in requirements.txt * Fix typo in license * Revert typo fix on deleted file * Update .github/workflows/codespell.yaml Co-authored-by: Robert Pająk <pellared@hotmail.com> * Update codespell.yaml * Update codespell.yaml --------- Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-18 09:06:27 -07:00
@$(DOCKERPY) $(CODESPELL)
.PHONY: toolchain-check
toolchain-check:
@toolchainRes=$$(for f in $(ALL_GO_MOD_DIRS); do \
awk '/^toolchain/ { found=1; next } END { if (found) print FILENAME }' $$f/go.mod; \
done); \
if [ -n "$${toolchainRes}" ]; then \
echo "toolchain checking failed:"; echo "$${toolchainRes}"; \
exit 1; \
fi
.PHONY: license-check
license-check:
@licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path '**/third_party/*' ! -path './.git/*' ) ; do \
awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \
done); \
if [ -n "$${licRes}" ]; then \
echo "license header checking failed:"; echo "$${licRes}"; \
exit 1; \
fi
.PHONY: check-clean-work-tree
check-clean-work-tree:
@if ! git diff --quiet; then \
echo; \
echo 'Working tree is not clean, did you forget to run "make precommit"?'; \
echo; \
git status; \
exit 1; \
fi
Weaver (#5898) Builds off of https://github.com/open-telemetry/opentelemetry-go/pull/5793 Resolve https://github.com/open-telemetry/opentelemetry-go/issues/5668 This migrates the generation of our semconv packages from using the `semconvgen` tooling to the new [`weaver`](https://github.com/open-telemetry/weaver) project. The configuration and templating has been added in a way to generate as close as we can to what the `semconvgen` tooling already generated. There are notable differences: ### Acronym/Initialism Fixes As metioned [here](https://github.com/open-telemetry/opentelemetry-go/pull/5898#issuecomment-2622976636), the evaluated exported output of regenerating the `semconv/v1.27.0` package resulted in the following changes: | `weaver` | `semconvgen` | | --- | --- | | ASPNETCoreDiagnosticsExceptionsDescription | AspnetcoreDiagnosticsExceptionsDescription| | ASPNETCoreDiagnosticsExceptionsName | AspnetcoreDiagnosticsExceptionsName| | ASPNETCoreDiagnosticsExceptionsUnit | AspnetcoreDiagnosticsExceptionsUnit| | ASPNETCoreRateLimitingActiveRequestLeasesDescription | AspnetcoreRateLimitingActiveRequestLeasesDescription| | ASPNETCoreRateLimitingActiveRequestLeasesName | AspnetcoreRateLimitingActiveRequestLeasesName| | ASPNETCoreRateLimitingActiveRequestLeasesUnit | AspnetcoreRateLimitingActiveRequestLeasesUnit| | ASPNETCoreRateLimitingQueuedRequestsDescription | AspnetcoreRateLimitingQueuedRequestsDescription| | ASPNETCoreRateLimitingQueuedRequestsName | AspnetcoreRateLimitingQueuedRequestsName| | ASPNETCoreRateLimitingQueuedRequestsUnit | AspnetcoreRateLimitingQueuedRequestsUnit| | ASPNETCoreRateLimitingRequestLeaseDurationDescription | AspnetcoreRateLimitingRequestLeaseDurationDescription| | ASPNETCoreRateLimitingRequestLeaseDurationName | AspnetcoreRateLimitingRequestLeaseDurationName| | ASPNETCoreRateLimitingRequestLeaseDurationUnit | AspnetcoreRateLimitingRequestLeaseDurationUnit| | ASPNETCoreRateLimitingRequestTimeInQueueDescription | AspnetcoreRateLimitingRequestTimeInQueueDescription| | ASPNETCoreRateLimitingRequestTimeInQueueName | AspnetcoreRateLimitingRequestTimeInQueueName| | ASPNETCoreRateLimitingRequestTimeInQueueUnit | AspnetcoreRateLimitingRequestTimeInQueueUnit| | ASPNETCoreRateLimitingRequestsDescription | AspnetcoreRateLimitingRequestsDescription| | ASPNETCoreRateLimitingRequestsName | AspnetcoreRateLimitingRequestsName| | ASPNETCoreRateLimitingRequestsUnit | AspnetcoreRateLimitingRequestsUnit| | ASPNETCoreRoutingMatchAttemptsDescription | AspnetcoreRoutingMatchAttemptsDescription| | ASPNETCoreRoutingMatchAttemptsName | AspnetcoreRoutingMatchAttemptsName| | ASPNETCoreRoutingMatchAttemptsUnit | AspnetcoreRoutingMatchAttemptsUnit| | DBSystemDb2 | DBSystemDB2| | GenAIClientOperationDurationDescription | GenAiClientOperationDurationDescription| | GenAIClientOperationDurationName | GenAiClientOperationDurationName| | GenAIClientOperationDurationUnit | GenAiClientOperationDurationUnit| | GenAIClientTokenUsageDescription | GenAiClientTokenUsageDescription| | GenAIClientTokenUsageName | GenAiClientTokenUsageName| | GenAIClientTokenUsageUnit | GenAiClientTokenUsageUnit| | GenAIServerRequestDurationDescription | GenAiServerRequestDurationDescription| | GenAIServerRequestDurationName | GenAiServerRequestDurationName| | GenAIServerRequestDurationUnit | GenAiServerRequestDurationUnit| | GenAIServerTimePerOutputTokenDescription | GenAiServerTimePerOutputTokenDescription| | GenAIServerTimePerOutputTokenName | GenAiServerTimePerOutputTokenName| | GenAIServerTimePerOutputTokenUnit | GenAiServerTimePerOutputTokenUnit| | GenAIServerTimeToFirstTokenDescription | GenAiServerTimeToFirstTokenDescription| | GenAIServerTimeToFirstTokenName | GenAiServerTimeToFirstTokenName| | GenAIServerTimeToFirstTokenUnit | GenAiServerTimeToFirstTokenUnit| | GoMemoryGCGoalDescription | GoMemoryGcGoalDescription| | GoMemoryGCGoalName | GoMemoryGcGoalName| | GoMemoryGCGoalUnit | GoMemoryGcGoalUnit| | JVMBufferCountDescription | JvmBufferCountDescription| | JVMBufferCountName | JvmBufferCountName| | JVMBufferCountUnit | JvmBufferCountUnit| | JVMBufferMemoryLimitDescription | JvmBufferMemoryLimitDescription| | JVMBufferMemoryLimitName | JvmBufferMemoryLimitName| | JVMBufferMemoryLimitUnit | JvmBufferMemoryLimitUnit| | JVMBufferMemoryUsageDescription | JvmBufferMemoryUsageDescription| | JVMBufferMemoryUsageName | JvmBufferMemoryUsageName| | JVMBufferMemoryUsageUnit | JvmBufferMemoryUsageUnit| | JVMBufferMemoryUsedDescription | JvmBufferMemoryUsedDescription| | JVMBufferMemoryUsedName | JvmBufferMemoryUsedName| | JVMBufferMemoryUsedUnit | JvmBufferMemoryUsedUnit| | JVMCPUCountDescription | JvmCPUCountDescription| | JVMCPUCountName | JvmCPUCountName| | JVMCPUCountUnit | JvmCPUCountUnit| | JVMCPURecentUtilizationDescription | JvmCPURecentUtilizationDescription| | JVMCPURecentUtilizationName | JvmCPURecentUtilizationName| | JVMCPURecentUtilizationUnit | JvmCPURecentUtilizationUnit| | JVMCPUTimeDescription | JvmCPUTimeDescription| | JVMCPUTimeName | JvmCPUTimeName| | JVMCPUTimeUnit | JvmCPUTimeUnit| | JVMClassCountDescription | JvmClassCountDescription| | JVMClassCountName | JvmClassCountName| | JVMClassCountUnit | JvmClassCountUnit| | JVMClassLoadedDescription | JvmClassLoadedDescription| | JVMClassLoadedName | JvmClassLoadedName| | JVMClassLoadedUnit | JvmClassLoadedUnit| | JVMClassUnloadedDescription | JvmClassUnloadedDescription| | JVMClassUnloadedName | JvmClassUnloadedName| | JVMClassUnloadedUnit | JvmClassUnloadedUnit| | JVMGCDurationDescription | JvmGcDurationDescription| | JVMGCDurationName | JvmGcDurationName| | JVMGCDurationUnit | JvmGcDurationUnit| | JVMMemoryCommittedDescription | JvmMemoryCommittedDescription| | JVMMemoryCommittedName | JvmMemoryCommittedName| | JVMMemoryCommittedUnit | JvmMemoryCommittedUnit| | JVMMemoryInitDescription | JvmMemoryInitDescription| | JVMMemoryInitName | JvmMemoryInitName| | JVMMemoryInitUnit | JvmMemoryInitUnit| | JVMMemoryLimitDescription | JvmMemoryLimitDescription| | JVMMemoryLimitName | JvmMemoryLimitName| | JVMMemoryLimitUnit | JvmMemoryLimitUnit| | JVMMemoryUsedAfterLastGCDescription | JvmMemoryUsedAfterLastGcDescription| | JVMMemoryUsedAfterLastGCName | JvmMemoryUsedAfterLastGcName| | JVMMemoryUsedAfterLastGCUnit | JvmMemoryUsedAfterLastGcUnit| | JVMMemoryUsedDescription | JvmMemoryUsedDescription| | JVMMemoryUsedName | JvmMemoryUsedName| | JVMMemoryUsedUnit | JvmMemoryUsedUnit| | JVMSystemCPULoad1mDescription | JvmSystemCPULoad1mDescription| | JVMSystemCPULoad1mName | JvmSystemCPULoad1mName| | JVMSystemCPULoad1mUnit | JvmSystemCPULoad1mUnit| | JVMSystemCPUUtilizationDescription | JvmSystemCPUUtilizationDescription| | JVMSystemCPUUtilizationName | JvmSystemCPUUtilizationName| | JVMSystemCPUUtilizationUnit | JvmSystemCPUUtilizationUnit| | JVMThreadCountDescription | JvmThreadCountDescription| | JVMThreadCountName | JvmThreadCountName| | JVMThreadCountUnit | JvmThreadCountUnit| | V8JSGCDurationDescription | V8jsGcDurationDescription| | V8JSGCDurationName | V8jsGcDurationName| | V8JSGCDurationUnit | V8jsGcDurationUnit| | V8JSHeapSpaceAvailableSizeDescription | V8jsHeapSpaceAvailableSizeDescription| | V8JSHeapSpaceAvailableSizeName | V8jsHeapSpaceAvailableSizeName| | V8JSHeapSpaceAvailableSizeUnit | V8jsHeapSpaceAvailableSizeUnit| | V8JSHeapSpacePhysicalSizeDescription | V8jsHeapSpacePhysicalSizeDescription| | V8JSHeapSpacePhysicalSizeName | V8jsHeapSpacePhysicalSizeName| | V8JSHeapSpacePhysicalSizeUnit | V8jsHeapSpacePhysicalSizeUnit| | V8JSMemoryHeapLimitDescription | V8jsMemoryHeapLimitDescription| | V8JSMemoryHeapLimitName | V8jsMemoryHeapLimitName| | V8JSMemoryHeapLimitUnit | V8jsMemoryHeapLimitUnit| | V8JSMemoryHeapUsedDescription | V8jsMemoryHeapUsedDescription| | V8JSMemoryHeapUsedName | V8jsMemoryHeapUsedName| | V8JSMemoryHeapUsedUnit | V8jsMemoryHeapUsedUnit| An audit of these changes leads to the conclusion that they are appropriate fixes to things that were mis-named. ### Doc changes Also mentioned [here](https://github.com/open-telemetry/opentelemetry-go/pull/5898#issuecomment-2622976636), there documentation changes that are included. Mostly this is unavoidable based on the new format of the semconv models, and effort has spent ensuring nothing substantive is lost. See the reverted commit https://github.com/open-telemetry/opentelemetry-go/pull/5898/commits/66523cb7f3fb2dd6566f4ccfe44b52d0bb2c0c0f for the details of how the `semconv/v1.27.0` changes. ## Next Steps This PR has been paired down to migrate tooling. The next steps are to generate `semconv/v1.28.0` with desired changes (i.e. maybe we don't generate `ASPCoreNet` attrs(?)). From there the missing semconv packages will be generated. - https://github.com/open-telemetry/opentelemetry-go/issues/6226 - https://github.com/open-telemetry/opentelemetry-go/issues/6227
2025-01-31 06:51:07 -08:00
# The weaver docker image to use for semconv-generate.
WEAVER_IMAGE := $(shell awk '$$4=="weaver" {print $$2}' $(DEPENDENCIES_DOCKERFILE))
SEMCONVPKG ?= "semconv/"
.PHONY: semconv-generate
Weaver (#5898) Builds off of https://github.com/open-telemetry/opentelemetry-go/pull/5793 Resolve https://github.com/open-telemetry/opentelemetry-go/issues/5668 This migrates the generation of our semconv packages from using the `semconvgen` tooling to the new [`weaver`](https://github.com/open-telemetry/weaver) project. The configuration and templating has been added in a way to generate as close as we can to what the `semconvgen` tooling already generated. There are notable differences: ### Acronym/Initialism Fixes As metioned [here](https://github.com/open-telemetry/opentelemetry-go/pull/5898#issuecomment-2622976636), the evaluated exported output of regenerating the `semconv/v1.27.0` package resulted in the following changes: | `weaver` | `semconvgen` | | --- | --- | | ASPNETCoreDiagnosticsExceptionsDescription | AspnetcoreDiagnosticsExceptionsDescription| | ASPNETCoreDiagnosticsExceptionsName | AspnetcoreDiagnosticsExceptionsName| | ASPNETCoreDiagnosticsExceptionsUnit | AspnetcoreDiagnosticsExceptionsUnit| | ASPNETCoreRateLimitingActiveRequestLeasesDescription | AspnetcoreRateLimitingActiveRequestLeasesDescription| | ASPNETCoreRateLimitingActiveRequestLeasesName | AspnetcoreRateLimitingActiveRequestLeasesName| | ASPNETCoreRateLimitingActiveRequestLeasesUnit | AspnetcoreRateLimitingActiveRequestLeasesUnit| | ASPNETCoreRateLimitingQueuedRequestsDescription | AspnetcoreRateLimitingQueuedRequestsDescription| | ASPNETCoreRateLimitingQueuedRequestsName | AspnetcoreRateLimitingQueuedRequestsName| | ASPNETCoreRateLimitingQueuedRequestsUnit | AspnetcoreRateLimitingQueuedRequestsUnit| | ASPNETCoreRateLimitingRequestLeaseDurationDescription | AspnetcoreRateLimitingRequestLeaseDurationDescription| | ASPNETCoreRateLimitingRequestLeaseDurationName | AspnetcoreRateLimitingRequestLeaseDurationName| | ASPNETCoreRateLimitingRequestLeaseDurationUnit | AspnetcoreRateLimitingRequestLeaseDurationUnit| | ASPNETCoreRateLimitingRequestTimeInQueueDescription | AspnetcoreRateLimitingRequestTimeInQueueDescription| | ASPNETCoreRateLimitingRequestTimeInQueueName | AspnetcoreRateLimitingRequestTimeInQueueName| | ASPNETCoreRateLimitingRequestTimeInQueueUnit | AspnetcoreRateLimitingRequestTimeInQueueUnit| | ASPNETCoreRateLimitingRequestsDescription | AspnetcoreRateLimitingRequestsDescription| | ASPNETCoreRateLimitingRequestsName | AspnetcoreRateLimitingRequestsName| | ASPNETCoreRateLimitingRequestsUnit | AspnetcoreRateLimitingRequestsUnit| | ASPNETCoreRoutingMatchAttemptsDescription | AspnetcoreRoutingMatchAttemptsDescription| | ASPNETCoreRoutingMatchAttemptsName | AspnetcoreRoutingMatchAttemptsName| | ASPNETCoreRoutingMatchAttemptsUnit | AspnetcoreRoutingMatchAttemptsUnit| | DBSystemDb2 | DBSystemDB2| | GenAIClientOperationDurationDescription | GenAiClientOperationDurationDescription| | GenAIClientOperationDurationName | GenAiClientOperationDurationName| | GenAIClientOperationDurationUnit | GenAiClientOperationDurationUnit| | GenAIClientTokenUsageDescription | GenAiClientTokenUsageDescription| | GenAIClientTokenUsageName | GenAiClientTokenUsageName| | GenAIClientTokenUsageUnit | GenAiClientTokenUsageUnit| | GenAIServerRequestDurationDescription | GenAiServerRequestDurationDescription| | GenAIServerRequestDurationName | GenAiServerRequestDurationName| | GenAIServerRequestDurationUnit | GenAiServerRequestDurationUnit| | GenAIServerTimePerOutputTokenDescription | GenAiServerTimePerOutputTokenDescription| | GenAIServerTimePerOutputTokenName | GenAiServerTimePerOutputTokenName| | GenAIServerTimePerOutputTokenUnit | GenAiServerTimePerOutputTokenUnit| | GenAIServerTimeToFirstTokenDescription | GenAiServerTimeToFirstTokenDescription| | GenAIServerTimeToFirstTokenName | GenAiServerTimeToFirstTokenName| | GenAIServerTimeToFirstTokenUnit | GenAiServerTimeToFirstTokenUnit| | GoMemoryGCGoalDescription | GoMemoryGcGoalDescription| | GoMemoryGCGoalName | GoMemoryGcGoalName| | GoMemoryGCGoalUnit | GoMemoryGcGoalUnit| | JVMBufferCountDescription | JvmBufferCountDescription| | JVMBufferCountName | JvmBufferCountName| | JVMBufferCountUnit | JvmBufferCountUnit| | JVMBufferMemoryLimitDescription | JvmBufferMemoryLimitDescription| | JVMBufferMemoryLimitName | JvmBufferMemoryLimitName| | JVMBufferMemoryLimitUnit | JvmBufferMemoryLimitUnit| | JVMBufferMemoryUsageDescription | JvmBufferMemoryUsageDescription| | JVMBufferMemoryUsageName | JvmBufferMemoryUsageName| | JVMBufferMemoryUsageUnit | JvmBufferMemoryUsageUnit| | JVMBufferMemoryUsedDescription | JvmBufferMemoryUsedDescription| | JVMBufferMemoryUsedName | JvmBufferMemoryUsedName| | JVMBufferMemoryUsedUnit | JvmBufferMemoryUsedUnit| | JVMCPUCountDescription | JvmCPUCountDescription| | JVMCPUCountName | JvmCPUCountName| | JVMCPUCountUnit | JvmCPUCountUnit| | JVMCPURecentUtilizationDescription | JvmCPURecentUtilizationDescription| | JVMCPURecentUtilizationName | JvmCPURecentUtilizationName| | JVMCPURecentUtilizationUnit | JvmCPURecentUtilizationUnit| | JVMCPUTimeDescription | JvmCPUTimeDescription| | JVMCPUTimeName | JvmCPUTimeName| | JVMCPUTimeUnit | JvmCPUTimeUnit| | JVMClassCountDescription | JvmClassCountDescription| | JVMClassCountName | JvmClassCountName| | JVMClassCountUnit | JvmClassCountUnit| | JVMClassLoadedDescription | JvmClassLoadedDescription| | JVMClassLoadedName | JvmClassLoadedName| | JVMClassLoadedUnit | JvmClassLoadedUnit| | JVMClassUnloadedDescription | JvmClassUnloadedDescription| | JVMClassUnloadedName | JvmClassUnloadedName| | JVMClassUnloadedUnit | JvmClassUnloadedUnit| | JVMGCDurationDescription | JvmGcDurationDescription| | JVMGCDurationName | JvmGcDurationName| | JVMGCDurationUnit | JvmGcDurationUnit| | JVMMemoryCommittedDescription | JvmMemoryCommittedDescription| | JVMMemoryCommittedName | JvmMemoryCommittedName| | JVMMemoryCommittedUnit | JvmMemoryCommittedUnit| | JVMMemoryInitDescription | JvmMemoryInitDescription| | JVMMemoryInitName | JvmMemoryInitName| | JVMMemoryInitUnit | JvmMemoryInitUnit| | JVMMemoryLimitDescription | JvmMemoryLimitDescription| | JVMMemoryLimitName | JvmMemoryLimitName| | JVMMemoryLimitUnit | JvmMemoryLimitUnit| | JVMMemoryUsedAfterLastGCDescription | JvmMemoryUsedAfterLastGcDescription| | JVMMemoryUsedAfterLastGCName | JvmMemoryUsedAfterLastGcName| | JVMMemoryUsedAfterLastGCUnit | JvmMemoryUsedAfterLastGcUnit| | JVMMemoryUsedDescription | JvmMemoryUsedDescription| | JVMMemoryUsedName | JvmMemoryUsedName| | JVMMemoryUsedUnit | JvmMemoryUsedUnit| | JVMSystemCPULoad1mDescription | JvmSystemCPULoad1mDescription| | JVMSystemCPULoad1mName | JvmSystemCPULoad1mName| | JVMSystemCPULoad1mUnit | JvmSystemCPULoad1mUnit| | JVMSystemCPUUtilizationDescription | JvmSystemCPUUtilizationDescription| | JVMSystemCPUUtilizationName | JvmSystemCPUUtilizationName| | JVMSystemCPUUtilizationUnit | JvmSystemCPUUtilizationUnit| | JVMThreadCountDescription | JvmThreadCountDescription| | JVMThreadCountName | JvmThreadCountName| | JVMThreadCountUnit | JvmThreadCountUnit| | V8JSGCDurationDescription | V8jsGcDurationDescription| | V8JSGCDurationName | V8jsGcDurationName| | V8JSGCDurationUnit | V8jsGcDurationUnit| | V8JSHeapSpaceAvailableSizeDescription | V8jsHeapSpaceAvailableSizeDescription| | V8JSHeapSpaceAvailableSizeName | V8jsHeapSpaceAvailableSizeName| | V8JSHeapSpaceAvailableSizeUnit | V8jsHeapSpaceAvailableSizeUnit| | V8JSHeapSpacePhysicalSizeDescription | V8jsHeapSpacePhysicalSizeDescription| | V8JSHeapSpacePhysicalSizeName | V8jsHeapSpacePhysicalSizeName| | V8JSHeapSpacePhysicalSizeUnit | V8jsHeapSpacePhysicalSizeUnit| | V8JSMemoryHeapLimitDescription | V8jsMemoryHeapLimitDescription| | V8JSMemoryHeapLimitName | V8jsMemoryHeapLimitName| | V8JSMemoryHeapLimitUnit | V8jsMemoryHeapLimitUnit| | V8JSMemoryHeapUsedDescription | V8jsMemoryHeapUsedDescription| | V8JSMemoryHeapUsedName | V8jsMemoryHeapUsedName| | V8JSMemoryHeapUsedUnit | V8jsMemoryHeapUsedUnit| An audit of these changes leads to the conclusion that they are appropriate fixes to things that were mis-named. ### Doc changes Also mentioned [here](https://github.com/open-telemetry/opentelemetry-go/pull/5898#issuecomment-2622976636), there documentation changes that are included. Mostly this is unavoidable based on the new format of the semconv models, and effort has spent ensuring nothing substantive is lost. See the reverted commit https://github.com/open-telemetry/opentelemetry-go/pull/5898/commits/66523cb7f3fb2dd6566f4ccfe44b52d0bb2c0c0f for the details of how the `semconv/v1.27.0` changes. ## Next Steps This PR has been paired down to migrate tooling. The next steps are to generate `semconv/v1.28.0` with desired changes (i.e. maybe we don't generate `ASPCoreNet` attrs(?)). From there the missing semconv packages will be generated. - https://github.com/open-telemetry/opentelemetry-go/issues/6226 - https://github.com/open-telemetry/opentelemetry-go/issues/6227
2025-01-31 06:51:07 -08:00
semconv-generate: $(SEMCONVKIT)
[ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 )
Weaver (#5898) Builds off of https://github.com/open-telemetry/opentelemetry-go/pull/5793 Resolve https://github.com/open-telemetry/opentelemetry-go/issues/5668 This migrates the generation of our semconv packages from using the `semconvgen` tooling to the new [`weaver`](https://github.com/open-telemetry/weaver) project. The configuration and templating has been added in a way to generate as close as we can to what the `semconvgen` tooling already generated. There are notable differences: ### Acronym/Initialism Fixes As metioned [here](https://github.com/open-telemetry/opentelemetry-go/pull/5898#issuecomment-2622976636), the evaluated exported output of regenerating the `semconv/v1.27.0` package resulted in the following changes: | `weaver` | `semconvgen` | | --- | --- | | ASPNETCoreDiagnosticsExceptionsDescription | AspnetcoreDiagnosticsExceptionsDescription| | ASPNETCoreDiagnosticsExceptionsName | AspnetcoreDiagnosticsExceptionsName| | ASPNETCoreDiagnosticsExceptionsUnit | AspnetcoreDiagnosticsExceptionsUnit| | ASPNETCoreRateLimitingActiveRequestLeasesDescription | AspnetcoreRateLimitingActiveRequestLeasesDescription| | ASPNETCoreRateLimitingActiveRequestLeasesName | AspnetcoreRateLimitingActiveRequestLeasesName| | ASPNETCoreRateLimitingActiveRequestLeasesUnit | AspnetcoreRateLimitingActiveRequestLeasesUnit| | ASPNETCoreRateLimitingQueuedRequestsDescription | AspnetcoreRateLimitingQueuedRequestsDescription| | ASPNETCoreRateLimitingQueuedRequestsName | AspnetcoreRateLimitingQueuedRequestsName| | ASPNETCoreRateLimitingQueuedRequestsUnit | AspnetcoreRateLimitingQueuedRequestsUnit| | ASPNETCoreRateLimitingRequestLeaseDurationDescription | AspnetcoreRateLimitingRequestLeaseDurationDescription| | ASPNETCoreRateLimitingRequestLeaseDurationName | AspnetcoreRateLimitingRequestLeaseDurationName| | ASPNETCoreRateLimitingRequestLeaseDurationUnit | AspnetcoreRateLimitingRequestLeaseDurationUnit| | ASPNETCoreRateLimitingRequestTimeInQueueDescription | AspnetcoreRateLimitingRequestTimeInQueueDescription| | ASPNETCoreRateLimitingRequestTimeInQueueName | AspnetcoreRateLimitingRequestTimeInQueueName| | ASPNETCoreRateLimitingRequestTimeInQueueUnit | AspnetcoreRateLimitingRequestTimeInQueueUnit| | ASPNETCoreRateLimitingRequestsDescription | AspnetcoreRateLimitingRequestsDescription| | ASPNETCoreRateLimitingRequestsName | AspnetcoreRateLimitingRequestsName| | ASPNETCoreRateLimitingRequestsUnit | AspnetcoreRateLimitingRequestsUnit| | ASPNETCoreRoutingMatchAttemptsDescription | AspnetcoreRoutingMatchAttemptsDescription| | ASPNETCoreRoutingMatchAttemptsName | AspnetcoreRoutingMatchAttemptsName| | ASPNETCoreRoutingMatchAttemptsUnit | AspnetcoreRoutingMatchAttemptsUnit| | DBSystemDb2 | DBSystemDB2| | GenAIClientOperationDurationDescription | GenAiClientOperationDurationDescription| | GenAIClientOperationDurationName | GenAiClientOperationDurationName| | GenAIClientOperationDurationUnit | GenAiClientOperationDurationUnit| | GenAIClientTokenUsageDescription | GenAiClientTokenUsageDescription| | GenAIClientTokenUsageName | GenAiClientTokenUsageName| | GenAIClientTokenUsageUnit | GenAiClientTokenUsageUnit| | GenAIServerRequestDurationDescription | GenAiServerRequestDurationDescription| | GenAIServerRequestDurationName | GenAiServerRequestDurationName| | GenAIServerRequestDurationUnit | GenAiServerRequestDurationUnit| | GenAIServerTimePerOutputTokenDescription | GenAiServerTimePerOutputTokenDescription| | GenAIServerTimePerOutputTokenName | GenAiServerTimePerOutputTokenName| | GenAIServerTimePerOutputTokenUnit | GenAiServerTimePerOutputTokenUnit| | GenAIServerTimeToFirstTokenDescription | GenAiServerTimeToFirstTokenDescription| | GenAIServerTimeToFirstTokenName | GenAiServerTimeToFirstTokenName| | GenAIServerTimeToFirstTokenUnit | GenAiServerTimeToFirstTokenUnit| | GoMemoryGCGoalDescription | GoMemoryGcGoalDescription| | GoMemoryGCGoalName | GoMemoryGcGoalName| | GoMemoryGCGoalUnit | GoMemoryGcGoalUnit| | JVMBufferCountDescription | JvmBufferCountDescription| | JVMBufferCountName | JvmBufferCountName| | JVMBufferCountUnit | JvmBufferCountUnit| | JVMBufferMemoryLimitDescription | JvmBufferMemoryLimitDescription| | JVMBufferMemoryLimitName | JvmBufferMemoryLimitName| | JVMBufferMemoryLimitUnit | JvmBufferMemoryLimitUnit| | JVMBufferMemoryUsageDescription | JvmBufferMemoryUsageDescription| | JVMBufferMemoryUsageName | JvmBufferMemoryUsageName| | JVMBufferMemoryUsageUnit | JvmBufferMemoryUsageUnit| | JVMBufferMemoryUsedDescription | JvmBufferMemoryUsedDescription| | JVMBufferMemoryUsedName | JvmBufferMemoryUsedName| | JVMBufferMemoryUsedUnit | JvmBufferMemoryUsedUnit| | JVMCPUCountDescription | JvmCPUCountDescription| | JVMCPUCountName | JvmCPUCountName| | JVMCPUCountUnit | JvmCPUCountUnit| | JVMCPURecentUtilizationDescription | JvmCPURecentUtilizationDescription| | JVMCPURecentUtilizationName | JvmCPURecentUtilizationName| | JVMCPURecentUtilizationUnit | JvmCPURecentUtilizationUnit| | JVMCPUTimeDescription | JvmCPUTimeDescription| | JVMCPUTimeName | JvmCPUTimeName| | JVMCPUTimeUnit | JvmCPUTimeUnit| | JVMClassCountDescription | JvmClassCountDescription| | JVMClassCountName | JvmClassCountName| | JVMClassCountUnit | JvmClassCountUnit| | JVMClassLoadedDescription | JvmClassLoadedDescription| | JVMClassLoadedName | JvmClassLoadedName| | JVMClassLoadedUnit | JvmClassLoadedUnit| | JVMClassUnloadedDescription | JvmClassUnloadedDescription| | JVMClassUnloadedName | JvmClassUnloadedName| | JVMClassUnloadedUnit | JvmClassUnloadedUnit| | JVMGCDurationDescription | JvmGcDurationDescription| | JVMGCDurationName | JvmGcDurationName| | JVMGCDurationUnit | JvmGcDurationUnit| | JVMMemoryCommittedDescription | JvmMemoryCommittedDescription| | JVMMemoryCommittedName | JvmMemoryCommittedName| | JVMMemoryCommittedUnit | JvmMemoryCommittedUnit| | JVMMemoryInitDescription | JvmMemoryInitDescription| | JVMMemoryInitName | JvmMemoryInitName| | JVMMemoryInitUnit | JvmMemoryInitUnit| | JVMMemoryLimitDescription | JvmMemoryLimitDescription| | JVMMemoryLimitName | JvmMemoryLimitName| | JVMMemoryLimitUnit | JvmMemoryLimitUnit| | JVMMemoryUsedAfterLastGCDescription | JvmMemoryUsedAfterLastGcDescription| | JVMMemoryUsedAfterLastGCName | JvmMemoryUsedAfterLastGcName| | JVMMemoryUsedAfterLastGCUnit | JvmMemoryUsedAfterLastGcUnit| | JVMMemoryUsedDescription | JvmMemoryUsedDescription| | JVMMemoryUsedName | JvmMemoryUsedName| | JVMMemoryUsedUnit | JvmMemoryUsedUnit| | JVMSystemCPULoad1mDescription | JvmSystemCPULoad1mDescription| | JVMSystemCPULoad1mName | JvmSystemCPULoad1mName| | JVMSystemCPULoad1mUnit | JvmSystemCPULoad1mUnit| | JVMSystemCPUUtilizationDescription | JvmSystemCPUUtilizationDescription| | JVMSystemCPUUtilizationName | JvmSystemCPUUtilizationName| | JVMSystemCPUUtilizationUnit | JvmSystemCPUUtilizationUnit| | JVMThreadCountDescription | JvmThreadCountDescription| | JVMThreadCountName | JvmThreadCountName| | JVMThreadCountUnit | JvmThreadCountUnit| | V8JSGCDurationDescription | V8jsGcDurationDescription| | V8JSGCDurationName | V8jsGcDurationName| | V8JSGCDurationUnit | V8jsGcDurationUnit| | V8JSHeapSpaceAvailableSizeDescription | V8jsHeapSpaceAvailableSizeDescription| | V8JSHeapSpaceAvailableSizeName | V8jsHeapSpaceAvailableSizeName| | V8JSHeapSpaceAvailableSizeUnit | V8jsHeapSpaceAvailableSizeUnit| | V8JSHeapSpacePhysicalSizeDescription | V8jsHeapSpacePhysicalSizeDescription| | V8JSHeapSpacePhysicalSizeName | V8jsHeapSpacePhysicalSizeName| | V8JSHeapSpacePhysicalSizeUnit | V8jsHeapSpacePhysicalSizeUnit| | V8JSMemoryHeapLimitDescription | V8jsMemoryHeapLimitDescription| | V8JSMemoryHeapLimitName | V8jsMemoryHeapLimitName| | V8JSMemoryHeapLimitUnit | V8jsMemoryHeapLimitUnit| | V8JSMemoryHeapUsedDescription | V8jsMemoryHeapUsedDescription| | V8JSMemoryHeapUsedName | V8jsMemoryHeapUsedName| | V8JSMemoryHeapUsedUnit | V8jsMemoryHeapUsedUnit| An audit of these changes leads to the conclusion that they are appropriate fixes to things that were mis-named. ### Doc changes Also mentioned [here](https://github.com/open-telemetry/opentelemetry-go/pull/5898#issuecomment-2622976636), there documentation changes that are included. Mostly this is unavoidable based on the new format of the semconv models, and effort has spent ensuring nothing substantive is lost. See the reverted commit https://github.com/open-telemetry/opentelemetry-go/pull/5898/commits/66523cb7f3fb2dd6566f4ccfe44b52d0bb2c0c0f for the details of how the `semconv/v1.27.0` changes. ## Next Steps This PR has been paired down to migrate tooling. The next steps are to generate `semconv/v1.28.0` with desired changes (i.e. maybe we don't generate `ASPCoreNet` attrs(?)). From there the missing semconv packages will be generated. - https://github.com/open-telemetry/opentelemetry-go/issues/6226 - https://github.com/open-telemetry/opentelemetry-go/issues/6227
2025-01-31 06:51:07 -08:00
# Ensure the target directory for source code is available.
mkdir -p $(PWD)/$(SEMCONVPKG)/${TAG}
# Note: We mount a home directory for downloading/storing the semconv repository.
# Weaver will automatically clean the cache when finished, but the directories will remain.
mkdir -p ~/.weaver
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/${TAG},target=/home/weaver/target' \
--mount 'type=bind,source=$(HOME)/.weaver,target=/tmp/weaver/.weaver' \
$(WEAVER_IMAGE) registry generate \
--registry=https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/$(TAG).zip[model] \
Weaver (#5898) Builds off of https://github.com/open-telemetry/opentelemetry-go/pull/5793 Resolve https://github.com/open-telemetry/opentelemetry-go/issues/5668 This migrates the generation of our semconv packages from using the `semconvgen` tooling to the new [`weaver`](https://github.com/open-telemetry/weaver) project. The configuration and templating has been added in a way to generate as close as we can to what the `semconvgen` tooling already generated. There are notable differences: ### Acronym/Initialism Fixes As metioned [here](https://github.com/open-telemetry/opentelemetry-go/pull/5898#issuecomment-2622976636), the evaluated exported output of regenerating the `semconv/v1.27.0` package resulted in the following changes: | `weaver` | `semconvgen` | | --- | --- | | ASPNETCoreDiagnosticsExceptionsDescription | AspnetcoreDiagnosticsExceptionsDescription| | ASPNETCoreDiagnosticsExceptionsName | AspnetcoreDiagnosticsExceptionsName| | ASPNETCoreDiagnosticsExceptionsUnit | AspnetcoreDiagnosticsExceptionsUnit| | ASPNETCoreRateLimitingActiveRequestLeasesDescription | AspnetcoreRateLimitingActiveRequestLeasesDescription| | ASPNETCoreRateLimitingActiveRequestLeasesName | AspnetcoreRateLimitingActiveRequestLeasesName| | ASPNETCoreRateLimitingActiveRequestLeasesUnit | AspnetcoreRateLimitingActiveRequestLeasesUnit| | ASPNETCoreRateLimitingQueuedRequestsDescription | AspnetcoreRateLimitingQueuedRequestsDescription| | ASPNETCoreRateLimitingQueuedRequestsName | AspnetcoreRateLimitingQueuedRequestsName| | ASPNETCoreRateLimitingQueuedRequestsUnit | AspnetcoreRateLimitingQueuedRequestsUnit| | ASPNETCoreRateLimitingRequestLeaseDurationDescription | AspnetcoreRateLimitingRequestLeaseDurationDescription| | ASPNETCoreRateLimitingRequestLeaseDurationName | AspnetcoreRateLimitingRequestLeaseDurationName| | ASPNETCoreRateLimitingRequestLeaseDurationUnit | AspnetcoreRateLimitingRequestLeaseDurationUnit| | ASPNETCoreRateLimitingRequestTimeInQueueDescription | AspnetcoreRateLimitingRequestTimeInQueueDescription| | ASPNETCoreRateLimitingRequestTimeInQueueName | AspnetcoreRateLimitingRequestTimeInQueueName| | ASPNETCoreRateLimitingRequestTimeInQueueUnit | AspnetcoreRateLimitingRequestTimeInQueueUnit| | ASPNETCoreRateLimitingRequestsDescription | AspnetcoreRateLimitingRequestsDescription| | ASPNETCoreRateLimitingRequestsName | AspnetcoreRateLimitingRequestsName| | ASPNETCoreRateLimitingRequestsUnit | AspnetcoreRateLimitingRequestsUnit| | ASPNETCoreRoutingMatchAttemptsDescription | AspnetcoreRoutingMatchAttemptsDescription| | ASPNETCoreRoutingMatchAttemptsName | AspnetcoreRoutingMatchAttemptsName| | ASPNETCoreRoutingMatchAttemptsUnit | AspnetcoreRoutingMatchAttemptsUnit| | DBSystemDb2 | DBSystemDB2| | GenAIClientOperationDurationDescription | GenAiClientOperationDurationDescription| | GenAIClientOperationDurationName | GenAiClientOperationDurationName| | GenAIClientOperationDurationUnit | GenAiClientOperationDurationUnit| | GenAIClientTokenUsageDescription | GenAiClientTokenUsageDescription| | GenAIClientTokenUsageName | GenAiClientTokenUsageName| | GenAIClientTokenUsageUnit | GenAiClientTokenUsageUnit| | GenAIServerRequestDurationDescription | GenAiServerRequestDurationDescription| | GenAIServerRequestDurationName | GenAiServerRequestDurationName| | GenAIServerRequestDurationUnit | GenAiServerRequestDurationUnit| | GenAIServerTimePerOutputTokenDescription | GenAiServerTimePerOutputTokenDescription| | GenAIServerTimePerOutputTokenName | GenAiServerTimePerOutputTokenName| | GenAIServerTimePerOutputTokenUnit | GenAiServerTimePerOutputTokenUnit| | GenAIServerTimeToFirstTokenDescription | GenAiServerTimeToFirstTokenDescription| | GenAIServerTimeToFirstTokenName | GenAiServerTimeToFirstTokenName| | GenAIServerTimeToFirstTokenUnit | GenAiServerTimeToFirstTokenUnit| | GoMemoryGCGoalDescription | GoMemoryGcGoalDescription| | GoMemoryGCGoalName | GoMemoryGcGoalName| | GoMemoryGCGoalUnit | GoMemoryGcGoalUnit| | JVMBufferCountDescription | JvmBufferCountDescription| | JVMBufferCountName | JvmBufferCountName| | JVMBufferCountUnit | JvmBufferCountUnit| | JVMBufferMemoryLimitDescription | JvmBufferMemoryLimitDescription| | JVMBufferMemoryLimitName | JvmBufferMemoryLimitName| | JVMBufferMemoryLimitUnit | JvmBufferMemoryLimitUnit| | JVMBufferMemoryUsageDescription | JvmBufferMemoryUsageDescription| | JVMBufferMemoryUsageName | JvmBufferMemoryUsageName| | JVMBufferMemoryUsageUnit | JvmBufferMemoryUsageUnit| | JVMBufferMemoryUsedDescription | JvmBufferMemoryUsedDescription| | JVMBufferMemoryUsedName | JvmBufferMemoryUsedName| | JVMBufferMemoryUsedUnit | JvmBufferMemoryUsedUnit| | JVMCPUCountDescription | JvmCPUCountDescription| | JVMCPUCountName | JvmCPUCountName| | JVMCPUCountUnit | JvmCPUCountUnit| | JVMCPURecentUtilizationDescription | JvmCPURecentUtilizationDescription| | JVMCPURecentUtilizationName | JvmCPURecentUtilizationName| | JVMCPURecentUtilizationUnit | JvmCPURecentUtilizationUnit| | JVMCPUTimeDescription | JvmCPUTimeDescription| | JVMCPUTimeName | JvmCPUTimeName| | JVMCPUTimeUnit | JvmCPUTimeUnit| | JVMClassCountDescription | JvmClassCountDescription| | JVMClassCountName | JvmClassCountName| | JVMClassCountUnit | JvmClassCountUnit| | JVMClassLoadedDescription | JvmClassLoadedDescription| | JVMClassLoadedName | JvmClassLoadedName| | JVMClassLoadedUnit | JvmClassLoadedUnit| | JVMClassUnloadedDescription | JvmClassUnloadedDescription| | JVMClassUnloadedName | JvmClassUnloadedName| | JVMClassUnloadedUnit | JvmClassUnloadedUnit| | JVMGCDurationDescription | JvmGcDurationDescription| | JVMGCDurationName | JvmGcDurationName| | JVMGCDurationUnit | JvmGcDurationUnit| | JVMMemoryCommittedDescription | JvmMemoryCommittedDescription| | JVMMemoryCommittedName | JvmMemoryCommittedName| | JVMMemoryCommittedUnit | JvmMemoryCommittedUnit| | JVMMemoryInitDescription | JvmMemoryInitDescription| | JVMMemoryInitName | JvmMemoryInitName| | JVMMemoryInitUnit | JvmMemoryInitUnit| | JVMMemoryLimitDescription | JvmMemoryLimitDescription| | JVMMemoryLimitName | JvmMemoryLimitName| | JVMMemoryLimitUnit | JvmMemoryLimitUnit| | JVMMemoryUsedAfterLastGCDescription | JvmMemoryUsedAfterLastGcDescription| | JVMMemoryUsedAfterLastGCName | JvmMemoryUsedAfterLastGcName| | JVMMemoryUsedAfterLastGCUnit | JvmMemoryUsedAfterLastGcUnit| | JVMMemoryUsedDescription | JvmMemoryUsedDescription| | JVMMemoryUsedName | JvmMemoryUsedName| | JVMMemoryUsedUnit | JvmMemoryUsedUnit| | JVMSystemCPULoad1mDescription | JvmSystemCPULoad1mDescription| | JVMSystemCPULoad1mName | JvmSystemCPULoad1mName| | JVMSystemCPULoad1mUnit | JvmSystemCPULoad1mUnit| | JVMSystemCPUUtilizationDescription | JvmSystemCPUUtilizationDescription| | JVMSystemCPUUtilizationName | JvmSystemCPUUtilizationName| | JVMSystemCPUUtilizationUnit | JvmSystemCPUUtilizationUnit| | JVMThreadCountDescription | JvmThreadCountDescription| | JVMThreadCountName | JvmThreadCountName| | JVMThreadCountUnit | JvmThreadCountUnit| | V8JSGCDurationDescription | V8jsGcDurationDescription| | V8JSGCDurationName | V8jsGcDurationName| | V8JSGCDurationUnit | V8jsGcDurationUnit| | V8JSHeapSpaceAvailableSizeDescription | V8jsHeapSpaceAvailableSizeDescription| | V8JSHeapSpaceAvailableSizeName | V8jsHeapSpaceAvailableSizeName| | V8JSHeapSpaceAvailableSizeUnit | V8jsHeapSpaceAvailableSizeUnit| | V8JSHeapSpacePhysicalSizeDescription | V8jsHeapSpacePhysicalSizeDescription| | V8JSHeapSpacePhysicalSizeName | V8jsHeapSpacePhysicalSizeName| | V8JSHeapSpacePhysicalSizeUnit | V8jsHeapSpacePhysicalSizeUnit| | V8JSMemoryHeapLimitDescription | V8jsMemoryHeapLimitDescription| | V8JSMemoryHeapLimitName | V8jsMemoryHeapLimitName| | V8JSMemoryHeapLimitUnit | V8jsMemoryHeapLimitUnit| | V8JSMemoryHeapUsedDescription | V8jsMemoryHeapUsedDescription| | V8JSMemoryHeapUsedName | V8jsMemoryHeapUsedName| | V8JSMemoryHeapUsedUnit | V8jsMemoryHeapUsedUnit| An audit of these changes leads to the conclusion that they are appropriate fixes to things that were mis-named. ### Doc changes Also mentioned [here](https://github.com/open-telemetry/opentelemetry-go/pull/5898#issuecomment-2622976636), there documentation changes that are included. Mostly this is unavoidable based on the new format of the semconv models, and effort has spent ensuring nothing substantive is lost. See the reverted commit https://github.com/open-telemetry/opentelemetry-go/pull/5898/commits/66523cb7f3fb2dd6566f4ccfe44b52d0bb2c0c0f for the details of how the `semconv/v1.27.0` changes. ## Next Steps This PR has been paired down to migrate tooling. The next steps are to generate `semconv/v1.28.0` with desired changes (i.e. maybe we don't generate `ASPCoreNet` attrs(?)). From there the missing semconv packages will be generated. - https://github.com/open-telemetry/opentelemetry-go/issues/6226 - https://github.com/open-telemetry/opentelemetry-go/issues/6227
2025-01-31 06:51:07 -08:00
--templates=/home/weaver/templates \
--param tag=$(TAG) \
go \
/home/weaver/target
$(SEMCONVKIT) -semconv "$(SEMCONVPKG)" -tag "$(TAG)"
.PHONY: gorelease
gorelease: $(OTEL_GO_MOD_DIRS:%=gorelease/%)
gorelease/%: DIR=$*
gorelease/%:| $(GORELEASE)
@echo "gorelease in $(DIR):" \
&& cd $(DIR) \
&& $(GORELEASE) \
|| echo ""
.PHONY: verify-mods
verify-mods: $(MULTIMOD)
$(MULTIMOD) verify
.PHONY: prerelease
prerelease: verify-mods
@[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
$(MULTIMOD) prerelease -m ${MODSET}
COMMIT ?= "HEAD"
.PHONY: add-tags
add-tags: verify-mods
@[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
$(MULTIMOD) tag -m ${MODSET} -c ${COMMIT}
MARKDOWNIMAGE := $(shell awk '$$4=="markdown" {print $$2}' $(DEPENDENCIES_DOCKERFILE))
.PHONY: lint-markdown
lint-markdown:
docker run --rm -u $(DOCKER_USER) -v "$(CURDIR):$(WORKDIR)" $(MARKDOWNIMAGE) -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md
2024-03-26 20:13:54 +01:00
.PHONY: verify-readmes
verify-readmes: $(VERIFYREADMES)
$(VERIFYREADMES)