Compare commits

..
Author SHA1 Message Date
Roman Perekhod cfaf2d0ec7 add the dowload step 2026-04-10 10:16:16 +02:00
90 changed files with 553 additions and 20525 deletions

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
# The test runner source for UI tests
WEB_COMMITID=6165b4e47a47e3a216107e96f90825190f10632e
WEB_COMMITID=b707d0483800b22522df8734b12e02eaec108a37
WEB_BRANCH=stable-12.3
+47
View File
@@ -572,6 +572,14 @@ def main(ctx):
pipelines,
)
# always append notification step
pipelines.append(
pipelineDependsOn(
notify(ctx),
pipelines,
),
)
pipelineSanityChecks(ctx, pipelines)
return pipelines
@@ -2664,6 +2672,45 @@ def makeGoGenerate(module):
},
]
def notify(ctx):
status = ["failure"]
if ctx.build.event in ["cron", "tag"]:
status.append("success")
return {
"kind": "pipeline",
"type": "docker",
"name": "chat-notifications",
"clone": {
"disable": True,
},
"steps": [
{
"name": "notify-matrix",
"image": OC_CI_ALPINE,
"environment": {
"MATRIX_TOKEN": {
"from_secret": "matrix_token",
},
},
"commands": [
"wget https://raw.githubusercontent.com/%s/%s/tests/config/drone/notification.sh" % (ctx.repo.slug, ctx.build.commit),
"bash notification.sh",
],
},
],
"depends_on": [],
"trigger": {
"ref": [
"refs/heads/master",
"refs/heads/stable-*",
"refs/heads/release*",
"refs/tags/**",
],
"status": status,
},
}
def ocisServer(storage = "ocis", volumes = [], depends_on = [], deploy_type = "", extra_server_environment = {}, with_wrapper = False, tika_enabled = False, debug = True, external_idp = False):
user = "0:0"
container_name = OCIS_SERVER_NAME
-1
View File
@@ -1,5 +1,4 @@
services/settings/ @lukashirt
services/web/ @lukashirt
# TODO: [DRONE-REMOVAL] remove .drone.star CODEOWNERS entry
.drone.star @kobergj @phil-davis @individual-it
assets/End-User-License-Agreement-for-ownCloud-Infinite-Scale.pdf @kobergj @hodyroff
-1
View File
@@ -8,7 +8,6 @@
* [ ] DEV/QA: Check new strings and align with clients
* [ ] DEV/DOCS: Create list of pending docs tasks
* [ ] DEV: Create branch `release-x.x.x-rc.x` -> CODEFREEZE
<!-- TODO: [DRONE-REMOVAL] remove .drone.star release step -->
* [ ] DEV: specify if it is a production release in [.drone.star](https://github.com/owncloud/ocis/blob/b4cf38fa1ba180c58519026dfe762b7c45695466/.drone.star#L8) (if needed)
* [ ] DEV: bump ocis version in necessary files
* [ ] DEV: `changelog/CHANGELOG.tmpl`
+76 -82
View File
@@ -5,12 +5,54 @@ on:
workflow_dispatch:
jobs:
build-and-test:
name: build-and-test
coding-standard:
name: coding-standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- name: Install PHP 8.4
run: |
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update -qq
sudo apt-get install -y php8.4 php8.4-curl php8.4-xml php8.4-mbstring php8.4-zip php8.4-ldap php8.4-gd
sudo update-alternatives --set php /usr/bin/php8.4
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- name: PHP code style
run: |
make vendor-bin-codestyle
make vendor-bin-codesniffer
make test-php-style
- name: Check env var annotations
run: make check-env-var-annotations
check-gherkin-standard:
name: check-gherkin-standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Lint feature files
run: |
npm install -g @gherlint/gherlint@1.1.0
make test-gherkin-lint
check-suites-in-expected-failures:
name: check-suites-in-expected-failures
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check suites
run: bash tests/acceptance/check-deleted-suites-in-expected-failure.sh
build-and-test:
name: build-and-test
needs: [coding-standard, check-gherkin-standard, check-suites-in-expected-failures]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
@@ -22,80 +64,33 @@ jobs:
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
- name: Pre-checks and generate
- name: Generate nodejs
run: make ci-node-generate
- name: Download go dependencies
run: |
# Phase 1 — I/O + light CPU, no contention between tasks.
# PHP install (~40s) is moved inside the php-style subshell so it overlaps
# with govulncheck (network I/O), node-gen, and go-gen instead of blocking
# the entire job sequentially.
# wa (I/O wait) will spike during apt-get/npm/pnpm downloads.
# Expected avg load: ~50-60 % CPU on 2 vCPU.
vmstat 2 > /tmp/vmstat-phase1.log & MONITOR_PID=$!
go mod download
go mod download -C tests/ociswrapper
env:
GOTOOLCHAIN: auto
#TODO: use github action to setup/install/cache php
(sudo add-apt-repository -y ppa:ondrej/php \
&& sudo apt-get update -qq \
&& sudo apt-get install -y php8.4 php8.4-curl php8.4-xml php8.4-mbstring php8.4-zip php8.4-ldap php8.4-gd \
&& sudo update-alternatives --set php /usr/bin/php8.4 \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& make vendor-bin-codestyle && make vendor-bin-codesniffer && make test-php-style && make check-env-var-annotations) > /tmp/php-style.log 2>&1 & PIDS=($!)
(npm install -g @gherlint/gherlint@1.1.0 && make test-gherkin-lint) > /tmp/gherkin.log 2>&1 & PIDS+=($!)
bash tests/acceptance/check-deleted-suites-in-expected-failure.sh > /tmp/suites.log 2>&1 & PIDS+=($!)
make govulncheck > /tmp/govulncheck.log 2>&1 & PIDS+=($!)
make ci-node-generate > /tmp/node-gen.log 2>&1 & PIDS+=($!)
make ci-go-generate > /tmp/go-gen.log 2>&1 & PIDS+=($!)
- name: Generate go
run: make ci-go-generate
FAILED=0
for PID in "${PIDS[@]}"; do wait "$PID" || FAILED=1; done
kill $MONITOR_PID 2>/dev/null; wait $MONITOR_PID 2>/dev/null || true
- name: Vulnerability scan
run: make govulncheck
# How to read the load line:
# busy — % of time CPUs were doing work (100% = fully saturated)
# runq — processes waiting for a CPU turn; runq >> nCPU means tasks
# compete and each runs slower (runq 10 on 2 vCPU = ~5× slower)
# wa — % waiting on disk/network; wa > 20% = I/O bound, not CPU bound
# → high wa: add more parallel tasks; high runq: reduce them
awk '/^[ ]*[0-9]/ { busy=100-$15; sum_b+=busy; if(busy>pk_b)pk_b=busy;
sum_r+=$1; if($1>pk_r) pk_r=$1; sum_wa+=$16; n++ }
END { printf "=== phase 1 load (2 vCPU): avg busy %d%% peak %d%% | avg runq %.0f peak %d | avg wa %d%%\n",
sum_b/n, pk_b, sum_r/n, pk_r, sum_wa/n }' /tmp/vmstat-phase1.log
- name: Lint
run: make ci-golangci-lint
echo "=== php-style ===" && cat /tmp/php-style.log
echo "=== gherkin ===" && cat /tmp/gherkin.log
echo "=== suites ===" && cat /tmp/suites.log
echo "=== govulncheck ===" && cat /tmp/govulncheck.log
echo "=== ci-node-generate ===" && cat /tmp/node-gen.log
echo "=== ci-go-generate ===" && cat /tmp/go-gen.log
- name: Build ocis
run: make -C ocis build
exit $FAILED
- name: Build debug binary
run: make -C ocis build-debug
- name: Build, lint and test
run: |
# Phase 2 — all three are CPU-bound Go compilation on 2 vCPU.
# They compete for CPU (expect id < 10, load ~95 %) but share the
# Go build cache within this runner, so make test reuses artifacts
# from the ocis build. Critical path = ocis build (~300 s).
vmstat 2 > /tmp/vmstat-phase2.log & MONITOR_PID=$!
make ci-golangci-lint > /tmp/golangci-lint.log 2>&1 & PIDS=($!)
make -C ocis build > /tmp/ocis-build.log 2>&1 & PIDS+=($!)
make test > /tmp/unit-tests.log 2>&1 & PIDS+=($!)
FAILED=0
for PID in "${PIDS[@]}"; do wait "$PID" || FAILED=1; done
kill $MONITOR_PID 2>/dev/null; wait $MONITOR_PID 2>/dev/null || true
# Signal: busy=saturated runq>>2=tasks competing(slows each) wa>20%=I/O bound
awk '/^[ ]*[0-9]/ { busy=100-$15; sum_b+=busy; if(busy>pk_b)pk_b=busy;
sum_r+=$1; if($1>pk_r) pk_r=$1; sum_wa+=$16; n++ }
END { printf "=== phase 2 load (2 vCPU): avg busy %d%% peak %d%% | avg runq %.0f peak %d | avg wa %d%%\n",
sum_b/n, pk_b, sum_r/n, pk_r, sum_wa/n }' /tmp/vmstat-phase2.log
echo "=== golangci-lint ==="&& cat /tmp/golangci-lint.log
echo "=== ocis build ===" && cat /tmp/ocis-build.log
echo "=== unit tests ===" && cat /tmp/unit-tests.log
exit $FAILED
- name: Unit tests
run: make test
local-api-tests:
name: ${{ matrix.suite }}
@@ -149,7 +144,7 @@ jobs:
- apiCollaboration
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
@@ -163,7 +158,7 @@ jobs:
- name: Cache libcurl 8.12.0
id: cache-libcurl
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: /opt/libcurl
key: libcurl-8.12.0-${{ runner.os }}
@@ -229,7 +224,7 @@ jobs:
- cliCommands,apiServiceAvailability # grouped like drone; needs ClamAV + email
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
@@ -273,7 +268,7 @@ jobs:
- "coreApiWebdavMove1,coreApiWebdavPreviews,coreApiWebdavUpload,coreApiWebdavUploadTUS"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
@@ -287,7 +282,7 @@ jobs:
- name: Cache libcurl 8.12.0
id: cache-libcurl
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: /opt/libcurl
key: libcurl-8.12.0-${{ runner.os }}
@@ -368,7 +363,7 @@ jobs:
keycloak: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
@@ -385,10 +380,9 @@ jobs:
CHROMEDRIVER_SKIP_DOWNLOAD: "true"
- name: Cache Playwright Chromium
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/ms-playwright
# TODO: [DRONE-REMOVAL] replace .drone.env hash with a stable cache key
key: playwright-chromium-${{ hashFiles('.drone.env') }}
# --- Tika (search suite only) ---
@@ -461,7 +455,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
@@ -474,7 +468,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
@@ -487,7 +481,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
@@ -500,7 +494,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
-2
View File
@@ -12,8 +12,6 @@ jobs:
uses: owncloud/reusable-workflows/.github/workflows/translation-sync.yml@main
with:
mode: make
reviewers: kobergj,mmattel # individual users
# team_reviewers: owncloud/ocis-team # and/or a GitHub team slug if exists
sub_path: .
secrets:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
+1 -1
View File
@@ -45,7 +45,7 @@ vendor-php
# QA activity reports
tests/qa-activity-report/reports/
# TODO: [DRONE-REMOVAL] drone CI is in .drone.star, do not let someone accidentally commit a local .drone.yml
# drone CI is in .drone.star, do not let someone accidentally commit a local .drone.yml
.drone.yml
**/l10n/template.pot
+1 -2
View File
@@ -20,7 +20,7 @@ L10N_MODULES := \
services/userlog \
services/settings
# TODO: [DRONE-REMOVAL] if you add a module here please also add it to the .drone.star file
# if you add a module here please also add it to the .drone.star file
OCIS_MODULES = \
services/activitylog \
services/antivirus \
@@ -367,7 +367,6 @@ l10n-write:
.PHONY: ci-format
ci-format: $(BUILDIFIER)
# TODO: [DRONE-REMOVAL] remove ci-format target when .drone.star is removed
$(BUILDIFIER) --mode=fix .drone.star
.PHONY: test-php-style
@@ -13,7 +13,6 @@ oCIS uses [DRONE](https://www.drone.io/) as CI system. You can find the pipeline
## Concepts
<!-- TODO: [DRONE-REMOVAL] rewrite this section when Drone CI is removed -->
The pipeline is defined in [Starlark](https://github.com/bazelbuild/starlark) and transformed to YAML upon pipeline run. This enables us to do a highly dynamic and non repeating pipeline configuration. We enforce Starlark format guidelines with Bazel Buildifier. You can format the .drone.star file by running `make ci-format`.
Upon running the pipeline, your branch gets merged to the master branch. This ensures that we always test your changeset if as it was applied to the master of oCIS. Please note that this does not apply to the pipeline definition (`.drone.star`).
@@ -40,7 +39,6 @@ You may add flags to your commit message or PR title in order to speed up pipeli
- My pipeline fails because some CI related files or commands are missing.
<!-- TODO: [DRONE-REMOVAL] update this KB entry -->
Please make sure to rebase your branch onto the latest master of oCIS. It could be that the pipeline definition (`.drone.star`) was changed on the master branch. This is the only file, that will not be auto merged to master upon pipeline run. So things could be out of sync.
- How can I see the YAML drone pipeline definition?
@@ -108,7 +108,6 @@ https://owncloud.dev/ocis/releasing_guide/
* [ ] Create orphan branch: `git checkout --orphan docs-stable-7.2`
* [ ] Initial commit: `git commit --allow-empty -m "initial commit"`
* [ ] Push it: `git push`
<!-- TODO: [DRONE-REMOVAL] remove .drone.star steps below -->
* [ ] Adjust the `.drone.star` file to write to `docs-stable-7.2`
* [ ] Find target_branch value in the docs section and change it to `docs-stable-7.2`
* [ ] Example: https://github.com/owncloud/ocis/blame/56f7645f0b11c9112e15ce46f6effd2fea01d6be/.drone.star#L2249
@@ -36,7 +36,7 @@ Use this checklist with copy/paste in your PR - right from the beginning. It ren
- Add the service config to `ocis-pkg/config/defaultconfig.go`
- [ ] If the service is using service accounts, add it to `ocis/pkg/init/init.go`
- [ ] Check that the service properly responds to `ocis <service-name> health` and has `/healthz` and `/readyz` endpoints
- [ ] Add the service to `.drone.star` to enable CI. <!-- TODO: [DRONE-REMOVAL] update this checklist item -->
- [ ] Add the service to `.drone.star` to enable CI.
- [ ] Inform doc team in an *early stage* to review the readme AND the environment variables created.
- The description must reflect the behaviour AND usually has a positive code quality impact.
- [ ] Create proper description strings for envvars - see other services for examples, especially when it comes to multiple values. This must include:
+1 -1
View File
@@ -32,6 +32,6 @@ and take note of its release tag name.
2. Change into web package folder via `cd web`
3. Inside `web/`, update the `Makefile` so that the WEB_ASSETS_VERSION variable references the currently released version of https://github.com/owncloud/web
4. Move to the changelog (`cd ../changelog/`) and add a changelog file to the `unreleased/` folder (You can copy an old web release changelog item as a template)
5. <!-- TODO: [DRONE-REMOVAL] update this step when .drone.env is removed -->Move to the repo root (`cd ..`)and update the WEB_COMMITID in the `/.drone.env` file to the commit id from the released version (unless the existing commit id is already newer)
5. Move to the repo root (`cd ..`)and update the WEB_COMMITID in the `/.drone.env` file to the commit id from the released version (unless the existing commit id is already newer)
6. **Optional:** Test the changes locally by running `cd ocis && go run cmd/ocis/main.go server`, visiting [https://localhost:9200](https://localhost:9200) and confirming everything renders correctly
7. Commit your changes, push them and [create a PR](https://github.com/owncloud/ocis/pulls)
+7 -7
View File
@@ -1,6 +1,6 @@
module github.com/owncloud/ocis/v2
go 1.25.9
go 1.25.7
require (
dario.cat/mergo v1.0.2
@@ -89,11 +89,11 @@ require (
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.65.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0
go.opentelemetry.io/contrib/zpages v0.64.0
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel v1.40.0
go.opentelemetry.io/otel/exporters/jaeger v1.17.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0
go.opentelemetry.io/otel/sdk v1.43.0
go.opentelemetry.io/otel/trace v1.43.0
go.opentelemetry.io/otel/sdk v1.40.0
go.opentelemetry.io/otel/trace v1.40.0
golang.org/x/crypto v0.49.0
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b
golang.org/x/image v0.38.0
@@ -186,8 +186,8 @@ require (
github.com/go-git/go-billy/v5 v5.8.0 // indirect
github.com/go-git/go-git/v5 v5.17.1 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.5 // indirect
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-jose/go-jose/v3 v3.0.4 // indirect
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.4.3 // indirect
@@ -334,7 +334,7 @@ require (
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.40.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
+14 -14
View File
@@ -304,10 +304,10 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-jose/go-jose/v3 v3.0.5 h1:BLLJWbC4nMZOfuPVxoZIxeYsn6Nl2r1fITaJ78UQlVQ=
github.com/go-jose/go-jose/v3 v3.0.5/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA=
github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-jose/go-jose/v3 v3.0.4 h1:Wp5HA7bLQcKnf6YYao/4kpRpVMp/yf6+pJKV8WFSaNY=
github.com/go-jose/go-jose/v3 v3.0.4/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs=
github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
@@ -975,8 +975,8 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 h1:ssfIgGN
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0/go.mod h1:GQ/474YrbE4Jx8gZ4q5I4hrhUzM6UPzyrqJYV2AqPoQ=
go.opentelemetry.io/contrib/zpages v0.64.0 h1:iMybqKVR8AHHxFX4DuEWJ9dY75+9E7+IPwUK3Ll7NxM=
go.opentelemetry.io/contrib/zpages v0.64.0/go.mod h1:DnkiyoQ7Yx/NmmKn10b6M2YBXreUqq0qhFa/kYgSZME=
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms=
go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g=
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4=
go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs=
@@ -985,14 +985,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 h1:DvJDO
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0/go.mod h1:EtekO9DEJb4/jRyN4v4Qjc2yA7AtfCBuz2FynRUWTXs=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 h1:Ckwye2FpXkYgiHX7fyVrN1uA/UYd9ounqqTuSNAv0k4=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0/go.mod h1:teIFJh5pW2y+AN7riv6IBPX2DuesS3HgP39mwOspKwU=
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=
go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw=
go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A=
go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g=
go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc=
go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8=
go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE=
go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw=
go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg=
go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw=
go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA=
go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A=
go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
@@ -1,107 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Martin <github@diemattels.at>, 2026
# bounkirdni_2025, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-04-11 03:12+0000\n"
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
"Last-Translator: bounkirdni_2025, 2026\n"
"Language-Team: Lao (https://app.transifex.com/owncloud-org/teams/6149/lo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: lo\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: pkg/service/response.go:44
msgid "description"
msgstr "ຄຳອະທິບາຍ"
#: pkg/service/response.go:43
msgid "display name"
msgstr "ຊື່ສະແດງ"
#: pkg/service/response.go:42
msgid "expiration date"
msgstr "ວັນໝົດອາຍຸ"
#: pkg/service/response.go:41
msgid "password"
msgstr "ລະຫັດຜ່ານ"
#: pkg/service/response.go:40
msgid "permission"
msgstr "ສິດການເຂົ້າເຖິງ"
#: pkg/service/response.go:45
msgid "shared-with-me"
msgstr "ແບ່ງປັນກັບຂ້ອຍ"
#: pkg/service/response.go:39
msgid "some field"
msgstr "ບາງຟິວ"
#: pkg/service/response.go:26
msgid "{resource} was downloaded via public link {token}"
msgstr "{resource} ຖືກດາວໂຫຼດຜ່ານລິ້ງສາທາລະນະ {token}"
#: pkg/service/response.go:24
msgid "{user} added {resource} to {folder}"
msgstr "{user} ໄດ້ເພີ່ມ {resource} ເຂົ້າໃນ {folder}"
#: pkg/service/response.go:36
msgid "{user} added {sharee} as member of {space}"
msgstr "{user} ໄດ້ເພີ່ມ {sharee} ເຂົ້າເປັນສະມາຊິກຂອງ {space}"
#: pkg/service/response.go:27
msgid "{user} deleted {resource} from {folder}"
msgstr "{user} ໄດ້ລຶບ {resource} ອອກຈາກ {folder}"
#: pkg/service/response.go:28
msgid "{user} moved {resource} to {folder}"
msgstr "{user} ໄດ້ຍ້າຍ {resource} ໄປທີ່ {folder}"
#: pkg/service/response.go:35
msgid "{user} removed link to {resource}"
msgstr "{user} ໄດ້ລຶບລິ້ງໄປຫາ {resource}"
#: pkg/service/response.go:32
msgid "{user} removed {sharee} from {resource}"
msgstr "{user} ໄດ້ຍ້າຍ {sharee} ອອກຈາກ {resource}"
#: pkg/service/response.go:37
msgid "{user} removed {sharee} from {space}"
msgstr "{user} ໄດ້ຍ້າຍ {sharee} ອອກຈາກ {space}"
#: pkg/service/response.go:29
msgid "{user} renamed {oldResource} to {resource}"
msgstr "{user} ໄດ້ປ່ຽນຊື່ {oldResource} ເປັນ {resource}"
#: pkg/service/response.go:33
msgid "{user} shared {resource} via link"
msgstr "{user} ໄດ້ແຊຣ໌ {resource} ຜ່ານລິ້ງ"
#: pkg/service/response.go:30
msgid "{user} shared {resource} with {sharee}"
msgstr "{user} ໄດ້ແຊຣ໌ {resource} ກັບ {sharee}"
#: pkg/service/response.go:34
msgid "{user} updated {field} for a link {token} on {resource}"
msgstr "{user} ໄດ້ອັບເດດ {field} ສຳລັບລິ້ງ {token} ໃນ {resource}"
#: pkg/service/response.go:31
msgid "{user} updated {field} for the {resource}"
msgstr "{user} ໄດ້ອັບເດດ {field} ສຳລັບ {resource}"
#: pkg/service/response.go:25
msgid "{user} updated {resource} in {folder}"
msgstr "{user} ໄດ້ອັບເດດ {resource} ໃນ {folder}"
@@ -1,204 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# bounkirdni_2025, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-04-11 03:12+0000\n"
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
"Last-Translator: bounkirdni_2025, 2026\n"
"Language-Team: Lao (https://app.transifex.com/owncloud-org/teams/6149/lo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: lo\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. EditorLite
#. UnifiedRole EditorLite, Role DisplayName (resolves directly)
#. FileEditor
#. UnifiedRole FileEditor, Role DisplayName (resolves directly)
#. Editor without Versions
#. UnifiedRole SpaceEditorWithoutVersions, Role DisplayName (resolves
#. directly)
#: pkg/unifiedrole/roles.go:138 pkg/unifiedrole/roles.go:172
#: pkg/unifiedrole/roles.go:206
msgid "Can edit"
msgstr "ສາມາດແກ້ໄຂໄດ້"
#. FileEditor + ListGrants
#. UnifiedRole FileEditorListGrants, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:180
msgid "Can edit and show invitees"
msgstr "ສາມາດແກ້ໄຂ ແລະ ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນ"
#. Editor
#. UnifiedRole Editor, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:146
msgid "Can edit with trashbin"
msgstr "ສາມາດແກ້ໄຂ ແລະ ນຳໃຊ້ຖັງຂີ້ເຫຍື້ອ"
#. Editor + ListGrants
#. UnifiedRole EditorListGrants, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:154
msgid "Can edit with trashbin and show invitees"
msgstr "ສາມາດແກ້ໄຂ, ນຳໃຊ້ຖັງຂີ້ເຫຍື້ອ ແລະ ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນ"
#. Editor + ListGrants + Version
#. UnifiedRole EditorListGrantsWithVersions, Role DisplayName (resolves
#. directly)
#: pkg/unifiedrole/roles.go:162
msgid "Can edit with trashbin, versions and show invitees"
msgstr "ສາມາດແກ້ໄຂ, ນຳໃຊ້ຖັງຂີ້ເຫຍື້ອ, ເວີຊັນ ແລະ ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນ"
#. Editor without Trashbin
#. UnifiedRole SpaceEditorWithoutTrashbin, Role DisplayName (resolves
#. directly)
#: pkg/unifiedrole/roles.go:214
msgid "Can edit with versions"
msgstr "ສາມາດແກ້ໄຂ ແລະ ນຳໃຊ້ເວີຊັນ"
#. FileEditor + ListGrants + Versions
#. UnifiedRole FileEditorListGrantsWithVersions, Role DisplayName (resolves
#. directly)
#: pkg/unifiedrole/roles.go:188
msgid "Can edit with versions and show invitees"
msgstr "ສາມາດແກ້ໄຂ, ນຳໃຊ້ເວີຊັນ ແລະ ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນ"
#. Editor
#. UnifiedRole SpaceEditor, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:222
msgid "Can edit with versions and trashbin"
msgstr "ສາມາດແກ້ໄຂ, ນຳໃຊ້ເວີຊັນ ແລະ ຖັງຂີ້ເຫຍື້ອ"
#. Manager
#. UnifiedRole Manager, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:230
msgid "Can manage"
msgstr "ສາມາດຈັດການໄດ້"
#. Viewer
#. UnifiedRole Viewer, Role DisplayName (resolves directly)
#. Viewer
#. UnifiedRole SpaceViewer, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:112 pkg/unifiedrole/roles.go:198
msgid "Can view"
msgstr "ສາມາດເບິ່ງໄດ້"
#. SecureViewer
#. UnifiedRole SecureViewer, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:104
msgid "Can view (secure)"
msgstr "ສາມາດເບິ່ງໄດ້ (ແບບປອດໄພ)"
#. Viewer + ListGrants
#. UnifiedRole ViewerListGrants, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:120
msgid "Can view and show invitees"
msgstr "ສາມາດເບິ່ງ ແລະ ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນ"
#. Denial
#. UnifiedRole FullDenial, Role DisplayName (resolves directly)
#: pkg/unifiedrole/roles.go:130
msgid "Cannot access"
msgstr "ບໍ່ສາມາດເຂົ້າເຖິງໄດ້"
#. UnifiedRole FullDenial, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:132
msgid "Deny all access."
msgstr "ປະຕິເສດການເຂົ້າເຖິງທັງໝົດ."
#. default description for new spaces
#: pkg/service/v0/spacetemplates.go:32
msgid "Here you can add a description for this Space."
msgstr "ທ່ານສາມາດເພີ່ມຄຳອະທິບາຍສຳລັບພື້ນທີ່ (Space) ນີ້ຢູ່ທີ່ນີ້."
#. UnifiedRole Viewer, Role Description (resolves directly)
#. UnifiedRole SpaceViewer, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:114 pkg/unifiedrole/roles.go:200
msgid "View and download."
msgstr "ເບິ່ງ ແລະ ດາວໂຫຼດ."
#. UnifiedRole SecureViewer, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:106
msgid "View only documents, images and PDFs. Watermarks will be applied."
msgstr "ເບິ່ງໄດ້ສະເພາະເອກະສານ, ຮູບພາບ ແລະ PDF. ຈະມີການນຳໃຊ້ລາຍນ້ຳ."
#. UnifiedRole ViewerListGrants, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:122
msgid "View, download and show all invited people."
msgstr "ເບິ່ງ, ດາວໂຫຼດ ແລະ ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນທັງໝົດ."
#. UnifiedRole FileEditor, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:174
msgid "View, download, upload and edit."
msgstr "ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ ແລະ ແກ້ໄຂ."
#. UnifiedRole EditorLite, Role Description (resolves directly)
#. UnifiedRole SpaceEditorWithoutVersions, Role Description (resolves
#. directly)
#: pkg/unifiedrole/roles.go:140 pkg/unifiedrole/roles.go:208
msgid "View, download, upload, edit and add."
msgstr "ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ ແລະ ເພີ່ມ."
#. UnifiedRole FileEditorListGrants, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:182
msgid "View, download, upload, edit and show all invited people."
msgstr "ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ ແລະ ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນທັງໝົດ."
#. UnifiedRole Editor, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:148
msgid "View, download, upload, edit, add and delete."
msgstr "ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ, ເພີ່ມ ແລະ ລຶບ."
#. UnifiedRole SpaceEditorWithoutTrashbin, Role Description (resolves
#. directly)
#: pkg/unifiedrole/roles.go:216
msgid "View, download, upload, edit, add and show all versions."
msgstr "ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ, ເພີ່ມ ແລະ ສະແດງເວີຊັນທັງໝົດ."
#. UnifiedRole EditorListGrants Editor, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:156
msgid "View, download, upload, edit, add, delete and show all invited people."
msgstr ""
"ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ, ເພີ່ມ, ລຶບ ແລະ ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນທັງໝົດ."
#. UnifiedRole SpaceEditor, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:224
msgid "View, download, upload, edit, add, show all versions and delete."
msgstr "ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ, ເພີ່ມ, ສະແດງເວີຊັນທັງໝົດ ແລະ ລຶບ."
#. UnifiedRole Manager, Role Description (resolves directly)
#: pkg/unifiedrole/roles.go:232
msgid ""
"View, download, upload, edit, add, show all versions, delete and manage "
"members."
msgstr ""
"ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ, ເພີ່ມ, ສະແດງເວີຊັນທັງໝົດ, ລຶບ ແລະ "
"ຈັດການສະມາຊິກ."
#. UnifiedRole EditorListGrantsWithVersions, Role Description (resolves
#. directly)
#: pkg/unifiedrole/roles.go:164
msgid ""
"View, download, upload, edit, delete, show all versions and all invited "
"people."
msgstr ""
"ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ, ລຶບ, ສະແດງເວີຊັນທັງໝົດ ແລະ "
"ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນທັງໝົດ."
#. UnifiedRole FileEditorListGrantsWithVersions, Role Description (resolves
#. directly)
#: pkg/unifiedrole/roles.go:190
msgid ""
"View, download, upload, edit, show all versions and all invited people."
msgstr ""
"ເບິ່ງ, ດາວໂຫຼດ, ອັບໂຫຼດ, ແກ້ໄຂ, ສະແດງເວີຊັນທັງໝົດ ແລະ "
"ສະແດງລາຍຊື່ຜູ້ຖືກເຊີນທັງໝົດ."
+2 -2
View File
@@ -151,7 +151,7 @@
"mini-css-extract-plugin": "2.9.2",
"pnp-webpack-plugin": "1.7.0",
"postcss-flexbugs-fixes": "5.0.2",
"postcss-loader": "8.2.1",
"postcss-loader": "8.2.0",
"postcss-normalize": "13.0.0",
"postcss-preset-env": "10.4.0",
"postcss-safe-parser": "7.0.0",
@@ -171,7 +171,7 @@
"glob": "10.5.0",
"minimatch@>=9.0.0 <9.0.7": "9.0.7",
"js-yaml": ">=4.1.1",
"lodash": ">=4.18.1",
"lodash": ">=4.17.23",
"undici": ">=7.18.2",
"vue-template-compiler": "^3.0.0",
"brace-expansion@>=1.0.0 <=1.1.11": ">=1.1.12",
+41 -41
View File
@@ -8,7 +8,7 @@ overrides:
glob: 10.5.0
minimatch@>=9.0.0 <9.0.7: 9.0.7
js-yaml: '>=4.1.1'
lodash: '>=4.18.1'
lodash: '>=4.17.23'
undici: '>=7.18.2'
vue-template-compiler: ^3.0.0
brace-expansion@>=1.0.0 <=1.1.11: '>=1.1.12'
@@ -258,8 +258,8 @@ importers:
specifier: 5.0.2
version: 5.0.2(postcss@8.5.6)
postcss-loader:
specifier: 8.2.1
version: 8.2.1(postcss@8.5.6)(typescript@5.9.3)(webpack@5.104.1)
specifier: 8.2.0
version: 8.2.0(postcss@8.5.6)(typescript@5.9.3)(webpack@5.104.1)
postcss-normalize:
specifier: 13.0.0
version: 13.0.0(browserslist@4.28.1)(postcss@8.5.6)
@@ -3067,8 +3067,8 @@ packages:
resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==}
engines: {node: '>=10'}
cosmiconfig@9.0.1:
resolution: {integrity: sha512-hr4ihw+DBqcvrsEDioRO31Z17x71pUYoNe/4h6Z0wB72p7MU7/9gH8Q3s12NFhHPfYBBOV3qyfUxmr/Yn3shnQ==}
cosmiconfig@9.0.0:
resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==}
engines: {node: '>=14'}
peerDependencies:
typescript: '>=4.9.5'
@@ -4690,8 +4690,8 @@ packages:
lodash.uniq@4.5.0:
resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==}
lodash@4.18.1:
resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==}
lodash@4.17.23:
resolution: {integrity: sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==}
loose-envify@1.4.0:
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
@@ -5254,11 +5254,11 @@ packages:
peerDependencies:
postcss: ^8.4
postcss-loader@8.2.1:
resolution: {integrity: sha512-k98jtRzthjj3f76MYTs9JTpRqV1RaaMhEU0Lpw9OTmQZQdppg4B30VZ74BojuBHt3F4KyubHJoXCMUeM8Bqeow==}
postcss-loader@8.2.0:
resolution: {integrity: sha512-tHX+RkpsXVcc7st4dSdDGliI+r4aAQDuv+v3vFYHixb6YgjreG5AG4SEB0kDK8u2s6htqEEpKlkhSBUTvWKYnA==}
engines: {node: '>= 18.12.0'}
peerDependencies:
'@rspack/core': 0.x || ^1.0.0 || ^2.0.0-0
'@rspack/core': 0.x || 1.x
postcss: ^7.0.0 || ^8.0.1
webpack: ^5.0.0
peerDependenciesMeta:
@@ -5944,8 +5944,8 @@ packages:
engines: {node: '>=10'}
hasBin: true
semver@7.7.4:
resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==}
semver@7.7.3:
resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==}
engines: {node: '>=10'}
hasBin: true
@@ -8695,7 +8695,7 @@ snapshots:
'@npmcli/fs@3.1.1':
dependencies:
semver: 7.7.4
semver: 7.7.3
'@pkgjs/parseargs@0.11.0':
optional: true
@@ -8807,7 +8807,7 @@ snapshots:
aria-query: 5.3.0
css.escape: 1.5.1
dom-accessibility-api: 0.6.3
lodash: 4.18.1
lodash: 4.17.23
picocolors: 1.1.1
redent: 3.0.0
@@ -8964,7 +8964,7 @@ snapshots:
graphemer: 1.4.0
ignore: 5.3.2
natural-compare-lite: 1.4.0
semver: 7.7.4
semver: 7.7.3
tsutils: 3.21.0(typescript@5.9.3)
optionalDependencies:
typescript: 5.9.3
@@ -9096,7 +9096,7 @@ snapshots:
debug: 4.4.3
globby: 11.1.0
is-glob: 4.0.3
semver: 7.7.4
semver: 7.7.3
tsutils: 3.21.0(typescript@5.9.3)
optionalDependencies:
typescript: 5.9.3
@@ -9111,7 +9111,7 @@ snapshots:
globby: 11.1.0
is-glob: 4.0.3
minimatch: 9.0.7
semver: 7.7.4
semver: 7.7.3
ts-api-utils: 1.4.3(typescript@5.9.3)
optionalDependencies:
typescript: 5.9.3
@@ -9126,7 +9126,7 @@ snapshots:
globby: 11.1.0
is-glob: 4.0.3
minimatch: 9.0.7
semver: 7.7.4
semver: 7.7.3
ts-api-utils: 1.4.3(typescript@5.9.3)
optionalDependencies:
typescript: 5.9.3
@@ -9143,7 +9143,7 @@ snapshots:
fast-glob: 3.3.3
is-glob: 4.0.3
minimatch: 9.0.7
semver: 7.7.4
semver: 7.7.3
ts-api-utils: 2.1.0(typescript@5.9.3)
typescript: 5.9.3
transitivePeerDependencies:
@@ -9159,7 +9159,7 @@ snapshots:
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.9.3)
eslint: 8.57.1
eslint-scope: 5.1.1
semver: 7.7.4
semver: 7.7.3
transitivePeerDependencies:
- supports-color
- typescript
@@ -9173,7 +9173,7 @@ snapshots:
'@typescript-eslint/types': 7.0.0
'@typescript-eslint/typescript-estree': 7.0.0(typescript@5.9.3)
eslint: 8.57.1
semver: 7.7.4
semver: 7.7.3
transitivePeerDependencies:
- supports-color
- typescript
@@ -10001,7 +10001,7 @@ snapshots:
path-type: 4.0.0
yaml: 1.10.2
cosmiconfig@9.0.1(typescript@5.9.3):
cosmiconfig@9.0.0(typescript@5.9.3):
dependencies:
env-paths: 2.2.1
import-fresh: 3.3.1
@@ -10679,12 +10679,12 @@ snapshots:
'@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.28.6)
'@babel/plugin-transform-react-jsx': 7.27.1(@babel/core@7.28.6)
eslint: 8.57.1
lodash: 4.18.1
lodash: 4.17.23
string-natural-compare: 3.0.1
eslint-plugin-i18next@6.1.3:
dependencies:
lodash: 4.18.1
lodash: 4.17.23
requireindex: 1.1.0
eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1):
@@ -11063,7 +11063,7 @@ snapshots:
memfs: 3.5.3
minimatch: 3.1.5
schema-utils: 2.7.0
semver: 7.7.4
semver: 7.7.3
tapable: 1.1.3
typescript: 5.9.3
webpack: 5.104.1
@@ -11349,7 +11349,7 @@ snapshots:
dependencies:
'@types/html-minifier-terser': 6.1.0
html-minifier-terser: 6.1.0
lodash: 4.18.1
lodash: 4.17.23
pretty-error: 4.0.0
tapable: 2.3.0
optionalDependencies:
@@ -11635,7 +11635,7 @@ snapshots:
'@babel/parser': 7.28.6
'@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.2
semver: 7.7.4
semver: 7.7.3
transitivePeerDependencies:
- supports-color
@@ -11936,7 +11936,7 @@ snapshots:
jest-message-util: 30.2.0
jest-util: 30.2.0
pretty-format: 30.2.0
semver: 7.7.4
semver: 7.7.3
synckit: 0.11.11
transitivePeerDependencies:
- supports-color
@@ -12192,7 +12192,7 @@ snapshots:
lodash.uniq@4.5.0: {}
lodash@4.18.1: {}
lodash@4.17.23: {}
loose-envify@1.4.0:
dependencies:
@@ -12220,7 +12220,7 @@ snapshots:
make-dir@4.0.0:
dependencies:
semver: 7.7.4
semver: 7.7.3
makeerror@1.0.12:
dependencies:
@@ -12336,7 +12336,7 @@ snapshots:
dependencies:
hosted-git-info: 6.1.1
is-core-module: 2.16.1
semver: 7.7.4
semver: 7.7.3
validate-npm-package-license: 3.0.4
normalize-path@3.0.0: {}
@@ -12491,7 +12491,7 @@ snapshots:
parse-json@5.2.0:
dependencies:
'@babel/code-frame': 7.29.0
'@babel/code-frame': 7.28.6
error-ex: 1.3.4
json-parse-even-better-errors: 2.3.1
lines-and-columns: 1.2.4
@@ -12720,12 +12720,12 @@ snapshots:
'@csstools/utilities': 2.0.0(postcss@8.5.6)
postcss: 8.5.6
postcss-loader@8.2.1(postcss@8.5.6)(typescript@5.9.3)(webpack@5.104.1):
postcss-loader@8.2.0(postcss@8.5.6)(typescript@5.9.3)(webpack@5.104.1):
dependencies:
cosmiconfig: 9.0.1(typescript@5.9.3)
cosmiconfig: 9.0.0(typescript@5.9.3)
jiti: 2.6.1
postcss: 8.5.6
semver: 7.7.4
semver: 7.7.3
optionalDependencies:
webpack: 5.104.1
transitivePeerDependencies:
@@ -13027,7 +13027,7 @@ snapshots:
pretty-error@4.0.0:
dependencies:
lodash: 4.18.1
lodash: 4.17.23
renderkid: 3.0.0
pretty-format@27.5.1:
@@ -13233,7 +13233,7 @@ snapshots:
'@npmcli/fs': 3.1.1
debug: 4.4.3
read-package-json: 6.0.4
semver: 7.7.4
semver: 7.7.3
slide: 1.1.6
optionalDependencies:
graceful-fs: 4.2.11
@@ -13371,7 +13371,7 @@ snapshots:
css-select: 4.3.0
dom-converter: 0.2.0
htmlparser2: 6.1.0
lodash: 4.18.1
lodash: 4.17.23
strip-ansi: 6.0.1
replace-ext@2.0.0: {}
@@ -13516,7 +13516,7 @@ snapshots:
semver@7.7.2: {}
semver@7.7.4: {}
semver@7.7.3: {}
seq@0.3.5:
dependencies:
@@ -13610,7 +13610,7 @@ snapshots:
escape-html: 1.0.3
glob: 10.5.0
gzip-size: 6.0.0
lodash: 4.18.1
lodash: 4.17.23
open: 7.4.2
source-map: 0.7.4
temp: 0.9.4
@@ -14340,7 +14340,7 @@ snapshots:
fast-json-stable-stringify: 2.1.0
fs-extra: 9.1.0
glob: 10.5.0
lodash: 4.18.1
lodash: 4.17.23
pretty-bytes: 5.6.0
rollup: 2.80.0
source-map: 0.8.0-beta.0
+1 -1
View File
@@ -17,7 +17,7 @@ services:
EMAIL_HOST: email
EMAIL_PORT: 8025
env_file:
- ../../../../.drone.env # TODO: [DRONE-REMOVAL] inline or replace this env_file source
- ../../../../.drone.env
volumes:
- ./run-tests.sh:/test/run-tests.sh
- ../../../../:/drone/src
+1 -2
View File
@@ -3,7 +3,6 @@
Run CS3 API validator tests locally and in GitHub Actions CI.
Config sourced from .drone.star cs3ApiTests() — single source of truth.
TODO: [DRONE-REMOVAL] decouple from .drone.star constants when Drone CI is removed.
Usage: python3 tests/acceptance/run-cs3api.py
"""
@@ -16,7 +15,7 @@ import time
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star) # TODO: [DRONE-REMOVAL]
# Constants (mirroring .drone.star)
# ---------------------------------------------------------------------------
# HTTPS — matching drone: ocis init generates a self-signed cert; proxy uses TLS by default.
+1 -1
View File
@@ -74,7 +74,7 @@ def main() -> int:
# clone + install web only if not already provided (e.g. via artifact)
if not web_dir.exists():
drone_env = {}
drone_env_file = repo_root / ".drone.env" # TODO: [DRONE-REMOVAL] read WEB_COMMITID/WEB_BRANCH from a different source
drone_env_file = repo_root / ".drone.env"
if drone_env_file.exists():
for line in drone_env_file.read_text().splitlines():
if "=" in line and not line.startswith("#"):
+1 -2
View File
@@ -3,7 +3,6 @@
Run ocis acceptance tests locally and in GitHub Actions CI.
Config sourced from .drone.star localApiTests — single source of truth.
TODO: [DRONE-REMOVAL] decouple from .drone.star constants when Drone CI is removed.
Usage: BEHAT_SUITES=apiGraph python3 tests/acceptance/run-github.py
"""
@@ -18,7 +17,7 @@ import shutil
from pathlib import Path
# ---------------------------------------------------------------------------
# Config sourced from .drone.star # TODO: [DRONE-REMOVAL]
# Config sourced from .drone.star
# NOTE: EMAIL_SMTP_HOST is "email" (container name) in drone, "localhost" here
# ---------------------------------------------------------------------------
+1 -2
View File
@@ -3,7 +3,6 @@
Run litmus WebDAV compliance tests locally and in GitHub Actions CI.
Config sourced from .drone.star litmus() / setupForLitmus() — single source of truth.
TODO: [DRONE-REMOVAL] decouple from .drone.star constants when Drone CI is removed.
Usage: python3 tests/acceptance/run-litmus.py
"""
@@ -18,7 +17,7 @@ import time
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star) # TODO: [DRONE-REMOVAL]
# Constants (mirroring .drone.star)
# ---------------------------------------------------------------------------
# HTTPS — matching drone: ocis init generates a self-signed cert; proxy uses TLS by default.
+1 -2
View File
@@ -3,7 +3,6 @@
Run WOPI validator tests locally and in GitHub Actions CI.
Config sourced from .drone.star wopiValidatorTests() — single source of truth.
TODO: [DRONE-REMOVAL] decouple from .drone.star constants when Drone CI is removed.
Usage: python3 tests/acceptance/run-wopi.py --type builtin
python3 tests/acceptance/run-wopi.py --type cs3
"""
@@ -22,7 +21,7 @@ import urllib.parse
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star) # TODO: [DRONE-REMOVAL]
# Constants (mirroring .drone.star)
# ---------------------------------------------------------------------------
# HTTPS — matching drone; host-side curl calls use -k.
-1
View File
@@ -1,5 +1,4 @@
#!/bin/bash
# TODO: [DRONE-REMOVAL] this entire script depends on .drone.env and Drone S3 cache
source .drone.env
# if no $1 is supplied end the script
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
set -e
COMMIT_SHA_SHORT=${DRONE_COMMIT:0:8}
BUILD_STATUS="✅ Success"
ROOMID="!rnWsCVUmDHDJbiSPMM:matrix.org"
# helper functions
log_error() {
echo -e "\e[31m$1\e[0m"
}
log_info() {
echo -e "\e[37m$1\e[0m"
}
log_success() {
echo -e "\e[32m$1\e[0m"
}
# Determine build source: nightly, tag or branch
if [[ "$DRONE_BUILD_EVENT" == "cron" ]]; then
BUILD_SOURCE="nightly-$DRONE_BRANCH"
elif [[ "$DRONE_BUILD_EVENT" == "tag" ]]; then
BUILD_SOURCE="tag $DRONE_TAG"
else
BUILD_SOURCE="$DRONE_BRANCH"
fi
if [[ "$DRONE_BUILD_STATUS" == "failure" ]]; then
BUILD_STATUS="❌️ Failure"
fi
message_html='<b>'$BUILD_STATUS'</b> <a href="'${DRONE_BUILD_LINK}'">'${DRONE_REPO}'#'$COMMIT_SHA_SHORT'</a> ('${BUILD_SOURCE}') by <b>'${DRONE_COMMIT_AUTHOR}'</b>'
message_html=$(echo "$message_html" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g')
log_info "Sending report to the element chat...."
response=$(curl -s -o /dev/null -X PUT -w "%{http_code}" 'https://matrix.org/_matrix/client/v3/rooms/'$ROOMID'/send/m.room.message/'$(date +%s) \
-H "Authorization: Bearer "$MATRIX_TOKEN \
-H 'Content-Type: application/json' \
-d '{
"msgtype": "m.text",
"body": "'"$message_html"'",
"format": "org.matrix.custom.html",
"formatted_body": "'"$message_html"'"
}')
if [[ "$response" != "200" ]]; then
log_error "❌ Error: Failed to send notification to element. Expected status code 200, but got $response."
exit 1
fi
log_success "✅ Notification successfully sent to Element chat (ownCloud Infinite Scale Alerts)"
+1 -9
View File
@@ -414,9 +414,6 @@ func (ctx ecKeyGenerator) genKey() ([]byte, rawHeader, error) {
// Decrypt the given payload and return the content encryption key.
func (ctx ecDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
if recipient == nil {
return nil, errors.New("go-jose/go-jose: missing recipient")
}
epk, err := headers.getEPK()
if err != nil {
return nil, errors.New("go-jose/go-jose: invalid epk header")
@@ -464,18 +461,13 @@ func (ctx ecDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientI
return nil, ErrUnsupportedAlgorithm
}
encryptedKey := recipient.encryptedKey
if len(encryptedKey) == 0 {
return nil, errors.New("go-jose/go-jose: missing JWE Encrypted Key")
}
key := deriveKey(string(algorithm), keySize)
block, err := aes.NewCipher(key)
if err != nil {
return nil, err
}
return josecipher.KeyUnwrap(block, encryptedKey)
return josecipher.KeyUnwrap(block, recipient.encryptedKey)
}
func (ctx edDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
+1 -9
View File
@@ -66,20 +66,12 @@ func KeyWrap(block cipher.Block, cek []byte) ([]byte, error) {
}
// KeyUnwrap implements NIST key unwrapping; it unwraps a content encryption key (cek) with the given block cipher.
//
// https://datatracker.ietf.org/doc/html/rfc7518#section-4.4
// https://datatracker.ietf.org/doc/html/rfc7518#section-4.6
// https://datatracker.ietf.org/doc/html/rfc7518#section-4.8
func KeyUnwrap(block cipher.Block, ciphertext []byte) ([]byte, error) {
n := (len(ciphertext) / 8) - 1
if n <= 0 {
return nil, errors.New("go-jose/go-jose: JWE Encrypted Key too short")
}
if len(ciphertext)%8 != 0 {
return nil, errors.New("go-jose/go-jose: key wrap input must be 8 byte blocks")
}
n := (len(ciphertext) / 8) - 1
r := make([][]byte, n)
for i := range r {
+8 -18
View File
@@ -364,21 +364,11 @@ func (ctx *symmetricKeyCipher) encryptKey(cek []byte, alg KeyAlgorithm) (recipie
// Decrypt the content encryption key.
func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
if recipient == nil {
return nil, fmt.Errorf("go-jose/go-jose: missing recipient")
}
alg := headers.getAlgorithm()
if alg == DIRECT {
return bytes.Clone(ctx.key), nil
}
encryptedKey := recipient.encryptedKey
if len(encryptedKey) == 0 {
return nil, fmt.Errorf("go-jose/go-jose: missing JWE Encrypted Key")
}
switch alg {
switch headers.getAlgorithm() {
case DIRECT:
cek := make([]byte, len(ctx.key))
copy(cek, ctx.key)
return cek, nil
case A128GCMKW, A192GCMKW, A256GCMKW:
aead := newAESGCM(len(ctx.key))
@@ -393,7 +383,7 @@ func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipien
parts := &aeadParts{
iv: iv.bytes(),
ciphertext: encryptedKey,
ciphertext: recipient.encryptedKey,
tag: tag.bytes(),
}
@@ -409,7 +399,7 @@ func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipien
return nil, err
}
cek, err := josecipher.KeyUnwrap(block, encryptedKey)
cek, err := josecipher.KeyUnwrap(block, recipient.encryptedKey)
if err != nil {
return nil, err
}
@@ -450,7 +440,7 @@ func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipien
return nil, err
}
cek, err := josecipher.KeyUnwrap(block, encryptedKey)
cek, err := josecipher.KeyUnwrap(block, recipient.encryptedKey)
if err != nil {
return nil, err
}
+1 -9
View File
@@ -414,9 +414,6 @@ func (ctx ecKeyGenerator) genKey() ([]byte, rawHeader, error) {
// Decrypt the given payload and return the content encryption key.
func (ctx ecDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
if recipient == nil {
return nil, errors.New("go-jose/go-jose: missing recipient")
}
epk, err := headers.getEPK()
if err != nil {
return nil, errors.New("go-jose/go-jose: invalid epk header")
@@ -464,18 +461,13 @@ func (ctx ecDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientI
return nil, ErrUnsupportedAlgorithm
}
encryptedKey := recipient.encryptedKey
if len(encryptedKey) == 0 {
return nil, errors.New("go-jose/go-jose: missing JWE Encrypted Key")
}
key := deriveKey(string(algorithm), keySize)
block, err := aes.NewCipher(key)
if err != nil {
return nil, err
}
return josecipher.KeyUnwrap(block, encryptedKey)
return josecipher.KeyUnwrap(block, recipient.encryptedKey)
}
func (ctx edDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
+1 -9
View File
@@ -66,20 +66,12 @@ func KeyWrap(block cipher.Block, cek []byte) ([]byte, error) {
}
// KeyUnwrap implements NIST key unwrapping; it unwraps a content encryption key (cek) with the given block cipher.
//
// https://datatracker.ietf.org/doc/html/rfc7518#section-4.4
// https://datatracker.ietf.org/doc/html/rfc7518#section-4.6
// https://datatracker.ietf.org/doc/html/rfc7518#section-4.8
func KeyUnwrap(block cipher.Block, ciphertext []byte) ([]byte, error) {
n := (len(ciphertext) / 8) - 1
if n <= 0 {
return nil, errors.New("go-jose/go-jose: JWE Encrypted Key too short")
}
if len(ciphertext)%8 != 0 {
return nil, errors.New("go-jose/go-jose: key wrap input must be 8 byte blocks")
}
n := (len(ciphertext) / 8) - 1
r := make([][]byte, n)
for i := range r {
+8 -18
View File
@@ -366,21 +366,11 @@ func (ctx *symmetricKeyCipher) encryptKey(cek []byte, alg KeyAlgorithm) (recipie
// Decrypt the content encryption key.
func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
if recipient == nil {
return nil, fmt.Errorf("go-jose/go-jose: missing recipient")
}
alg := headers.getAlgorithm()
if alg == DIRECT {
return bytes.Clone(ctx.key), nil
}
encryptedKey := recipient.encryptedKey
if len(encryptedKey) == 0 {
return nil, fmt.Errorf("go-jose/go-jose: missing JWE Encrypted Key")
}
switch alg {
switch headers.getAlgorithm() {
case DIRECT:
cek := make([]byte, len(ctx.key))
copy(cek, ctx.key)
return cek, nil
case A128GCMKW, A192GCMKW, A256GCMKW:
aead := newAESGCM(len(ctx.key))
@@ -395,7 +385,7 @@ func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipien
parts := &aeadParts{
iv: iv.bytes(),
ciphertext: encryptedKey,
ciphertext: recipient.encryptedKey,
tag: tag.bytes(),
}
@@ -411,7 +401,7 @@ func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipien
return nil, err
}
cek, err := josecipher.KeyUnwrap(block, encryptedKey)
cek, err := josecipher.KeyUnwrap(block, recipient.encryptedKey)
if err != nil {
return nil, err
}
@@ -455,7 +445,7 @@ func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipien
return nil, err
}
cek, err := josecipher.KeyUnwrap(block, encryptedKey)
cek, err := josecipher.KeyUnwrap(block, recipient.encryptedKey)
if err != nil {
return nil, err
}
-12
View File
@@ -17,7 +17,6 @@ linters:
- ineffassign
- misspell
- modernize
- noctx
- perfsprint
- revive
- staticcheck
@@ -89,16 +88,6 @@ linters:
deny:
- pkg: go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal
desc: Do not use cross-module internal packages.
semconv:
list-mode: lax
files:
- "!**/semconv/**"
- "!**/exporters/zipkin/**"
deny:
- pkg: go.opentelemetry.io/otel/semconv
desc: "Use go.opentelemetry.io/otel/semconv/v1.40.0 instead. If a newer semconv version has been released, update the depguard rule."
allow:
- go.opentelemetry.io/otel/semconv/v1.40.0
gocritic:
disabled-checks:
- appendAssign
@@ -205,7 +194,6 @@ linters:
arguments:
- ["ID"] # AllowList
- ["Otel", "Aws", "Gcp"] # DenyList
- - skip-package-name-collision-with-go-std: true
- name: waitgroup-by-value
testifylint:
enable-all: true
+1 -89
View File
@@ -11,90 +11,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
<!-- Released section -->
<!-- Don't change this section unless doing release -->
## [1.43.0/0.65.0/0.19.0] 2026-04-02
### Added
- Add `IsRandom` and `WithRandom` on `TraceFlags`, and `IsRandom` on `SpanContext` in `go.opentelemetry.io/otel/trace` for [W3C Trace Context Level 2 Random Trace ID Flag](https://www.w3.org/TR/trace-context-2/#random-trace-id-flag) support. (#8012)
- Add service detection with `WithService` in `go.opentelemetry.io/otel/sdk/resource`. (#7642)
- Add `DefaultWithContext` and `EnvironmentWithContext` in `go.opentelemetry.io/otel/sdk/resource` to support plumbing `context.Context` through default and environment detectors. (#8051)
- Support attributes with empty value (`attribute.EMPTY`) in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#8038)
- Support attributes with empty value (`attribute.EMPTY`) in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#8038)
- Support attributes with empty value (`attribute.EMPTY`) in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#8038)
- Support attributes with empty value (`attribute.EMPTY`) in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#8038)
- Support attributes with empty value (`attribute.EMPTY`) in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#8038)
- Support attributes with empty value (`attribute.EMPTY`) in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8038)
- Support attributes with empty value (`attribute.EMPTY`) in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest`. (#8038)
- Add support for per-series start time tracking for cumulative metrics in `go.opentelemetry.io/otel/sdk/metric`.
Set `OTEL_GO_X_PER_SERIES_START_TIMESTAMPS=true` to enable. (#8060)
- Add `WithCardinalityLimitSelector` for metric reader for configuring cardinality limits specific to the instrument kind. (#7855)
### Changed
- Introduce the `EMPTY` Type in `go.opentelemetry.io/otel/attribute` to reflect that an empty value is now a valid value, with `INVALID` remaining as a deprecated alias of `EMPTY`. (#8038)
- Improve slice handling in `go.opentelemetry.io/otel/attribute` to optimize short slice values with fixed-size fast paths. (#8039)
- Improve performance of span metric recording in `go.opentelemetry.io/otel/sdk/trace` by returning early if self-observability is not enabled. (#8067)
- Improve formatting of metric data diffs in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest`. (#8073)
### Deprecated
- Deprecate `INVALID` in `go.opentelemetry.io/otel/attribute`. Use `EMPTY` instead. (#8038)
### Fixed
- Return spec-compliant `TraceIdRatioBased` description. This is a breaking behavioral change, but it is necessary to
make the implementation [spec-compliant](https://opentelemetry.io/docs/specs/otel/trace/sdk/#traceidratiobased). (#8027)
- Fix a race condition in `go.opentelemetry.io/otel/sdk/metric` where the lastvalue aggregation could collect the value 0 even when no zero-value measurements were recorded. (#8056)
- Limit HTTP response body to 4 MiB in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` to mitigate excessive memory usage caused by a misconfigured or malicious server.
Responses exceeding the limit are treated as non-retryable errors. (#8108)
- Limit HTTP response body to 4 MiB in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` to mitigate excessive memory usage caused by a misconfigured or malicious server.
Responses exceeding the limit are treated as non-retryable errors. (#8108)
- Limit HTTP response body to 4 MiB in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` to mitigate excessive memory usage caused by a misconfigured or malicious server.
Responses exceeding the limit are treated as non-retryable errors. (#8108)
- `WithHostID` detector in `go.opentelemetry.io/otel/sdk/resource` to use full path for `kenv` command on BSD. (#8113)
- Fix missing `request.GetBody` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` to correctly handle HTTP2 GOAWAY frame. (#8096)
## [1.42.0/0.64.0/0.18.0/0.0.16] 2026-03-06
### Added
- Add `go.opentelemetry.io/otel/semconv/v1.40.0` package.
The package contains semantic conventions from the `v1.40.0` version of the OpenTelemetry Semantic Conventions.
See the [migration documentation](./semconv/v1.40.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.39.0`. (#7985)
- Add `Err` and `SetErr` on `Record` in `go.opentelemetry.io/otel/log` to attach an error and set record exception attributes in `go.opentelemetry.io/otel/log/sdk`. (#7924)
### Changed
- `TracerProvider.ForceFlush` in `go.opentelemetry.io/otel/sdk/trace` joins errors together and continues iteration through SpanProcessors as opposed to returning the first encountered error without attempting exports on subsequent SpanProcessors. (#7856)
### Fixed
- Fix missing `request.GetBody` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` to correctly handle HTTP2 GOAWAY frame. (#7931)
- Fix semconv v1.39.0 generated metric helpers skipping required attributes when extra attributes were empty. (#7964)
- Preserve W3C TraceFlags bitmask (including the random Trace ID flag) during trace context extraction and injection in `go.opentelemetry.io/otel/propagation`. (#7834)
### Removed
- Drop support for [Go 1.24]. (#7984)
## [1.41.0/0.63.0/0.17.0/0.0.15] 2026-03-02
This release is the last to support [Go 1.24].
The next release will require at least [Go 1.25].
### Added
- Support testing of [Go 1.26]. (#7902)
### Fixed
- Update `Baggage` in `go.opentelemetry.io/otel/propagation` and `Parse` and `New` in `go.opentelemetry.io/otel/baggage` to comply with W3C Baggage specification limits.
`New` and `Parse` now return partial baggage along with an error when limits are exceeded.
Errors from baggage extraction are reported to the global error handler. (#7880)
- Return an error when the endpoint is configured as insecure and with TLS configuration in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7914)
- Return an error when the endpoint is configured as insecure and with TLS configuration in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#7914)
- Return an error when the endpoint is configured as insecure and with TLS configuration in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7914)
## [1.40.0/0.62.0/0.16.0] 2026-02-02
### Added
@@ -3619,10 +3535,7 @@ It contains api and sdk for trace and meter.
- CircleCI build CI manifest files.
- CODEOWNERS file to track owners of this project.
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.43.0...HEAD
[1.43.0/0.65.0/0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.43.0
[1.42.0/0.64.0/0.18.0/0.0.16]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.42.0
[1.41.0/0.63.0/0.17.0/0.0.15]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.41.0
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.40.0...HEAD
[1.40.0/0.62.0/0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.40.0
[1.39.0/0.61.0/0.15.0/0.0.14]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.39.0
[1.38.0/0.60.0/0.14.0/0.0.13]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.38.0
@@ -3722,7 +3635,6 @@ It contains api and sdk for trace and meter.
<!-- Released section ended -->
[Go 1.26]: https://go.dev/doc/go1.26
[Go 1.25]: https://go.dev/doc/go1.25
[Go 1.24]: https://go.dev/doc/go1.24
[Go 1.23]: https://go.dev/doc/go1.23
+3 -3
View File
@@ -746,8 +746,8 @@ Encapsulate setup in constructor functions, ensuring clear ownership and scope:
import (
"errors"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
"go.opentelemetry.io/otel/semconv/v1.40.0/otelconv"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
"go.opentelemetry.io/otel/semconv/v1.39.0/otelconv"
)
type SDKComponent struct {
@@ -1039,7 +1039,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan)
All observability metrics should follow the [OpenTelemetry Semantic Conventions for SDK metrics](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/otel/sdk-metrics.md).
Use the metric semantic conventions convenience package [otelconv](./semconv/v1.40.0/otelconv/metric.go).
Use the metric semantic conventions convenience package [otelconv](./semconv/v1.39.0/otelconv/metric.go).
##### Component Identification
+6 -9
View File
@@ -38,14 +38,10 @@ CROSSLINK = $(TOOLS)/crosslink
$(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink
SEMCONVKIT = $(TOOLS)/semconvkit
SEMCONVKIT_FILES := $(sort $(shell find $(TOOLS_MOD_DIR)/semconvkit -type f))
$(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit
$(TOOLS)/semconvkit: $(SEMCONVKIT_FILES)
VERIFYREADMES = $(TOOLS)/verifyreadmes
VERIFYREADMES_FILES := $(sort $(shell find $(TOOLS_MOD_DIR)/verifyreadmes -type f))
$(TOOLS)/verifyreadmes: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/verifyreadmes
$(TOOLS)/verifyreadmes: $(VERIFYREADMES_FILES)
GOLANGCI_LINT = $(TOOLS)/golangci-lint
$(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/v2/cmd/golangci-lint
@@ -189,10 +185,11 @@ test-coverage: $(GOCOVMERGE)
.PHONY: benchmark
benchmark: $(OTEL_GO_MOD_DIRS:%=benchmark/%)
benchmark/%:
cd $* && $(GO) test -run='^$$' -bench=. $(ARGS) ./...
print-sharded-benchmarks:
@echo $(OTEL_GO_MOD_DIRS) | jq -cR 'split(" ")'
@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
@@ -218,7 +215,7 @@ go-mod-tidy/%: crosslink
&& $(GO) mod tidy -compat=1.21
.PHONY: lint
lint: misspell go-mod-tidy golangci-lint
lint: misspell go-mod-tidy golangci-lint govulncheck
.PHONY: vanity-import-check
vanity-import-check: $(PORTO)
+7 -7
View File
@@ -53,20 +53,20 @@ Currently, this project supports the following environments.
| OS | Go Version | Architecture |
|----------|------------|--------------|
| Ubuntu | 1.26 | amd64 |
| Ubuntu | 1.25 | amd64 |
| Ubuntu | 1.26 | 386 |
| Ubuntu | 1.24 | amd64 |
| Ubuntu | 1.25 | 386 |
| Ubuntu | 1.26 | arm64 |
| Ubuntu | 1.24 | 386 |
| Ubuntu | 1.25 | arm64 |
| macOS | 1.26 | amd64 |
| Ubuntu | 1.24 | arm64 |
| macOS | 1.25 | amd64 |
| macOS | 1.26 | arm64 |
| macOS | 1.24 | amd64 |
| macOS | 1.25 | arm64 |
| Windows | 1.26 | amd64 |
| macOS | 1.24 | arm64 |
| Windows | 1.25 | amd64 |
| Windows | 1.26 | 386 |
| Windows | 1.24 | amd64 |
| Windows | 1.25 | 386 |
| Windows | 1.24 | 386 |
While this project should work for other systems, no compatibility guarantees
are made for those systems currently.
+1 -40
View File
@@ -4,9 +4,7 @@
Create a `Version Release` issue to track the release process.
## Semantic Convention Upgrade
### Semantic Convention Generation
## Semantic Convention Generation
New versions of the [OpenTelemetry Semantic Conventions] mean new versions of the `semconv` package need to be generated.
The `semconv-generate` make target is used for this.
@@ -24,43 +22,6 @@ make semconv-generate # Uses the exported TAG.
This should create a new sub-package of [`semconv`](./semconv).
Ensure things look correct before submitting a pull request to include the addition.
The `CHANGELOG.md` should also be updated to reflect the new changes:
```md
- The `go.opentelemetry.io/otel/semconv/<NEW VERSION>` package. The package contains semantic conventions from the `<NEW VERSION>` version of the OpenTelemetry Semantic Conventions. See the [migration documentation](./semconv/<NEW VERSION>/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/<PREVIOUS VERSION>`. (#PR_NUMBER)
```
> **Tip:** Change to the release and prior version to match the changes
### Update semconv imports
Once the new semconv module has been generated, update all semconv imports throughout the codebase to reference the new version:
```go
// Before
semconv "go.opentelemetry.io/otel/semconv/v1.37.0"
"go.opentelemetry.io/otel/semconv/v1.37.0/otelconv"
// After
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
"go.opentelemetry.io/otel/semconv/v1.39.0/otelconv"
```
Once complete, run `make` to check for any compilation or test failures.
#### Handling attribute changes
Some semconv releases might add new attributes or impact attributes that are currently being used. Changes could stem from a simple renaming, to more complex changes like merging attributes and property values being changed.
One should update the code to the new attributes that supersede the impacted ones, hence sticking to the semantic conventions. However, legacy attributes might still be emitted in accordance to the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable.
For an example on how such migration might have to be tracked and performed, see issue [#7806](https://github.com/open-telemetry/opentelemetry-go/issues/7806).
### Go contrib linter update
Update [.golangci.yml](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/.golangci.yml) in [opentelemetry-go-contrib](https://github.com/open-telemetry/opentelemetry-go-contrib/) to mandate the new semconv version.
## Breaking changes validation
You can run `make gorelease` which runs [gorelease](https://pkg.go.dev/golang.org/x/exp/cmd/gorelease) to ensure that there are no unwanted changes made in the public API.
+2 -2
View File
@@ -53,7 +53,7 @@ var (
_ Encoder = &defaultAttrEncoder{}
// encoderIDCounter is for generating IDs for other attribute encoders.
encoderIDCounter atomic.Uint64
encoderIDCounter uint64
defaultEncoderOnce sync.Once
defaultEncoderID = NewEncoderID()
@@ -64,7 +64,7 @@ var (
// once per each type of attribute encoder. Preferably in init() or in var
// definition.
func NewEncoderID() EncoderID {
return EncoderID{value: encoderIDCounter.Add(1)}
return EncoderID{value: atomic.AddUint64(&encoderIDCounter, 1)}
}
// DefaultEncoder returns an attribute encoder that encodes attributes in such
+1 -3
View File
@@ -27,7 +27,6 @@ const (
int64SliceID uint64 = 3762322556277578591 // "_[]int64" (little endian)
float64SliceID uint64 = 7308324551835016539 // "[]double" (little endian)
stringSliceID uint64 = 7453010373645655387 // "[]string" (little endian)
emptyID uint64 = 7305809155345288421 // "__empty_" (little endian)
)
// hashKVs returns a new xxHash64 hash of kvs.
@@ -81,8 +80,7 @@ func hashKV(h xxhash.Hash, kv KeyValue) xxhash.Hash {
for i := 0; i < rv.Len(); i++ {
h = h.String(rv.Index(i).String())
}
case EMPTY:
h = h.Uint64(emptyID)
case INVALID:
default:
// Logging is an alternative, but using the internal logger here
// causes an import cycle so it is not done.
+67 -50
View File
@@ -11,63 +11,80 @@ import (
"reflect"
)
// sliceElem is the exact set of element types stored in attribute slice values.
// Using a closed set prevents accidental instantiations for unsupported types.
type sliceElem interface {
bool | int64 | float64 | string
}
// SliceValue converts a slice into an array with the same elements.
func SliceValue[T sliceElem](v []T) any {
// Keep only the common tiny-slice cases out of reflection. Extending this
// much further increases code size for diminishing benefit while larger
// slices still need the generic reflective path to preserve comparability.
// This matches the short lengths that show up most often in local
// benchmarks and semantic convention examples while leaving larger, less
// predictable slices on the generic reflective path.
switch len(v) {
case 0:
return [0]T{}
case 1:
return [1]T{v[0]}
case 2:
return [2]T{v[0], v[1]}
case 3:
return [3]T{v[0], v[1], v[2]}
}
return sliceValueReflect(v)
}
// AsSlice converts an array into a slice with the same elements.
func AsSlice[T sliceElem](v any) []T {
// Mirror the small fixed-array fast path used by SliceValue.
switch a := v.(type) {
case [0]T:
return []T{}
case [1]T:
return []T{a[0]}
case [2]T:
return []T{a[0], a[1]}
case [3]T:
return []T{a[0], a[1], a[2]}
}
return asSliceReflect[T](v)
}
func sliceValueReflect[T sliceElem](v []T) any {
cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[T]())).Elem()
// BoolSliceValue converts a bool slice into an array with same elements as slice.
func BoolSliceValue(v []bool) any {
cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[bool]())).Elem()
reflect.Copy(cp, reflect.ValueOf(v))
return cp.Interface()
}
func asSliceReflect[T sliceElem](v any) []T {
// Int64SliceValue converts an int64 slice into an array with same elements as slice.
func Int64SliceValue(v []int64) any {
cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[int64]())).Elem()
reflect.Copy(cp, reflect.ValueOf(v))
return cp.Interface()
}
// Float64SliceValue converts a float64 slice into an array with same elements as slice.
func Float64SliceValue(v []float64) any {
cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[float64]())).Elem()
reflect.Copy(cp, reflect.ValueOf(v))
return cp.Interface()
}
// StringSliceValue converts a string slice into an array with same elements as slice.
func StringSliceValue(v []string) any {
cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[string]())).Elem()
reflect.Copy(cp, reflect.ValueOf(v))
return cp.Interface()
}
// AsBoolSlice converts a bool array into a slice into with same elements as array.
func AsBoolSlice(v any) []bool {
rv := reflect.ValueOf(v)
if !rv.IsValid() || rv.Kind() != reflect.Array || rv.Type().Elem() != reflect.TypeFor[T]() {
if rv.Type().Kind() != reflect.Array {
return nil
}
cpy := make([]T, rv.Len())
cpy := make([]bool, rv.Len())
if len(cpy) > 0 {
_ = reflect.Copy(reflect.ValueOf(cpy), rv)
}
return cpy
}
// AsInt64Slice converts an int64 array into a slice into with same elements as array.
func AsInt64Slice(v any) []int64 {
rv := reflect.ValueOf(v)
if rv.Type().Kind() != reflect.Array {
return nil
}
cpy := make([]int64, rv.Len())
if len(cpy) > 0 {
_ = reflect.Copy(reflect.ValueOf(cpy), rv)
}
return cpy
}
// AsFloat64Slice converts a float64 array into a slice into with same elements as array.
func AsFloat64Slice(v any) []float64 {
rv := reflect.ValueOf(v)
if rv.Type().Kind() != reflect.Array {
return nil
}
cpy := make([]float64, rv.Len())
if len(cpy) > 0 {
_ = reflect.Copy(reflect.ValueOf(cpy), rv)
}
return cpy
}
// AsStringSlice converts a string array into a slice into with same elements as array.
func AsStringSlice(v any) []string {
rv := reflect.ValueOf(v)
if rv.Type().Kind() != reflect.Array {
return nil
}
cpy := make([]string, rv.Len())
if len(cpy) > 0 {
_ = reflect.Copy(reflect.ValueOf(cpy), rv)
}
+1 -1
View File
@@ -15,7 +15,7 @@ type KeyValue struct {
// Valid reports whether kv is a valid OpenTelemetry attribute.
func (kv KeyValue) Valid() bool {
return kv.Key.Defined()
return kv.Key.Defined() && kv.Value.Type() != INVALID
}
// Bool creates a KeyValue with a BOOL Value type.
+3 -3
View File
@@ -8,7 +8,7 @@ func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[EMPTY-0]
_ = x[INVALID-0]
_ = x[BOOL-1]
_ = x[INT64-2]
_ = x[FLOAT64-3]
@@ -19,9 +19,9 @@ func _() {
_ = x[STRINGSLICE-8]
}
const _Type_name = "EMPTYBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE"
const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE"
var _Type_index = [...]uint8{0, 5, 9, 14, 21, 27, 36, 46, 58, 69}
var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71}
func (i Type) String() string {
idx := int(i) - 0
+19 -42
View File
@@ -6,6 +6,7 @@ package attribute // import "go.opentelemetry.io/otel/attribute"
import (
"encoding/json"
"fmt"
"reflect"
"strconv"
attribute "go.opentelemetry.io/otel/attribute/internal"
@@ -17,8 +18,6 @@ import (
type Type int // nolint: revive // redefines builtin Type.
// Value represents the value part in key-value pairs.
//
// Note that the zero value is a valid empty value.
type Value struct {
vtype Type
numeric uint64
@@ -27,8 +26,8 @@ type Value struct {
}
const (
// EMPTY is used for a Value with no value set.
EMPTY Type = iota
// INVALID is used for a Value with no value set.
INVALID Type = iota
// BOOL is a boolean Type Value.
BOOL
// INT64 is a 64-bit signed integral Type Value.
@@ -45,10 +44,6 @@ const (
FLOAT64SLICE
// STRINGSLICE is a slice of strings Type Value.
STRINGSLICE
// INVALID is used for a Value with no value set.
//
// Deprecated: Use EMPTY instead as an empty value is a valid value.
INVALID = EMPTY
)
// BoolValue creates a BOOL Value.
@@ -61,7 +56,7 @@ func BoolValue(v bool) Value {
// BoolSliceValue creates a BOOLSLICE Value.
func BoolSliceValue(v []bool) Value {
return Value{vtype: BOOLSLICE, slice: attribute.SliceValue(v)}
return Value{vtype: BOOLSLICE, slice: attribute.BoolSliceValue(v)}
}
// IntValue creates an INT64 Value.
@@ -69,30 +64,16 @@ func IntValue(v int) Value {
return Int64Value(int64(v))
}
// IntSliceValue creates an INT64SLICE Value.
// IntSliceValue creates an INTSLICE Value.
func IntSliceValue(v []int) Value {
val := Value{vtype: INT64SLICE}
// Avoid the common tiny-slice cases from allocating a new slice.
switch len(v) {
case 0:
val.slice = [0]int64{}
case 1:
val.slice = [1]int64{int64(v[0])}
case 2:
val.slice = [2]int64{int64(v[0]), int64(v[1])}
case 3:
val.slice = [3]int64{int64(v[0]), int64(v[1]), int64(v[2])}
default:
// Fallback to a new slice for larger slices.
cp := make([]int64, len(v))
for i, val := range v {
cp[i] = int64(val)
}
val.slice = attribute.SliceValue(cp)
cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[int64]()))
for i, val := range v {
cp.Elem().Index(i).SetInt(int64(val))
}
return Value{
vtype: INT64SLICE,
slice: cp.Elem().Interface(),
}
return val
}
// Int64Value creates an INT64 Value.
@@ -105,7 +86,7 @@ func Int64Value(v int64) Value {
// Int64SliceValue creates an INT64SLICE Value.
func Int64SliceValue(v []int64) Value {
return Value{vtype: INT64SLICE, slice: attribute.SliceValue(v)}
return Value{vtype: INT64SLICE, slice: attribute.Int64SliceValue(v)}
}
// Float64Value creates a FLOAT64 Value.
@@ -118,7 +99,7 @@ func Float64Value(v float64) Value {
// Float64SliceValue creates a FLOAT64SLICE Value.
func Float64SliceValue(v []float64) Value {
return Value{vtype: FLOAT64SLICE, slice: attribute.SliceValue(v)}
return Value{vtype: FLOAT64SLICE, slice: attribute.Float64SliceValue(v)}
}
// StringValue creates a STRING Value.
@@ -131,7 +112,7 @@ func StringValue(v string) Value {
// StringSliceValue creates a STRINGSLICE Value.
func StringSliceValue(v []string) Value {
return Value{vtype: STRINGSLICE, slice: attribute.SliceValue(v)}
return Value{vtype: STRINGSLICE, slice: attribute.StringSliceValue(v)}
}
// Type returns a type of the Value.
@@ -155,7 +136,7 @@ func (v Value) AsBoolSlice() []bool {
}
func (v Value) asBoolSlice() []bool {
return attribute.AsSlice[bool](v.slice)
return attribute.AsBoolSlice(v.slice)
}
// AsInt64 returns the int64 value. Make sure that the Value's type is
@@ -174,7 +155,7 @@ func (v Value) AsInt64Slice() []int64 {
}
func (v Value) asInt64Slice() []int64 {
return attribute.AsSlice[int64](v.slice)
return attribute.AsInt64Slice(v.slice)
}
// AsFloat64 returns the float64 value. Make sure that the Value's
@@ -193,7 +174,7 @@ func (v Value) AsFloat64Slice() []float64 {
}
func (v Value) asFloat64Slice() []float64 {
return attribute.AsSlice[float64](v.slice)
return attribute.AsFloat64Slice(v.slice)
}
// AsString returns the string value. Make sure that the Value's type
@@ -212,7 +193,7 @@ func (v Value) AsStringSlice() []string {
}
func (v Value) asStringSlice() []string {
return attribute.AsSlice[string](v.slice)
return attribute.AsStringSlice(v.slice)
}
type unknownValueType struct{}
@@ -236,8 +217,6 @@ func (v Value) AsInterface() any {
return v.stringly
case STRINGSLICE:
return v.asStringSlice()
case EMPTY:
return nil
}
return unknownValueType{}
}
@@ -273,8 +252,6 @@ func (v Value) Emit() string {
return string(j)
case STRING:
return v.stringly
case EMPTY:
return ""
default:
return "unknown"
}
+27 -84
View File
@@ -14,7 +14,8 @@ import (
)
const (
maxMembers = 64
maxMembers = 180
maxBytesPerMembers = 4096
maxBytesPerBaggageString = 8192
listDelimiter = ","
@@ -28,6 +29,7 @@ var (
errInvalidProperty = errors.New("invalid baggage list-member property")
errInvalidMember = errors.New("invalid baggage list-member")
errMemberNumber = errors.New("too many list-members in baggage-string")
errMemberBytes = errors.New("list-member too large")
errBaggageBytes = errors.New("baggage-string too large")
)
@@ -307,6 +309,10 @@ func newInvalidMember() Member {
// an error if the input is invalid according to the W3C Baggage
// specification.
func parseMember(member string) (Member, error) {
if n := len(member); n > maxBytesPerMembers {
return newInvalidMember(), fmt.Errorf("%w: %d", errMemberBytes, n)
}
var props properties
keyValue, properties, found := strings.Cut(member, propertyDelimiter)
if found {
@@ -424,10 +430,6 @@ type Baggage struct { //nolint:golint
// New returns a new valid Baggage. It returns an error if it results in a
// Baggage exceeding limits set in that specification.
//
// If the resulting Baggage exceeds the maximum allowed members or bytes,
// members are dropped until the limits are satisfied and an error is returned
// along with the partial result.
//
// It expects all the provided members to have already been validated.
func New(members ...Member) (Baggage, error) {
if len(members) == 0 {
@@ -439,6 +441,7 @@ func New(members ...Member) (Baggage, error) {
if !m.hasData {
return Baggage{}, errInvalidMember
}
// OpenTelemetry resolves duplicates by last-one-wins.
b[m.key] = baggage.Item{
Value: m.value,
@@ -446,42 +449,17 @@ func New(members ...Member) (Baggage, error) {
}
}
var truncateErr error
// Check member count after deduplication.
// Check member numbers after deduplication.
if len(b) > maxMembers {
truncateErr = errors.Join(truncateErr, errMemberNumber)
for k := range b {
if len(b) <= maxMembers {
break
}
delete(b, k)
}
return Baggage{}, errMemberNumber
}
// Check byte size and drop members if necessary.
totalBytes := 0
first := true
for k := range b {
m := Member{
key: k,
value: b[k].Value,
properties: fromInternalProperties(b[k].Properties),
}
memberSize := len(m.String())
if !first {
memberSize++ // comma separator
}
if totalBytes+memberSize > maxBytesPerBaggageString {
truncateErr = errors.Join(truncateErr, fmt.Errorf("%w: %d", errBaggageBytes, totalBytes+memberSize))
delete(b, k)
continue
}
totalBytes += memberSize
first = false
bag := Baggage{b}
if n := len(bag.String()); n > maxBytesPerBaggageString {
return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n)
}
return Baggage{b}, truncateErr
return bag, nil
}
// Parse attempts to decode a baggage-string from the passed string. It
@@ -492,71 +470,36 @@ func New(members ...Member) (Baggage, error) {
// defined (reading left-to-right) will be the only one kept. This diverges
// from the W3C Baggage specification which allows duplicate list-members, but
// conforms to the OpenTelemetry Baggage specification.
//
// If the baggage-string exceeds the maximum allowed members (64) or bytes
// (8192), members are dropped until the limits are satisfied and an error is
// returned along with the partial result.
//
// Invalid members are skipped and the error is returned along with the
// partial result containing the valid members.
func Parse(bStr string) (Baggage, error) {
if bStr == "" {
return Baggage{}, nil
}
b := make(baggage.List)
sizes := make(map[string]int) // Track per-key byte sizes
var totalBytes int
var truncateErr error
for memberStr := range strings.SplitSeq(bStr, listDelimiter) {
// Check member count limit.
if len(b) >= maxMembers {
truncateErr = errors.Join(truncateErr, errMemberNumber)
break
}
if n := len(bStr); n > maxBytesPerBaggageString {
return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n)
}
b := make(baggage.List)
for memberStr := range strings.SplitSeq(bStr, listDelimiter) {
m, err := parseMember(memberStr)
if err != nil {
truncateErr = errors.Join(truncateErr, err)
continue // skip invalid member, keep processing
return Baggage{}, err
}
// Check byte size limit.
// Account for comma separator between members.
memberBytes := len(m.String())
_, existingKey := b[m.key]
if !existingKey && len(b) > 0 {
memberBytes++ // comma separator only for new keys
}
// Calculate new totalBytes if we add/overwrite this key
var newTotalBytes int
if oldSize, exists := sizes[m.key]; exists {
// Overwriting existing key: subtract old size, add new size
newTotalBytes = totalBytes - oldSize + memberBytes
} else {
// New key
newTotalBytes = totalBytes + memberBytes
}
if newTotalBytes > maxBytesPerBaggageString {
truncateErr = errors.Join(truncateErr, errBaggageBytes)
break
}
// OpenTelemetry resolves duplicates by last-one-wins.
b[m.key] = baggage.Item{
Value: m.value,
Properties: m.properties.asInternal(),
}
sizes[m.key] = memberBytes
totalBytes = newTotalBytes
}
if len(b) == 0 {
return Baggage{}, truncateErr
// OpenTelemetry does not allow for duplicate list-members, but the W3C
// specification does. Now that we have deduplicated, ensure the baggage
// does not exceed list-member limits.
if len(b) > maxMembers {
return Baggage{}, errMemberNumber
}
return Baggage{b}, truncateErr
return Baggage{b}, nil
}
// Member returns the baggage list-member identified by key.
+1 -1
View File
@@ -1,4 +1,4 @@
# This is a renovate-friendly source of Docker images.
FROM python:3.13.6-slim-bullseye@sha256:e98b521460ee75bca92175c16247bdf7275637a8faaeb2bcfa19d879ae5c4b9a AS python
FROM otel/weaver:v0.22.1@sha256:33ae522ae4b71c1c562563c1d81f46aa0f79f088a0873199143a1f11ac30e5c9 AS weaver
FROM otel/weaver:v0.20.0@sha256:fa4f1c6954ecea78ab1a4e865bd6f5b4aaba80c1896f9f4a11e2c361d04e197e AS weaver
FROM avtodev/markdown-lint:v1@sha256:6aeedc2f49138ce7a1cd0adffc1b1c0321b841dc2102408967d9301c031949ee AS markdown
-96
View File
@@ -1,96 +0,0 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
// Package errorhandler provides the global error handler for OpenTelemetry.
//
// This package has no OTel dependencies, allowing it to be imported by any
// package in the module without creating import cycles.
package errorhandler // import "go.opentelemetry.io/otel/internal/errorhandler"
import (
"errors"
"log"
"sync"
"sync/atomic"
)
// ErrorHandler handles irremediable events.
type ErrorHandler interface {
// Handle handles any error deemed irremediable by an OpenTelemetry
// component.
Handle(error)
}
type ErrDelegator struct {
delegate atomic.Pointer[ErrorHandler]
}
// Compile-time check that delegator implements ErrorHandler.
var _ ErrorHandler = (*ErrDelegator)(nil)
func (d *ErrDelegator) Handle(err error) {
if eh := d.delegate.Load(); eh != nil {
(*eh).Handle(err)
return
}
log.Print(err)
}
// setDelegate sets the ErrorHandler delegate.
func (d *ErrDelegator) setDelegate(eh ErrorHandler) {
d.delegate.Store(&eh)
}
type errorHandlerHolder struct {
eh ErrorHandler
}
var (
globalErrorHandler = defaultErrorHandler()
delegateErrorHandlerOnce sync.Once
)
// GetErrorHandler returns the global ErrorHandler instance.
//
// The default ErrorHandler instance returned will log all errors to STDERR
// until an override ErrorHandler is set with SetErrorHandler. All
// ErrorHandler returned prior to this will automatically forward errors to
// the set instance instead of logging.
//
// Subsequent calls to SetErrorHandler after the first will not forward errors
// to the new ErrorHandler for prior returned instances.
func GetErrorHandler() ErrorHandler {
return globalErrorHandler.Load().(errorHandlerHolder).eh
}
// SetErrorHandler sets the global ErrorHandler to h.
//
// The first time this is called all ErrorHandler previously returned from
// GetErrorHandler will send errors to h instead of the default logging
// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not
// delegate errors to h.
func SetErrorHandler(h ErrorHandler) {
current := GetErrorHandler()
if _, cOk := current.(*ErrDelegator); cOk {
if _, ehOk := h.(*ErrDelegator); ehOk && current == h {
// Do not assign to the delegate of the default ErrDelegator to be
// itself.
log.Print(errors.New("no ErrorHandler delegate configured"), " ErrorHandler remains its current value.")
return
}
}
delegateErrorHandlerOnce.Do(func() {
if def, ok := current.(*ErrDelegator); ok {
def.setDelegate(h)
}
})
globalErrorHandler.Store(errorHandlerHolder{eh: h})
}
func defaultErrorHandler() *atomic.Value {
v := &atomic.Value{}
v.Store(errorHandlerHolder{eh: &ErrDelegator{}})
return v
}
+27 -7
View File
@@ -5,13 +5,33 @@
package global // import "go.opentelemetry.io/otel/internal/global"
import (
"go.opentelemetry.io/otel/internal/errorhandler"
"log"
"sync/atomic"
)
// ErrorHandler is an alias for errorhandler.ErrorHandler, kept for backward
// compatibility with existing callers of internal/global.
type ErrorHandler = errorhandler.ErrorHandler
// ErrorHandler handles irremediable events.
type ErrorHandler interface {
// Handle handles any error deemed irremediable by an OpenTelemetry
// component.
Handle(error)
}
// ErrDelegator is an alias for errorhandler.ErrDelegator, kept for backward
// compatibility with existing callers of internal/global.
type ErrDelegator = errorhandler.ErrDelegator
type ErrDelegator struct {
delegate atomic.Pointer[ErrorHandler]
}
// Compile-time check that delegator implements ErrorHandler.
var _ ErrorHandler = (*ErrDelegator)(nil)
func (d *ErrDelegator) Handle(err error) {
if eh := d.delegate.Load(); eh != nil {
(*eh).Handle(err)
return
}
log.Print(err)
}
// setDelegate sets the ErrorHandler delegate.
func (d *ErrDelegator) setDelegate(eh ErrorHandler) {
d.delegate.Store(&eh)
}
+33 -3
View File
@@ -8,13 +8,16 @@ import (
"sync"
"sync/atomic"
"go.opentelemetry.io/otel/internal/errorhandler"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
)
type (
errorHandlerHolder struct {
eh ErrorHandler
}
tracerProviderHolder struct {
tp trace.TracerProvider
}
@@ -29,10 +32,12 @@ type (
)
var (
globalErrorHandler = defaultErrorHandler()
globalTracer = defaultTracerValue()
globalPropagators = defaultPropagatorsValue()
globalMeterProvider = defaultMeterProvider()
delegateErrorHandlerOnce sync.Once
delegateTraceOnce sync.Once
delegateTextMapPropagatorOnce sync.Once
delegateMeterOnce sync.Once
@@ -48,7 +53,7 @@ var (
// Subsequent calls to SetErrorHandler after the first will not forward errors
// to the new ErrorHandler for prior returned instances.
func GetErrorHandler() ErrorHandler {
return errorhandler.GetErrorHandler()
return globalErrorHandler.Load().(errorHandlerHolder).eh
}
// SetErrorHandler sets the global ErrorHandler to h.
@@ -58,7 +63,26 @@ func GetErrorHandler() ErrorHandler {
// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not
// delegate errors to h.
func SetErrorHandler(h ErrorHandler) {
errorhandler.SetErrorHandler(h)
current := GetErrorHandler()
if _, cOk := current.(*ErrDelegator); cOk {
if _, ehOk := h.(*ErrDelegator); ehOk && current == h {
// Do not assign to the delegate of the default ErrDelegator to be
// itself.
Error(
errors.New("no ErrorHandler delegate configured"),
"ErrorHandler remains its current value.",
)
return
}
}
delegateErrorHandlerOnce.Do(func() {
if def, ok := current.(*ErrDelegator); ok {
def.setDelegate(h)
}
})
globalErrorHandler.Store(errorHandlerHolder{eh: h})
}
// TracerProvider is the internal implementation for global.TracerProvider.
@@ -150,6 +174,12 @@ func SetMeterProvider(mp metric.MeterProvider) {
globalMeterProvider.Store(meterProviderHolder{mp: mp})
}
func defaultErrorHandler() *atomic.Value {
v := &atomic.Value{}
v.Store(errorHandlerHolder{eh: &ErrDelegator{}})
return v
}
func defaultTracerValue() *atomic.Value {
v := &atomic.Value{}
v.Store(tracerProviderHolder{tp: &tracerProvider{}})
-3
View File
@@ -211,9 +211,6 @@ type Float64Observer interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Observe(value float64, options ...ObserveOption)
}
-3
View File
@@ -210,9 +210,6 @@ type Int64Observer interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Observe(value int64, options ...ObserveOption)
}
+1 -53
View File
@@ -30,9 +30,6 @@ type MeterProvider interface {
//
// If the name is empty, then an implementation defined default name will
// be used instead.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Meter(name string, opts ...MeterOption) Meter
}
@@ -54,9 +51,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Int64Counter(name string, options ...Int64CounterOption) (Int64Counter, error)
// Int64UpDownCounter returns a new Int64UpDownCounter instrument
@@ -67,9 +61,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Int64UpDownCounter(name string, options ...Int64UpDownCounterOption) (Int64UpDownCounter, error)
// Int64Histogram returns a new Int64Histogram instrument identified by
@@ -80,9 +71,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Int64Histogram(name string, options ...Int64HistogramOption) (Int64Histogram, error)
// Int64Gauge returns a new Int64Gauge instrument identified by name and
@@ -92,9 +80,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Int64Gauge(name string, options ...Int64GaugeOption) (Int64Gauge, error)
// Int64ObservableCounter returns a new Int64ObservableCounter identified
@@ -110,9 +95,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Int64ObservableCounter(name string, options ...Int64ObservableCounterOption) (Int64ObservableCounter, error)
// Int64ObservableUpDownCounter returns a new Int64ObservableUpDownCounter
@@ -128,9 +110,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Int64ObservableUpDownCounter(
name string,
options ...Int64ObservableUpDownCounterOption,
@@ -149,9 +128,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Int64ObservableGauge(name string, options ...Int64ObservableGaugeOption) (Int64ObservableGauge, error)
// Float64Counter returns a new Float64Counter instrument identified by
@@ -172,9 +148,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Float64UpDownCounter(name string, options ...Float64UpDownCounterOption) (Float64UpDownCounter, error)
// Float64Histogram returns a new Float64Histogram instrument identified by
@@ -185,9 +158,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Float64Histogram(name string, options ...Float64HistogramOption) (Float64Histogram, error)
// Float64Gauge returns a new Float64Gauge instrument identified by name and
@@ -197,9 +167,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Float64Gauge(name string, options ...Float64GaugeOption) (Float64Gauge, error)
// Float64ObservableCounter returns a new Float64ObservableCounter
@@ -215,9 +182,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Float64ObservableCounter(name string, options ...Float64ObservableCounterOption) (Float64ObservableCounter, error)
// Float64ObservableUpDownCounter returns a new
@@ -233,9 +197,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Float64ObservableUpDownCounter(
name string,
options ...Float64ObservableUpDownCounterOption,
@@ -254,9 +215,6 @@ type Meter interface {
// The name needs to conform to the OpenTelemetry instrument name syntax.
// See the Instrument Name section of the package documentation for more
// information.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Float64ObservableGauge(name string, options ...Float64ObservableGaugeOption) (Float64ObservableGauge, error)
// RegisterCallback registers f to be called during the collection of a
@@ -271,9 +229,6 @@ type Meter interface {
// If no instruments are passed, f should not be registered nor called
// during collection.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
//
// The function f needs to be concurrent safe.
RegisterCallback(f Callback, instruments ...Observable) (Registration, error)
}
@@ -308,15 +263,9 @@ type Observer interface {
embedded.Observer
// ObserveFloat64 records the float64 value for obsrv.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
ObserveFloat64(obsrv Float64Observable, value float64, opts ...ObserveOption)
// ObserveInt64 records the int64 value for obsrv.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
ObserveInt64(obsrv Int64Observable, value int64, opts ...ObserveOption)
}
@@ -334,7 +283,6 @@ type Registration interface {
// Unregister removes the callback registration from a Meter.
//
// Implementations of this method need to be idempotent and safe for a user
// to call concurrently.
// This method needs to be idempotent and concurrent safe.
Unregister() error
}
-24
View File
@@ -24,18 +24,12 @@ type Float64Counter interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Add(ctx context.Context, incr float64, options ...AddOption)
// Enabled reports whether the instrument will process measurements for the given context.
//
// This function can be used in places where measuring an instrument
// would result in computationally expensive operations.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Enabled(context.Context) bool
}
@@ -89,18 +83,12 @@ type Float64UpDownCounter interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Add(ctx context.Context, incr float64, options ...AddOption)
// Enabled reports whether the instrument will process measurements for the given context.
//
// This function can be used in places where measuring an instrument
// would result in computationally expensive operations.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Enabled(context.Context) bool
}
@@ -154,18 +142,12 @@ type Float64Histogram interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Record(ctx context.Context, incr float64, options ...RecordOption)
// Enabled reports whether the instrument will process measurements for the given context.
//
// This function can be used in places where measuring an instrument
// would result in computationally expensive operations.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Enabled(context.Context) bool
}
@@ -224,18 +206,12 @@ type Float64Gauge interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Record(ctx context.Context, value float64, options ...RecordOption)
// Enabled reports whether the instrument will process measurements for the given context.
//
// This function can be used in places where measuring an instrument
// would result in computationally expensive operations.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Enabled(context.Context) bool
}
-24
View File
@@ -24,18 +24,12 @@ type Int64Counter interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Add(ctx context.Context, incr int64, options ...AddOption)
// Enabled reports whether the instrument will process measurements for the given context.
//
// This function can be used in places where measuring an instrument
// would result in computationally expensive operations.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Enabled(context.Context) bool
}
@@ -89,18 +83,12 @@ type Int64UpDownCounter interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Add(ctx context.Context, incr int64, options ...AddOption)
// Enabled reports whether the instrument will process measurements for the given context.
//
// This function can be used in places where measuring an instrument
// would result in computationally expensive operations.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Enabled(context.Context) bool
}
@@ -154,18 +142,12 @@ type Int64Histogram interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Record(ctx context.Context, incr int64, options ...RecordOption)
// Enabled reports whether the instrument will process measurements for the given context.
//
// This function can be used in places where measuring an instrument
// would result in computationally expensive operations.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Enabled(context.Context) bool
}
@@ -224,18 +206,12 @@ type Int64Gauge interface {
//
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Record(ctx context.Context, value int64, options ...RecordOption)
// Enabled reports whether the instrument will process measurements for the given context.
//
// This function can be used in places where measuring an instrument
// would result in computationally expensive operations.
//
// Implementations of this method need to be safe for a user to call
// concurrently.
Enabled(context.Context) bool
}
+2 -22
View File
@@ -7,16 +7,9 @@ import (
"context"
"go.opentelemetry.io/otel/baggage"
"go.opentelemetry.io/otel/internal/errorhandler"
)
const (
baggageHeader = "baggage"
// W3C Baggage specification limits.
// https://www.w3.org/TR/baggage/#limits
maxMembers = 64
)
const baggageHeader = "baggage"
// Baggage is a propagator that supports the W3C Baggage format.
//
@@ -57,9 +50,6 @@ func extractSingleBaggage(parent context.Context, carrier TextMapCarrier) contex
bag, err := baggage.Parse(bStr)
if err != nil {
errorhandler.GetErrorHandler().Handle(err)
}
if bag.Len() == 0 {
return parent
}
return baggage.ContextWithBaggage(parent, bag)
@@ -70,27 +60,17 @@ func extractMultiBaggage(parent context.Context, carrier ValuesGetter) context.C
if len(bVals) == 0 {
return parent
}
var members []baggage.Member
for _, bStr := range bVals {
currBag, err := baggage.Parse(bStr)
if err != nil {
errorhandler.GetErrorHandler().Handle(err)
}
if currBag.Len() == 0 {
continue
}
members = append(members, currBag.Members()...)
if len(members) >= maxMembers {
break
}
}
b, err := baggage.New(members...)
if err != nil {
errorhandler.GetErrorHandler().Handle(err)
}
if b.Len() == 0 {
if err != nil || b.Len() == 0 {
return parent
}
return baggage.ContextWithBaggage(parent, b)
+7 -6
View File
@@ -46,8 +46,8 @@ func (TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) {
carrier.Set(tracestateHeader, ts)
}
// Preserve only the spec-defined flags: sampled (0x01) and random (0x02).
flags := sc.TraceFlags() & (trace.FlagsSampled | trace.FlagsRandom)
// Clear all flags other than the trace-context supported sampling bit.
flags := sc.TraceFlags() & trace.FlagsSampled
var sb strings.Builder
sb.Grow(2 + 32 + 16 + 2 + 3)
@@ -104,13 +104,14 @@ func (TraceContext) extract(carrier TextMapCarrier) trace.SpanContext {
if !extractPart(opts[:], &h, 2) {
return trace.SpanContext{}
}
if version == 0 && (h != "" || opts[0] > 3) {
// version 0 does not allow extra fields or reserved flag bits.
if version == 0 && (h != "" || opts[0] > 2) {
// version 0 not allow extra
// version 0 not allow other flag
return trace.SpanContext{}
}
scc.TraceFlags = trace.TraceFlags(opts[0]) & //nolint:gosec // slice size already checked.
(trace.FlagsSampled | trace.FlagsRandom)
// Clear all flags other than the trace-context supported sampling bit.
scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled // nolint:gosec // slice size already checked.
// Ignore the error returned here. Failure to parse tracestate MUST NOT
// affect the parsing of traceparent according to the W3C tracecontext
+1 -1
View File
@@ -1 +1 @@
codespell==2.4.2
codespell==2.4.1
-15
View File
@@ -37,18 +37,3 @@ var Observability = newFeature(
return "", false
},
)
// PerSeriesStartTimestamps is an experimental feature flag that determines if the SDK
// uses the new Start Timestamps specification.
//
// To enable this feature set the OTEL_GO_X_PER_SERIES_START_TIMESTAMPS environment variable
// to the case-insensitive string value of "true".
var PerSeriesStartTimestamps = newFeature(
[]string{"PER_SERIES_START_TIMESTAMPS"},
func(v string) (bool, bool) {
if strings.EqualFold(v, "true") {
return true, true
}
return false, false
},
)
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
)
type (
-8
View File
@@ -193,11 +193,3 @@ func WithContainer() Option {
func WithContainerID() Option {
return WithDetectors(cgroupContainerIDDetector{})
}
// WithService adds all the Service attributes to the configured Resource.
func WithService() Option {
return WithDetectors(
defaultServiceInstanceIDDetector{},
defaultServiceNameDetector{},
)
}
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"os"
"regexp"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
)
type containerIDProvider func() (string, error)
+1 -1
View File
@@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
)
const (
+6 -6
View File
@@ -8,7 +8,7 @@ import (
"errors"
"strings"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
)
type hostIDProvider func() (string, error)
@@ -31,19 +31,19 @@ type hostIDReaderBSD struct {
readFile fileReader
}
// read attempts to read the machine-id from /etc/hostid.
// If not found it will execute: /bin/kenv -q smbios.system.uuid.
// If neither location yields an id an error will be returned.
// read attempts to read the machine-id from /etc/hostid. If not found it will
// execute `kenv -q smbios.system.uuid`. If neither location yields an id an
// error will be returned.
func (r *hostIDReaderBSD) read() (string, error) {
if result, err := r.readFile("/etc/hostid"); err == nil {
return strings.TrimSpace(result), nil
}
if result, err := r.execCommand("/bin/kenv", "-q", "smbios.system.uuid"); err == nil {
if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid"); err == nil {
return strings.TrimSpace(result), nil
}
return "", errors.New("host id not found in: /etc/hostid or /bin/kenv")
return "", errors.New("host id not found in: /etc/hostid or kenv")
}
// hostIDReaderDarwin implements hostIDReader.
+1 -1
View File
@@ -8,7 +8,7 @@ package resource // import "go.opentelemetry.io/otel/sdk/resource"
import "os"
func readFile(filename string) (string, error) {
b, err := os.ReadFile(filename) // nolint:gosec // false positive
b, err := os.ReadFile(filename)
if err != nil {
return "", err
}
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"strings"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
)
type osDescriptionProvider func() (string, error)
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"path/filepath"
"runtime"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
)
type (
+2 -17
View File
@@ -232,15 +232,6 @@ func Empty() *Resource {
// Default returns an instance of Resource with a default
// "service.name" and OpenTelemetrySDK attributes.
func Default() *Resource {
return DefaultWithContext(context.Background())
}
// DefaultWithContext returns an instance of Resource with a default
// "service.name" and OpenTelemetrySDK attributes.
//
// If the default resource has already been initialized, the provided ctx
// is ignored and the cached resource is returned.
func DefaultWithContext(ctx context.Context) *Resource {
defaultResourceOnce.Do(func() {
var err error
defaultDetectors := []Detector{
@@ -252,7 +243,7 @@ func DefaultWithContext(ctx context.Context) *Resource {
defaultDetectors = append([]Detector{defaultServiceInstanceIDDetector{}}, defaultDetectors...)
}
defaultResource, err = Detect(
ctx,
context.Background(),
defaultDetectors...,
)
if err != nil {
@@ -269,14 +260,8 @@ func DefaultWithContext(ctx context.Context) *Resource {
// Environment returns an instance of Resource with attributes
// extracted from the OTEL_RESOURCE_ATTRIBUTES environment variable.
func Environment() *Resource {
return EnvironmentWithContext(context.Background())
}
// EnvironmentWithContext returns an instance of Resource with attributes
// extracted from the OTEL_RESOURCE_ATTRIBUTES environment variable.
func EnvironmentWithContext(ctx context.Context) *Resource {
detector := &fromEnv{}
resource, err := detector.Detect(ctx)
resource, err := detector.Detect(context.Background())
if err != nil {
otel.Handle(err)
}
+7 -5
View File
@@ -68,7 +68,7 @@ type batchSpanProcessor struct {
o BatchSpanProcessorOptions
queue chan ReadOnlySpan
dropped atomic.Uint32
dropped uint32
inst *observ.BSP
@@ -123,10 +123,12 @@ func NewBatchSpanProcessor(exporter SpanExporter, options ...BatchSpanProcessorO
otel.Handle(err)
}
bsp.stopWait.Go(func() {
bsp.stopWait.Add(1)
go func() {
defer bsp.stopWait.Done()
bsp.processQueue()
bsp.drainQueue()
})
}()
return bsp
}
@@ -293,7 +295,7 @@ func (bsp *batchSpanProcessor) exportSpans(ctx context.Context) error {
}
if l := len(bsp.batch); l > 0 {
global.Debug("exporting spans", "count", len(bsp.batch), "total_dropped", bsp.dropped.Load())
global.Debug("exporting spans", "count", len(bsp.batch), "total_dropped", atomic.LoadUint32(&bsp.dropped))
if bsp.inst != nil {
bsp.inst.Processed(ctx, int64(l))
}
@@ -421,7 +423,7 @@ func (bsp *batchSpanProcessor) enqueueDrop(ctx context.Context, sd ReadOnlySpan)
case bsp.queue <- sd:
return true
default:
bsp.dropped.Add(1)
atomic.AddUint32(&bsp.dropped, 1)
if bsp.inst != nil {
bsp.inst.ProcessedQueueFull(ctx, 1)
}
@@ -13,8 +13,8 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
"go.opentelemetry.io/otel/semconv/v1.40.0/otelconv"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
"go.opentelemetry.io/otel/semconv/v1.39.0/otelconv"
)
const (
@@ -13,8 +13,8 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
"go.opentelemetry.io/otel/semconv/v1.40.0/otelconv"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
"go.opentelemetry.io/otel/semconv/v1.39.0/otelconv"
)
var measureAttrsPool = sync.Pool{
+1 -9
View File
@@ -13,7 +13,7 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
"go.opentelemetry.io/otel/semconv/v1.40.0/otelconv"
"go.opentelemetry.io/otel/semconv/v1.39.0/otelconv"
"go.opentelemetry.io/otel/trace"
)
@@ -55,10 +55,6 @@ func NewTracer() (Tracer, error) {
func (t Tracer) Enabled() bool { return t.enabled }
func (t Tracer) SpanStarted(ctx context.Context, psc trace.SpanContext, span trace.Span) {
if !t.started.Enabled(ctx) {
return
}
key := spanStartedKey{
parent: parentStateNoParent,
sampling: samplingStateDrop,
@@ -93,10 +89,6 @@ func (t Tracer) SpanEnded(ctx context.Context, span trace.Span) {
}
func (t Tracer) spanLive(ctx context.Context, value int64, span trace.Span) {
if !t.live.Enabled(ctx) {
return
}
key := spanLiveKey{sampled: span.SpanContext().IsSampled()}
opts := spanLiveOpts[key]
t.live.Add(ctx, value, opts...)
+12 -5
View File
@@ -5,7 +5,6 @@ package trace // import "go.opentelemetry.io/otel/sdk/trace"
import (
"context"
"errors"
"fmt"
"sync"
"sync/atomic"
@@ -263,7 +262,6 @@ func (p *TracerProvider) ForceFlush(ctx context.Context) error {
return nil
}
var err error
for _, sps := range spss {
select {
case <-ctx.Done():
@@ -271,9 +269,11 @@ func (p *TracerProvider) ForceFlush(ctx context.Context) error {
default:
}
err = errors.Join(err, sps.sp.ForceFlush(ctx))
if err := sps.sp.ForceFlush(ctx); err != nil {
return err
}
}
return err
return nil
}
// Shutdown shuts down TracerProvider. All registered span processors are shut down
@@ -303,7 +303,14 @@ func (p *TracerProvider) Shutdown(ctx context.Context) error {
sps.state.Do(func() {
err = sps.sp.Shutdown(ctx)
})
retErr = errors.Join(retErr, err)
if err != nil {
if retErr == nil {
retErr = err
} else {
// Poor man's list of errors
retErr = fmt.Errorf("%w; %w", retErr, err)
}
}
}
p.spanProcessors.Store(&spanProcessorStates{})
return retErr
+5 -31
View File
@@ -69,17 +69,17 @@ type traceIDRatioSampler struct {
}
func (ts traceIDRatioSampler) ShouldSample(p SamplingParameters) SamplingResult {
state := trace.SpanContextFromContext(p.ParentContext).TraceState()
psc := trace.SpanContextFromContext(p.ParentContext)
x := binary.BigEndian.Uint64(p.TraceID[8:16]) >> 1
if x < ts.traceIDUpperBound {
return SamplingResult{
Decision: RecordAndSample,
Tracestate: state,
Tracestate: psc.TraceState(),
}
}
return SamplingResult{
Decision: Drop,
Tracestate: state,
Tracestate: psc.TraceState(),
}
}
@@ -94,20 +94,12 @@ func (ts traceIDRatioSampler) Description() string {
//
//nolint:revive // revive complains about stutter of `trace.TraceIDRatioBased`
func TraceIDRatioBased(fraction float64) Sampler {
// Cannot use AlwaysSample() and NeverSample(), must return spec-compliant descriptions.
// See https://opentelemetry.io/docs/specs/otel/trace/sdk/#traceidratiobased.
if fraction >= 1 {
return predeterminedSampler{
description: "TraceIDRatioBased{1}",
decision: RecordAndSample,
}
return AlwaysSample()
}
if fraction <= 0 {
return predeterminedSampler{
description: "TraceIDRatioBased{0}",
decision: Drop,
}
fraction = 0
}
return &traceIDRatioSampler{
@@ -126,7 +118,6 @@ func (alwaysOnSampler) ShouldSample(p SamplingParameters) SamplingResult {
}
func (alwaysOnSampler) Description() string {
// https://opentelemetry.io/docs/specs/otel/trace/sdk/#alwayson
return "AlwaysOnSampler"
}
@@ -148,7 +139,6 @@ func (alwaysOffSampler) ShouldSample(p SamplingParameters) SamplingResult {
}
func (alwaysOffSampler) Description() string {
// https://opentelemetry.io/docs/specs/otel/trace/sdk/#alwaysoff
return "AlwaysOffSampler"
}
@@ -157,22 +147,6 @@ func NeverSample() Sampler {
return alwaysOffSampler{}
}
type predeterminedSampler struct {
description string
decision SamplingDecision
}
func (s predeterminedSampler) ShouldSample(p SamplingParameters) SamplingResult {
return SamplingResult{
Decision: s.decision,
Tracestate: trace.SpanContextFromContext(p.ParentContext).TraceState(),
}
}
func (s predeterminedSampler) Description() string {
return s.description
}
// ParentBased returns a sampler decorator which behaves differently,
// based on the parent of the span. If the span has no parent,
// the decorated sampler is used to make sampling decision. If the span has
+1 -1
View File
@@ -20,7 +20,7 @@ import (
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/embedded"
)
+1 -1
View File
@@ -6,5 +6,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk"
// Version is the current release version of the OpenTelemetry SDK in use.
func Version() string {
return "1.43.0"
return "1.40.0"
}
+6 -18
View File
@@ -149,9 +149,7 @@ func (m ClientCallDuration) Record(
attrs ...attribute.KeyValue,
) {
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("rpc.system.name", string(systemName)),
))
m.Float64Histogram.Record(ctx, val)
return
}
@@ -327,9 +325,7 @@ func (m ClientRequestSize) Record(
attrs ...attribute.KeyValue,
) {
if len(attrs) == 0 {
m.Int64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("rpc.system.name", string(systemName)),
))
m.Int64Histogram.Record(ctx, val)
return
}
@@ -504,9 +500,7 @@ func (m ClientResponseSize) Record(
attrs ...attribute.KeyValue,
) {
if len(attrs) == 0 {
m.Int64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("rpc.system.name", string(systemName)),
))
m.Int64Histogram.Record(ctx, val)
return
}
@@ -682,9 +676,7 @@ func (m ServerCallDuration) Record(
attrs ...attribute.KeyValue,
) {
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("rpc.system.name", string(systemName)),
))
m.Float64Histogram.Record(ctx, val)
return
}
@@ -860,9 +852,7 @@ func (m ServerRequestSize) Record(
attrs ...attribute.KeyValue,
) {
if len(attrs) == 0 {
m.Int64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("rpc.system.name", string(systemName)),
))
m.Int64Histogram.Record(ctx, val)
return
}
@@ -1037,9 +1027,7 @@ func (m ServerResponseSize) Record(
attrs ...attribute.KeyValue,
) {
if len(attrs) == 0 {
m.Int64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("rpc.system.name", string(systemName)),
))
m.Int64Histogram.Record(ctx, val)
return
}
-27
View File
@@ -1,27 +0,0 @@
<!-- Generated. DO NOT MODIFY. -->
# Migration from v1.39.0 to v1.40.0
The `go.opentelemetry.io/otel/semconv/v1.40.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.39.0` with the following exceptions.
## Removed
The following declarations have been removed.
Refer to the [OpenTelemetry Semantic Conventions documentation] for deprecation instructions.
If the type is not listed in the documentation as deprecated, it has been removed in this version due to lack of applicability or use.
If you use any of these non-deprecated declarations in your Go application, please [open an issue] describing your use-case.
- `ErrorMessage`
- `ErrorMessageKey`
- `RPCMessageCompressedSize`
- `RPCMessageCompressedSizeKey`
- `RPCMessageID`
- `RPCMessageIDKey`
- `RPCMessageTypeKey`
- `RPCMessageTypeReceived`
- `RPCMessageTypeSent`
- `RPCMessageUncompressedSize`
- `RPCMessageUncompressedSizeKey`
[OpenTelemetry Semantic Conventions documentation]: https://github.com/open-telemetry/semantic-conventions
[open an issue]: https://github.com/open-telemetry/opentelemetry-go/issues/new?template=Blank+issue
-3
View File
@@ -1,3 +0,0 @@
# Semconv v1.40.0
[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.40.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.40.0)
File diff suppressed because it is too large. Load diff
-9
View File
@@ -1,9 +0,0 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
// Package semconv implements OpenTelemetry semantic conventions.
//
// OpenTelemetry semantic conventions are agreed standardized naming
// patterns for OpenTelemetry things. This package represents the v1.40.0
// version of the OpenTelemetry semantic conventions.
package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
-66
View File
@@ -1,66 +0,0 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
import (
"errors"
"reflect"
"go.opentelemetry.io/otel/attribute"
)
// ErrorType returns an [attribute.KeyValue] identifying the error type of err.
//
// If err is nil, the returned attribute has the default value
// [ErrorTypeOther].
//
// If err or one of the errors in its chain has the method
//
// ErrorType() string
//
// the returned attribute has that method's return value. If multiple errors in
// the chain implement this method, the value from the first match found by
// [errors.As] is used. Otherwise, the returned attribute has a value derived
// from the concrete type of err.
//
// The key of the returned attribute is [ErrorTypeKey].
func ErrorType(err error) attribute.KeyValue {
if err == nil {
return ErrorTypeOther
}
return ErrorTypeKey.String(errorType(err))
}
func errorType(err error) string {
var s string
if et, ok := err.(interface{ ErrorType() string }); ok {
// Fast path: check the top-level error first.
s = et.ErrorType()
} else {
// Fallback: search the error chain for an ErrorType method.
var et interface{ ErrorType() string }
if errors.As(err, &et) {
// Prioritize the ErrorType method if available.
s = et.ErrorType()
}
}
if s == "" {
// Fallback to reflection if the ErrorType method is not supported or
// returns an empty value.
t := reflect.TypeOf(err)
pkg, name := t.PkgPath(), t.Name()
if pkg != "" && name != "" {
s = pkg + "." + name
} else {
// The type has no package path or name (predeclared, not-defined,
// or alias for a not-defined type).
//
// This is not guaranteed to be unique, but is a best effort.
s = t.String()
}
}
return s
}
-9
View File
@@ -1,9 +0,0 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
const (
// ExceptionEventName is the name of the Span event representing an exception.
ExceptionEventName = "exception"
)
File diff suppressed because it is too large. Load diff
-9
View File
@@ -1,9 +0,0 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
// SchemaURL is the schema URL that matches the version of the semantic conventions
// that this package defines. Semconv packages starting from v1.4.0 must declare
// non-empty schema URL in the form https://opentelemetry.io/schemas/<version>
const SchemaURL = "https://opentelemetry.io/schemas/1.40.0"
+1 -1
View File
@@ -20,7 +20,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
"go.opentelemetry.io/otel/trace/embedded"
"go.opentelemetry.io/otel/trace/internal/telemetry"
)
-24
View File
@@ -12,11 +12,6 @@ const (
// with the sampling bit set means the span is sampled.
FlagsSampled = TraceFlags(0x01)
// FlagsRandom is a bitmask with the random trace ID flag set. When
// set, it signals that the trace ID was generated randomly with at
// least 56 bits of randomness (W3C Trace Context Level 2).
FlagsRandom = TraceFlags(0x02)
errInvalidHexID errorConst = "trace-id and span-id can only contain [0-9a-f] characters, all lowercase"
errInvalidTraceIDLength errorConst = "hex encoded trace-id must have length equals to 32"
@@ -196,20 +191,6 @@ func (tf TraceFlags) WithSampled(sampled bool) TraceFlags { // nolint:revive //
return tf &^ FlagsSampled
}
// IsRandom reports whether the random bit is set in the TraceFlags.
func (tf TraceFlags) IsRandom() bool {
return tf&FlagsRandom == FlagsRandom
}
// WithRandom sets the random bit in a new copy of the TraceFlags.
func (tf TraceFlags) WithRandom(random bool) TraceFlags { // nolint:revive // random is not a control flag.
if random {
return tf | FlagsRandom
}
return tf &^ FlagsRandom
}
// MarshalJSON implements a custom marshal function to encode TraceFlags
// as a hex string.
func (tf TraceFlags) MarshalJSON() ([]byte, error) {
@@ -336,11 +317,6 @@ func (sc SpanContext) IsSampled() bool {
return sc.traceFlags.IsSampled()
}
// IsRandom reports whether the random bit is set in the SpanContext's TraceFlags.
func (sc SpanContext) IsRandom() bool {
return sc.traceFlags.IsRandom()
}
// WithTraceFlags returns a new SpanContext with the TraceFlags replaced.
func (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext {
return SpanContext{
+3 -6
View File
@@ -61,10 +61,7 @@ func checkValue(val string) bool {
func checkKeyRemain(key string) bool {
// ( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )
for _, v := range key {
if v > 127 {
return false
}
if isAlphaNumASCII(v) {
if isAlphaNum(byte(v)) {
continue
}
switch v {
@@ -92,7 +89,7 @@ func checkKeyPart(key string, n int) bool {
return ret && checkKeyRemain(key[1:])
}
func isAlphaNumASCII[T rune | byte](c T) bool {
func isAlphaNum(c byte) bool {
if c >= 'a' && c <= 'z' {
return true
}
@@ -108,7 +105,7 @@ func checkKeyTenant(key string, n int) bool {
if key == "" {
return false
}
return isAlphaNumASCII(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:])
return isAlphaNum(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:])
}
// based on the W3C Trace Context specification
+1 -1
View File
@@ -5,5 +5,5 @@ package otel // import "go.opentelemetry.io/otel"
// Version is the current release version of OpenTelemetry in use.
func Version() string {
return "1.43.0"
return "1.40.0"
}
+4 -7
View File
@@ -3,7 +3,7 @@
module-sets:
stable-v1:
version: v1.43.0
version: v1.40.0
modules:
- go.opentelemetry.io/otel
- go.opentelemetry.io/otel/bridge/opencensus
@@ -22,11 +22,11 @@ module-sets:
- go.opentelemetry.io/otel/sdk/metric
- go.opentelemetry.io/otel/trace
experimental-metrics:
version: v0.65.0
version: v0.62.0
modules:
- go.opentelemetry.io/otel/exporters/prometheus
experimental-logs:
version: v0.19.0
version: v0.16.0
modules:
- go.opentelemetry.io/otel/log
- go.opentelemetry.io/otel/log/logtest
@@ -36,7 +36,7 @@ module-sets:
- go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp
- go.opentelemetry.io/otel/exporters/stdout/stdoutlog
experimental-schema:
version: v0.0.16
version: v0.0.14
modules:
- go.opentelemetry.io/otel/schema
excluded-modules:
@@ -64,6 +64,3 @@ modules:
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp:
version-refs:
- ./internal/version.go
go.opentelemetry.io/otel/exporters/stdout/stdoutlog:
version-refs:
- ./internal/version.go
+10 -13
View File
@@ -529,13 +529,13 @@ github.com/go-git/go-git/v5/utils/trace
# github.com/go-ini/ini v1.67.0
## explicit
github.com/go-ini/ini
# github.com/go-jose/go-jose/v3 v3.0.5
# github.com/go-jose/go-jose/v3 v3.0.4
## explicit; go 1.12
github.com/go-jose/go-jose/v3
github.com/go-jose/go-jose/v3/cipher
github.com/go-jose/go-jose/v3/json
github.com/go-jose/go-jose/v3/jwt
# github.com/go-jose/go-jose/v4 v4.1.4
# github.com/go-jose/go-jose/v4 v4.1.3
## explicit; go 1.24.0
github.com/go-jose/go-jose/v4
github.com/go-jose/go-jose/v4/cipher
@@ -2153,8 +2153,8 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
## explicit; go 1.24.0
go.opentelemetry.io/contrib/zpages
go.opentelemetry.io/contrib/zpages/internal
# go.opentelemetry.io/otel v1.43.0
## explicit; go 1.25.0
# go.opentelemetry.io/otel v1.40.0
## explicit; go 1.24.0
go.opentelemetry.io/otel
go.opentelemetry.io/otel/attribute
go.opentelemetry.io/otel/attribute/internal
@@ -2162,7 +2162,6 @@ go.opentelemetry.io/otel/attribute/internal/xxhash
go.opentelemetry.io/otel/baggage
go.opentelemetry.io/otel/codes
go.opentelemetry.io/otel/internal/baggage
go.opentelemetry.io/otel/internal/errorhandler
go.opentelemetry.io/otel/internal/global
go.opentelemetry.io/otel/propagation
go.opentelemetry.io/otel/semconv/internal
@@ -2175,8 +2174,6 @@ go.opentelemetry.io/otel/semconv/v1.39.0
go.opentelemetry.io/otel/semconv/v1.39.0/otelconv
go.opentelemetry.io/otel/semconv/v1.39.0/rpcconv
go.opentelemetry.io/otel/semconv/v1.4.0
go.opentelemetry.io/otel/semconv/v1.40.0
go.opentelemetry.io/otel/semconv/v1.40.0/otelconv
# go.opentelemetry.io/otel/exporters/jaeger v1.17.0
## explicit; go 1.19
go.opentelemetry.io/otel/exporters/jaeger
@@ -2198,13 +2195,13 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x
# go.opentelemetry.io/otel/metric v1.43.0
## explicit; go 1.25.0
# go.opentelemetry.io/otel/metric v1.40.0
## explicit; go 1.24.0
go.opentelemetry.io/otel/metric
go.opentelemetry.io/otel/metric/embedded
go.opentelemetry.io/otel/metric/noop
# go.opentelemetry.io/otel/sdk v1.43.0
## explicit; go 1.25.0
# go.opentelemetry.io/otel/sdk v1.40.0
## explicit; go 1.24.0
go.opentelemetry.io/otel/sdk
go.opentelemetry.io/otel/sdk/instrumentation
go.opentelemetry.io/otel/sdk/internal/x
@@ -2212,8 +2209,8 @@ go.opentelemetry.io/otel/sdk/resource
go.opentelemetry.io/otel/sdk/trace
go.opentelemetry.io/otel/sdk/trace/internal/env
go.opentelemetry.io/otel/sdk/trace/internal/observ
# go.opentelemetry.io/otel/trace v1.43.0
## explicit; go 1.25.0
# go.opentelemetry.io/otel/trace v1.40.0
## explicit; go 1.24.0
go.opentelemetry.io/otel/trace
go.opentelemetry.io/otel/trace/embedded
go.opentelemetry.io/otel/trace/internal/telemetry