Skip to content

Commit

Permalink
Merge branch 'main' into dotnet-runtime-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova authored Aug 23, 2024
2 parents 6b7a0ed + 94b186c commit 47ed007
Show file tree
Hide file tree
Showing 123 changed files with 3,133 additions and 679 deletions.
4 changes: 4 additions & 0 deletions .chloggen/1290.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: enhancement
component: db
note: Change description of `db.client.connection.pending_requests` from cumulative to current value
issues: [ 1290 ]
4 changes: 4 additions & 0 deletions .chloggen/1302.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: enhancement
component: docs
note: Add note on tooling limitations for attribute names and enforce name format.
issues: [1124]
22 changes: 22 additions & 0 deletions .chloggen/add_container_cpu_usage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: container

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add container.cpu.usage metric

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1128]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
22 changes: 22 additions & 0 deletions .chloggen/add_k8s_cpu_metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: k8s

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add `k8s.pod.cpu.time`, `k8s.pod.cpu.usage`, `k8s.node.cpu.time`, `k8s.node.cpu.usage` metrics

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1320]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
22 changes: 22 additions & 0 deletions .chloggen/add_k8s_volume_type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: k8s

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adds `k8s.volume.name` and `k8s.volume.type` attributes to the registry

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1164]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
22 changes: 22 additions & 0 deletions .chloggen/fix_docker_link.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: container

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fixes broken link

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1332]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
17 changes: 17 additions & 0 deletions .chloggen/nodejs-runtime-utilization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: nodejs

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adding `nodejs.eventloop.time` metric to Node.js runtime metrics.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1259]
22 changes: 22 additions & 0 deletions .chloggen/remove_body_field_ref.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: deprecation

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: event

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove support for the event `fields` supporting referencing / inheriting fields from global attributes.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1341]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ body:
- area:gen-ai
- area:go
- area:graphql
- area:hardware
- area:heroku
- area:host
- area:http
Expand All @@ -59,6 +60,7 @@ body:
- area:log
- area:messaging
- area:network
- area:nodejs
- area:oci
- area:opentracing
- area:os
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ body:
- area:gen-ai
- area:go
- area:graphql
- area:hardware
- area:heroku
- area:host
- area:http
Expand All @@ -51,6 +52,7 @@ body:
- area:log
- area:messaging
- area:network
- area:nodejs
- area:oci
- area:opentracing
- area:os
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ body:
- area:gen-ai
- area:go
- area:graphql
- area:hardware
- area:heroku
- area:host
- area:http
Expand All @@ -60,6 +61,7 @@ body:
- area:log
- area:messaging
- area:network
- area:nodejs
- area:oci
- area:opentracing
- area:os
Expand Down
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "github-actions"
directory: ".github"
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "internal/tools"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
22 changes: 15 additions & 7 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ jobs:
make attribute-registry-generation
git diff --exit-code './docs/attributes-registry/*.md' || (echo 'Attribute registry markdown is out of date, please run "make attribute-registry-generation" and commit the changes in this PR.' && exit 1)
semantic-conventions-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: verify semantic convention compatibility with latest released version
run: make compatibility-check

schemas-check:
runs-on: ubuntu-latest
steps:
Expand All @@ -115,3 +108,18 @@ jobs:
- uses: actions/checkout@v1
- name: verify semantic conventions yaml definitions
run: make check-policies

polices-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: verify semantic conventions yaml definitions
run: make test-policies

# TODO: Remove this once policies-check is the only enforcement on github.
semantic-conventions-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: verify semantic convention compatibility with latest released version
run: make compatibility-check
80 changes: 40 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ CHLOGGEN_BINARY=bin/chloggen
CHLOGGEN = $(TOOLS_DIR)/$(CHLOGGEN_BINARY)
CHLOGGEN_CONFIG := .chloggen/config.yaml

# see https://github.com/open-telemetry/build-tools/releases for semconvgen updates
# Keep links in model/README.md and .vscode/settings.json in sync!
SEMCONVGEN_VERSION=0.25.0
WEAVER_VERSION=0.7.0

# From where to resolve the containers (e.g. "otel/weaver").
CONTAINER_REPOSITORY=docker.io

Expand All @@ -32,8 +27,12 @@ WEAVER_CONTAINER_REPOSITORY=$(CONTAINER_REPOSITORY)
SEMCONVGEN_CONTAINER_REPOSITORY=$(CONTAINER_REPOSITORY)

# Fully qualified references to containers used in this Makefile.
WEAVER_CONTAINER=$(WEAVER_CONTAINER_REPOSITORY)/otel/weaver:$(WEAVER_VERSION)
SEMCONVGEN_CONTAINER=$(SEMCONVGEN_CONTAINER_REPOSITORY)/otel/semconvgen:$(SEMCONVGEN_VERSION)
# These are parsed from dependencies.Dockerfile so dependabot will autoupdate
# the versions of docker files we use.
WEAVER_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="weaver" {print $$2}')
SEMCONVGEN_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="semconvgen" {print $$2}')
OPA_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="opa" {print $$2}')


# TODO: add `yamllint` step to `all` after making sure it works on Mac.
.PHONY: all
Expand Down Expand Up @@ -111,15 +110,6 @@ install-yamllint:
yamllint:
yamllint .

# Check semantic convention policies on YAML files
.PHONY: check-policies
check-policies:
docker run --rm -v $(PWD)/model:/source -v $(PWD)/policies:/policies -v $(PWD)/templates:/templates \
otel/weaver:${WEAVER_VERSION} registry check \
--registry=/source \
--diagnostic-format=ansi \
--policy=/policies/registry.rego

# Generate markdown tables from YAML definitions
.PHONY: table-generation
table-generation:
Expand Down Expand Up @@ -154,26 +144,6 @@ table-check:
--dry-run \
/spec


# A previous iteration of calculating "LATEST_RELEASED_SEMCONV_VERSION"
# relied on "git describe". However, that approach does not work with
# light-weight developer forks/branches that haven't synced tags. Hence the
# more complex implementation of this using "git ls-remote".
#
# The output of "git ls-remote" looks something like this:
#
# e531541025992b68177a68b87628c5dc75c4f7d9 refs/tags/v1.21.0
# cadfe53949266d33476b15ca52c92f682600a29c refs/tags/v1.22.0
# ...
#
# .. which is why some additional processing is required to extract the
# latest version number and strip off the "v" prefix.
LATEST_RELEASED_SEMCONV_VERSION := $(shell git ls-remote --tags https://github.com/open-telemetry/semantic-conventions.git | cut -f 2 | sort --reverse | head -n 1 | tr '/' ' ' | cut -d ' ' -f 3 | $(SED) 's/v//g')
.PHONY: compatibility-check
compatibility-check:
docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec --pull=always \
$(SEMCONVGEN_CONTAINER) -f /source compatibility --previous-version $(LATEST_RELEASED_SEMCONV_VERSION)

.PHONY: schema-check
schema-check:
$(TOOLS_DIR)/schema_check.sh
Expand Down Expand Up @@ -229,11 +199,41 @@ chlog-update: $(CHLOGGEN)
generate-gh-issue-templates:
$(TOOLS_DIR)/scripts/update-issue-template-areas.sh

# A previous iteration of calculating "LATEST_RELEASED_SEMCONV_VERSION"
# relied on "git describe". However, that approach does not work with
# light-weight developer forks/branches that haven't synced tags. Hence the
# more complex implementation of this using "git ls-remote".
#
# The output of "git ls-remote" looks something like this:
#
# e531541025992b68177a68b87628c5dc75c4f7d9 refs/tags/v1.21.0
# cadfe53949266d33476b15ca52c92f682600a29c refs/tags/v1.22.0
# ...
#
# .. which is why some additional processing is required to extract the
# latest version number and strip off the "v" prefix.
LATEST_RELEASED_SEMCONV_VERSION := $(shell git ls-remote --tags https://github.com/open-telemetry/semantic-conventions.git | cut -f 2 | sort --reverse | head -n 1 | tr '/' ' ' | cut -d ' ' -f 3 | $(SED) 's/v//g')
.PHONY: check-policies
check-policies:
docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec -v $(PWD)/policies:/policies \
otel/weaver:${WEAVER_VERSION} registry check \
${WEAVER_CONTAINER} registry check \
--registry=/source \
--policy=/policies/registry.rego \
--policy=/policies/attribute_name_collisions.rego \
--policy=/policies/yaml_schema.rego
--baseline-registry=https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v$(LATEST_RELEASED_SEMCONV_VERSION).zip[model] \
--policy=/policies

# Test rego policies
.PHONY: test-policies
test-policies:
docker run --rm -v $(PWD)/policies:/policies -v $(PWD)/policies_test:/policies_test \
${OPA_CONTAINER} test \
--var-values \
--explain fails \
/policies \
/policies_test

# TODO: This is now duplicative with weaver policy checks. We can remove
# once github action requirements are updated.
.PHONY: compatibility-check
compatibility-check:
docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec --pull=always \
$(SEMCONVGEN_CONTAINER) -f /source compatibility --previous-version $(LATEST_RELEASED_SEMCONV_VERSION)
13 changes: 13 additions & 0 deletions dependencies.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# DO NOT BUILD
# This file is just for tracking dependencies of the semantic convention build.
# Dependabot can keep this file up to date with latest containers.

# Weaver is used to generate markdown docs, and enforce policies on the model.
FROM otel/weaver:0.8.0 AS weaver

# OPA is used to test policies enforced by weaver.
FROM openpolicyagent/opa:0.67.1 AS opa

# Semconv gen is used for backwards compatibility checks.
# TODO(jsuereth): Remove this when no longer used.
FROM otel/semconvgen:0.25.0 AS semconvgen
2 changes: 2 additions & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Currently, the following namespaces exist:
- [Gen AI](gen-ai.md)
- [Go](go.md)
- [GraphQL](graphql.md)
- [Hardware](hardware.md)
- [Heroku](heroku.md)
- [Host](host.md)
- [HTTP](http.md)
Expand All @@ -72,6 +73,7 @@ Currently, the following namespaces exist:
- [Log](log.md)
- [Messaging](messaging.md)
- [Network](network.md)
- [NodeJS](nodejs.md)
- [OCI](oci.md)
- [OpenTracing](opentracing.md)
- [OS](os.md)
Expand Down
Loading

0 comments on commit 47ed007

Please sign in to comment.