diff --git a/.clomonitor.yml b/.clomonitor.yml
new file mode 100644
index 00000000000..b5ccb7e3e6d
--- /dev/null
+++ b/.clomonitor.yml
@@ -0,0 +1,8 @@
+# see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions
+exemptions:
+ - check: artifacthub_badge
+ reason: "Artifact Hub doesn't support Java packages"
+ - check: signed_releases
+ reason: "Maven central releases are signed and there are no GitHub release artifacts"
+ - check: openssf_badge
+ reason: "ETOOMANYBADGES, but the work has been done: https://www.bestpractices.dev/projects/9991"
diff --git a/.codecov.yaml b/.codecov.yaml
index 3d9d63306b2..1a61103a0bc 100644
--- a/.codecov.yaml
+++ b/.codecov.yaml
@@ -11,17 +11,17 @@ coverage:
status:
project:
default:
- target: 90%
+ target: 89%
paths:
- "!opencensus-shim/"
- "!opentracing-shim/"
- - "!sdk-extensions/zpages/"
+ # exclude declarative config generated POJOs
+ - "!sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/"
unmaintained:
target: 80%
paths:
- "opencensus-shim/"
- "opentracing-shim/"
- - "sdk-extensions/zpages/"
patch:
default:
target: 80%
diff --git a/.editorconfig b/.editorconfig
index 0e0c24da729..3e9889f6c8b 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -3,7 +3,7 @@ charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
-insert_final_newline = false
+insert_final_newline = true
max_line_length = 100
tab_width = 2
ij_continuation_indent_size = 4
diff --git a/.fossa.yml b/.fossa.yml
new file mode 100644
index 00000000000..87c35f5bcae
--- /dev/null
+++ b/.fossa.yml
@@ -0,0 +1,40 @@
+version: 3
+
+targets:
+ only:
+ - type: gradle
+ exclude:
+ # these modules are not published and so consumers will not be exposed to them
+ - type: gradle
+ path: ./
+ target: ':api:testing-internal'
+ - type: gradle
+ path: ./
+ target: ':exporters:otlp:testing-internal'
+ - type: gradle
+ path: ./
+ target: ':integration-tests'
+ - type: gradle
+ path: ./
+ target: ':integration-tests:graal'
+ - type: gradle
+ path: ./
+ target: ':integration-tests:graal-incubating'
+ - type: gradle
+ path: ./
+ target: ':integration-tests:otlp'
+ - type: gradle
+ path: ./
+ target: ':integration-tests:tracecontext'
+ - type: gradle
+ path: ./
+ target: ':perf-harness'
+ - type: gradle
+ path: ./
+ target: ':testing-internal'
+
+experimental:
+ gradle:
+ configurations-only:
+ # consumer will only be exposed to these dependencies
+ - runtimeClasspath
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 5ce1713aee2..fcae66867e3 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,5 +1,6 @@
-# Code owners file.
-# This file controls who is tagged for review for any given pull request.
+#
+# Learn about membership in OpenTelemetry community:
+# https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md
+#
- # For anything not explicitly taken by someone else:
-* @anuraaga @jack-berg @jkwatson @jsuereth @kubawach @Oberon00
+* @open-telemetry/java-approvers
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 2190f784e40..1bafe4e7d71 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -25,10 +25,12 @@ Version: (e.g., `v0.4.0`, `1eb551b`, etc)
How did you reference these artifacts? (excerpt from your `build.gradle`, `pom.xml`, etc)
**Environment**
-Compiler: (e.g., "AdoptOpenJDK 11.0.6")
+Compiler: (e.g., "Temurin 17.0.7")
OS: (e.g., "Ubuntu 20.04")
Runtime (if different from JDK above): (e.g., "Oracle JRE 8u251")
OS (if different from OS compiled on): (e.g., "Windows Server 2019")
**Additional context**
Add any other context about the problem here.
+
+**Tip**: [React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with π to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 7b124ce80f0..d212bc8bedc 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -18,3 +18,5 @@ A clear and concise description of any alternative solutions or features you've
**Additional context**
Add any other context or screenshots about the feature request here.
+
+**Tip**: [React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with π to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).
diff --git a/.github/config/flint.toml b/.github/config/flint.toml
new file mode 100644
index 00000000000..d1d7d128746
--- /dev/null
+++ b/.github/config/flint.toml
@@ -0,0 +1,2 @@
+[checks.lychee]
+check_all_local = true
diff --git a/.github/config/lychee.toml b/.github/config/lychee.toml
new file mode 100644
index 00000000000..e10e9c1b403
--- /dev/null
+++ b/.github/config/lychee.toml
@@ -0,0 +1,22 @@
+# Lychee configuration file
+# See https://lychee.cli.rs/config/
+
+timeout = 30
+retry_wait_time = 5
+max_retries = 6
+max_concurrency = 4
+
+# Check link anchors. Lychee 0.24+ expects a mode string here.
+include_fragments = "full"
+
+# Type anchors are generated by JavaScript. Check the page without its fragment.
+remap = [
+ '^https://opentelemetry\.io/docs/specs/otel-config/types/#.*$ https://opentelemetry.io/docs/specs/otel-config/types/',
+]
+
+# excluding links to pull requests and issues is done for performance
+exclude = [
+ "^https://github.com/open-telemetry/opentelemetry-java/(issues|pull)/\\d+$",
+ "^https://www.javadoc.io/badge/(.*?)/(.*?).svg$", # returns 522
+ "^https://cloud-native.slack.com/", # slack requires auth
+]
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 123014908be..00000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "daily"
diff --git a/.github/renovate.json5 b/.github/renovate.json5
new file mode 100644
index 00000000000..d0d4e163a0b
--- /dev/null
+++ b/.github/renovate.json5
@@ -0,0 +1,221 @@
+{
+ $schema: 'https://docs.renovatebot.com/renovate-schema.json',
+ extends: [
+ 'config:best-practices',
+ 'helpers:pinGitHubActionDigestsToSemver',
+ ],
+ ignorePaths: [], // overwrite default ignore which includes **/test/**
+ // used to update docker image versions used in Java test files
+ packageRules: [
+
+ // ββ Scheduling & grouping ββββββββββββββββββββββββββββββββββββββββββ
+
+ {
+ // group all patch updates into a single weekly PR
+ groupName: 'all patch and minor versions',
+ matchUpdateTypes: [
+ 'patch',
+ 'minor',
+ ],
+ schedule: [
+ '* 0-7 * * 2', // weekly, before 8am on Tuesday
+ ],
+ },
+ {
+ // group GitHub Actions and dockerfile updates into a single weekly PR
+ // (must be after patch rule so that it wins for GH Action patches)
+ matchManagers: [
+ 'github-actions',
+ 'dockerfile',
+ ],
+ schedule: [
+ '* 0-7 * * 2', // weekly, before 8am on Tuesday
+ ],
+ groupName: 'weekly update',
+ },
+ {
+ // keep Kotlin Gradle plugin updates out of the catch-all patch PR because CodeQL often
+ // fails on them, which blocks unrelated patch updates
+ matchDepNames: [
+ 'org.jetbrains.kotlin.jvm',
+ 'org.jetbrains.kotlin:kotlin-gradle-plugin',
+ ],
+ schedule: [
+ '* 0-7 * * 2', // weekly, before 8am on Tuesday
+ ],
+ groupName: 'kotlin plugin updates',
+ },
+
+ // ββ Version constraints ββββββββββββββββββββββββββββββββββββββββββββ
+
+ {
+ matchPackageNames: [
+ 'io.opentelemetry.contrib:opentelemetry-aws-xray-propagator',
+ 'io.opentelemetry.proto:opentelemetry-proto',
+ 'io.opentelemetry.semconv:opentelemetry-semconv-incubating',
+ ],
+ // Renovate's default behavior is only to update from unstable -> unstable if it's for the
+ // major.minor.patch, under the assumption that you would want to update to the stable version
+ // of that release instead of the unstable version for a future release
+ // (TODO remove once the artifacts above release stable versions)
+ ignoreUnstable: false,
+ allowedVersions: '!/\\-SNAPSHOT$/',
+ },
+
+ // ββ Package family groups ββββββββββββββββββββββββββββββββββββββββββ
+
+ {
+ groupName: 'spotless packages',
+ matchPackageNames: [
+ 'com.diffplug.spotless',
+ 'com.diffplug.spotless:**',
+ ],
+ },
+ // Disable prometheus minor updates while working out translation strategy
+ // https://github.com/open-telemetry/opentelemetry-java/pull/8346
+ {
+ matchPackageNames: [
+ 'io.prometheus:**',
+ ],
+ matchUpdateTypes: [
+ 'minor',
+ ],
+ enabled: false,
+ },
+ // ββ Disabled updates (Java version compatibility) ββββββββββββββββββ
+ {
+ // junit 6+ requires Java 17+
+ matchPackageNames: [
+ 'org.junit:**',
+ 'org.junit.jupiter:**',
+ 'org.junit.platform:**',
+ ],
+ matchUpdateTypes: [
+ 'major',
+ ],
+ enabled: false,
+ },
+ {
+ // junit-pioneer 2+ requires Java 11+
+ matchPackageNames: [
+ 'org.junit-pioneer:junit-pioneer',
+ ],
+ matchUpdateTypes: [
+ 'major',
+ ],
+ enabled: false,
+ },
+ {
+ // mockito 5+ requires Java 11+
+ matchUpdateTypes: [
+ 'major',
+ ],
+ enabled: false,
+ matchPackageNames: [
+ 'org.mockito:**',
+ ],
+ },
+ {
+ // snakeyaml-engine 3+ requires Java 11+
+ matchUpdateTypes: [
+ 'major',
+ ],
+ enabled: false,
+ matchPackageNames: [
+ 'org.snakeyaml:snakeyaml-engine'
+ ],
+ },
+ {
+ // jqf-fuzz version 1.8+ requires Java 11+
+ matchPackageNames: [
+ 'edu.berkeley.cs.jqf:jqf-fuzz',
+ ],
+ matchUpdateTypes: [
+ 'major',
+ 'minor',
+ ],
+ enabled: false,
+ },
+ {
+ // pinned version for compatibility
+ matchPackageNames: [
+ 'org.jetbrains.kotlinx:kotlinx-coroutines-core',
+ ],
+ matchCurrentVersion: '1.5.2',
+ enabled: false,
+ },
+ {
+ // equalsverifier v4+ requires Java 17+
+ // https://github.com/jqno/equalsverifier/blob/HEAD/CHANGELOG.md#changed-13
+ matchPackageNames: ['nl.jqno.equalsverifier:equalsverifier'],
+ matchUpdateTypes: ['major'],
+ enabled: false,
+ },
+ {
+ // mockserver-netty 6+ requires Java 11+
+ matchPackageNames: ['org.mock-server:mockserver-netty'],
+ matchUpdateTypes: ['major'],
+ enabled: false,
+ },
+ ],
+ customDatasources: {
+ 'azul-zulu': {
+ // The Docker datasource scans thousands of tags and can hit Docker Hub rate limits.
+ // This filtered datasource returns only major versions for scalar Java markers.
+ defaultRegistryUrlTemplate: 'https://hub.docker.com/v2/repositories/library/azul-zulu/tags?page_size=100&name=-jdk-debian',
+ transformTemplates: [
+ '{"releases": results[$match(name, /^\\d+-jdk-debian$/)].{"version": $substringBefore(name, "-jdk-debian")}}',
+ ],
+ },
+ },
+ customManagers: [
+ {
+ // keep SHA-pinned raw.githubusercontent.com URLs in mise.toml up to date
+ customType: 'regex',
+ datasourceTemplate: 'github-tags',
+ managerFilePatterns: [
+ '/^mise\\.toml$/',
+ ],
+ matchStrings: [
+ 'https://raw\\.githubusercontent\\.com/(?[^/]+/[^/]+)/(?[a-f0-9]{40})/.*#\\s*(?v\\S+)',
+ ],
+ },
+ {
+ customType: 'regex',
+ datasourceTemplate: 'custom.azul-zulu',
+ managerFilePatterns: [
+ '.github/workflows/**',
+ ],
+ matchStrings: [
+ '(?\\d+) # renovate\\(java-version\\)',
+ ],
+ // Zulu publishes new feature releases quickly.
+ depNameTemplate: 'azul-zulu',
+ versioningTemplate: 'regex:^(?\\d+)$',
+ },
+ {
+ customType: 'regex',
+ datasourceTemplate: 'docker',
+ managerFilePatterns: [
+ '.github/workflows/**',
+ ],
+ matchStrings: [
+ '(?\\d+) # renovate\\(graal-java-version\\)',
+ ],
+ // gates updates on GraalVM Community actually publishing support for a Java version
+ depNameTemplate: 'ghcr.io/graalvm/graalvm-community',
+ },
+ {
+ customType: 'regex',
+ datasourceTemplate: 'docker',
+ managerFilePatterns: [
+ '**/*.java',
+ ],
+ matchStrings: [
+ '"(?otel/opentelemetry-collector-contrib):(?[^@"]+)(?:@(?sha256:[a-f0-9]+))?"',
+ ],
+ autoReplaceStringTemplate: '"{{depName}}:{{newValue}}{{#if newDigest}}@{{newDigest}}{{/if}}"',
+ versioningTemplate: 'docker',
+ },
+ ],
+}
diff --git a/.github/repository-settings.md b/.github/repository-settings.md
new file mode 100644
index 00000000000..74b3af521f6
--- /dev/null
+++ b/.github/repository-settings.md
@@ -0,0 +1,33 @@
+# Repository settings
+
+This document describes any changes that have been made to the
+settings in this repository outside the settings tracked in the
+private admin repo.
+
+
+## Environments
+
+### `protected` environment
+
+Deployment branches: `main`, `release/*`
+
+Secrets:
+
+- `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
+- `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
+- `SONATYPE_GUIDE_PAT` - owned by [@jack-berg](https://github.com/jack-berg)
+- `SONATYPE_KEY` - owned by [@jack-berg](https://github.com/jack-berg)
+- `SONATYPE_USER` - owned by [@jack-berg](https://github.com/jack-berg)
+
+## Secrets and variables > Actions
+
+### Organization secrets
+
+- `CODECOV_TOKEN`
+- `DEVELOCITY_ACCESS_KEY` (scoped only to Java repos)
+- `FOSSA_API_KEY`
+- `OTELBOT_PRIVATE_KEY`
+
+### Organization variables
+
+- `OTELBOT_APP_ID`
diff --git a/.github/scripts/draft-change-log-entries.sh b/.github/scripts/draft-change-log-entries.sh
new file mode 100755
index 00000000000..72e943b4f24
--- /dev/null
+++ b/.github/scripts/draft-change-log-entries.sh
@@ -0,0 +1,34 @@
+#!/bin/bash -e
+
+version=$("$(dirname "$0")/get-version.sh")
+
+if [[ $version =~ ([0-9]+)\.([0-9]+)\.0 ]]; then
+ major="${BASH_REMATCH[1]}"
+ minor="${BASH_REMATCH[2]}"
+else
+ echo "unexpected version: $version"
+ exit 1
+fi
+
+if [[ $minor == 0 ]]; then
+ prior_major=$((major - 1))
+ prior_minor=$(sed -n "s/^## Version $prior_major\.\([0-9]\+\)\..*/\1/p" CHANGELOG.md | head -1)
+ if [[ -z $prior_minor ]]; then
+ # assuming this is the first release
+ range=
+ else
+ range="v$prior_major.$prior_minor.0..HEAD"
+ fi
+else
+ range="v$major.$((minor - 1)).0..HEAD"
+fi
+
+echo "## Unreleased"
+echo
+
+git log --reverse \
+ --perl-regexp \
+ --author='^(?!renovate\[bot\] )' \
+ --pretty=format:"* %s" \
+ "$range" \
+ | sed -E 's,\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java/pull/\1)),'
diff --git a/.github/scripts/generate-release-contributors.sh b/.github/scripts/generate-release-contributors.sh
index c6526c8f3a0..c506447a323 100755
--- a/.github/scripts/generate-release-contributors.sh
+++ b/.github/scripts/generate-release-contributors.sh
@@ -1,14 +1,16 @@
#!/bin/bash -e
-# shellcheck disable=SC2016
-# shellcheck disable=SC2086
-
# this should be run on the release branch
+# NOTE if you need to run this script locally, you will need to first:
+# git fetch upstream main
+# git push origin upstream/main:main
+# export GITHUB_REPOSITORY=open-telemetry/opentelemetry-java
+
from_version=$1
# get the date of the first commit that was not in the from_version
-from=$(git log --reverse --pretty=format:"%cI" $from_version..HEAD | head -1)
+from=$(git log --reverse --pretty=format:"%cI" "$from_version..HEAD" | head -1)
# get the last commit on main that was included in the release
to=$(git merge-base origin/main HEAD | xargs git log -1 --pretty=format:"%cI")
@@ -50,6 +52,8 @@ query($q: String!, $endCursor: String) {
# this query captures authors of issues which have had PRs in the current range reference the issue
# but not necessarily through closingIssuesReferences (e.g. addressing just a part of an issue)
+#
+# note: [^0-9<] below excludes HTML entity markers to avoid matching Ӓ as issue #1234
contributors2=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query='
query($q: String!, $endCursor: String) {
search(query: $q, type: ISSUE, first: 100, after: $endCursor) {
@@ -67,18 +71,22 @@ query($q: String!, $endCursor: String) {
}
}
' --jq '.data.search.edges.[].node.body' \
- | grep -oE "#[0-9]{4,}|$GITHUB_REPOSITORY/issues/[0-9]{4,}" \
- | grep -oE "[0-9]{4,}" \
+ | grep -oE "#[0-9]{3,}$|#[0-9]{3,}[^0-9<]|$GITHUB_REPOSITORY/issues/[0-9]{3,}" \
+ | grep -oE "[0-9]{3,}" \
| xargs -I{} gh issue view {} --json 'author,url' --jq '[.author.login,.url]' \
| grep -v '/pull/' \
| sed 's/^\["//' \
| sed 's/".*//')
-echo $contributors1 $contributors2 \
+echo "$contributors1" "$contributors2" \
| sed 's/ /\n/g' \
| sort -uf \
- | grep -v linux-foundation-easycla \
- | grep -v github-actions \
- | grep -v dependabot \
| grep -v codecov \
+ | grep -v copilot-pull-request-reviewer \
+ | grep -v copilot-swe-agent \
+ | grep -v github-actions \
+ | grep -v github-advanced-security \
+ | grep -v linux-foundation-easycla \
+ | grep -v otelbot \
+ | grep -v renovate \
| sed 's/^/@/'
diff --git a/.github/scripts/get-prior-version.sh b/.github/scripts/get-prior-version.sh
new file mode 100755
index 00000000000..ca4987f09ac
--- /dev/null
+++ b/.github/scripts/get-prior-version.sh
@@ -0,0 +1,22 @@
+version=$(.github/scripts/get-version.sh)
+if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
+ major="${BASH_REMATCH[1]}"
+ minor="${BASH_REMATCH[2]}"
+ patch="${BASH_REMATCH[3]}"
+else
+ echo "unexpected version: $version"
+ exit 1
+fi
+if [[ $patch == 0 ]]; then
+ if [[ $minor == 0 ]]; then
+ prior_major=$((major - 1))
+ prior_minor=$(grep -Po "^## Version $prior_major.\K[0-9]+" CHANGELOG.md | head -1)
+ prior_version="$prior_major.$prior_minor"
+ else
+ prior_version="$major.$((minor - 1)).0"
+ fi
+else
+ prior_version="$major.$minor.$((patch - 1))"
+fi
+
+echo $prior_version
diff --git a/.github/scripts/get-version.sh b/.github/scripts/get-version.sh
index e4863e93e32..3efbd7754ec 100755
--- a/.github/scripts/get-version.sh
+++ b/.github/scripts/get-version.sh
@@ -1,3 +1,3 @@
#!/bin/bash -e
-grep -Eo "[0-9]+.[0-9]+.0" version.gradle.kts
+grep "var ver = " version.gradle.kts | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"
diff --git a/.github/scripts/markdown-link-check-config.json b/.github/scripts/markdown-link-check-config.json
deleted file mode 100644
index a458029d5d9..00000000000
--- a/.github/scripts/markdown-link-check-config.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "retryOn429": true,
- "aliveStatusCodes": [
- 200,
- 403
- ]
-}
diff --git a/.github/scripts/markdown-link-check-with-retry.sh b/.github/scripts/markdown-link-check-with-retry.sh
deleted file mode 100755
index 109146abfec..00000000000
--- a/.github/scripts/markdown-link-check-with-retry.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash -e
-
-# this script helps to reduce sporadic link check failures by retrying at a file-by-file level
-
-retry_count=3
-
-for file in "$@"; do
- for i in $(seq 1 $retry_count); do
- if markdown-link-check --config "$(dirname "$0")/markdown-link-check-config.json" \
- "$file"; then
- break
- elif [[ $i -eq $retry_count ]]; then
- exit 1
- fi
- sleep 5
- done
-done
diff --git a/.github/scripts/merge-change-log-after-release.sh b/.github/scripts/merge-change-log-after-release.sh
new file mode 100755
index 00000000000..1b95eeb8cb4
--- /dev/null
+++ b/.github/scripts/merge-change-log-after-release.sh
@@ -0,0 +1,44 @@
+#!/bin/bash -e
+
+# this script merges release notes for $VERSION into CHANGELOG.md
+# the release date for $VERSION should be available in $RELEASE_DATE
+# and the release notes for $VERSION should be available in /tmp/changelog-section.md
+
+if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.0 ]]; then
+ # this was not a patch release, so the version exists already in the CHANGELOG.md
+
+ # update the release date
+ sed -Ei "s/## Version $VERSION .*/## Version $VERSION ($RELEASE_DATE)/" CHANGELOG.md
+
+ # the entries are copied over from the release branch to support workflows
+ # where change log entries may be updated after preparing the release branch
+
+ {
+ # copy the portion above the release, up to and including the heading
+ sed -n "0,/^## Version $VERSION /p" CHANGELOG.md
+ # copy the release notes for $VERSION
+ cat /tmp/changelog-section.md
+ # copy the portion below the release
+ sed -n "0,/^## Version $VERSION /d;0,/^## Version /{/^## Version/!d};p" CHANGELOG.md
+ } > /tmp/CHANGELOG.md
+
+ # update the real CHANGELOG.md
+ cp /tmp/CHANGELOG.md CHANGELOG.md
+
+else
+ # this was a patch release, so the version does not exist already in the CHANGELOG.md
+
+ {
+ # copy the portion above the top-most release, not including the heading
+ sed -n "0,/^## Version /{ /^## Version /!p }" CHANGELOG.md
+ # add the heading
+ echo "## Version $VERSION ($RELEASE_DATE)"
+ # copy the release notes for $VERSION
+ cat /tmp/changelog-section.md
+ # copy the portion starting from the top-most release
+ sed -n "/^## Version /,\$p" CHANGELOG.md
+ } > /tmp/CHANGELOG.md
+
+ # update the real CHANGELOG.md
+ cp /tmp/CHANGELOG.md CHANGELOG.md
+fi
diff --git a/.github/scripts/set-git-user.sh b/.github/scripts/set-git-user.sh
deleted file mode 100755
index 17f2c07ad34..00000000000
--- a/.github/scripts/set-git-user.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash -e
-
-git config user.name opentelemetry-java-bot
-git config user.email 97938252+opentelemetry-java-bot@users.noreply.github.com
diff --git a/.github/scripts/update-version.sh b/.github/scripts/update-version.sh
new file mode 100755
index 00000000000..8d95cac9327
--- /dev/null
+++ b/.github/scripts/update-version.sh
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+version=$1
+versionWithSnapshot="$version-SNAPSHOT"
+
+sed -Ei "s/var ver = \"[^\"]*\"/var ver = \"$version\"/" version.gradle.kts
+
+sed -Ei "1 s/(Comparing source compatibility of [a-z-]+)-[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?.jar/\1-$versionWithSnapshot.jar/" docs/apidiffs/current_vs_latest/*.txt
diff --git a/.github/scripts/use-cla-approved-bot.sh b/.github/scripts/use-cla-approved-bot.sh
new file mode 100755
index 00000000000..149a13d9b93
--- /dev/null
+++ b/.github/scripts/use-cla-approved-bot.sh
@@ -0,0 +1,4 @@
+#!/bin/bash -e
+
+git config user.name otelbot
+git config user.email 197425009+otelbot@users.noreply.github.com
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
index 31c73b755cc..cf59e0de39e 100644
--- a/.github/workflows/backport.yml
+++ b/.github/workflows/backport.yml
@@ -6,33 +6,53 @@ on:
description: "The pull request # to backport"
required: true
+permissions:
+ contents: read
+
jobs:
backport:
+ permissions:
+ contents: write # for git push to PR branch
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - run: |
+ if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x$ ]]; then
+ echo this workflow should only be run against release branches
+ exit 1
+ fi
+
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# history is needed to run git cherry-pick below
fetch-depth: 0
+ # zizmor: ignore[artipacked] Credentials are required by the branch push below.
+ persist-credentials: true
- - name: Set git user
- run: .github/scripts/set-git-user.sh
+ - name: Use CLA approved github bot
+ run: .github/scripts/use-cla-approved-bot.sh
+
+ - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
+ id: otelbot-token
+ with:
+ client-id: ${{ vars.OTELBOT_CLIENT_ID }}
+ private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
+ permission-pull-requests: write
- name: Create pull request
env:
NUMBER: ${{ github.event.inputs.number }}
- # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows
- GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
+ # pull requests from secrets.GITHUB_TOKEN do not run workflows
+ GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid)
title=$(gh pr view $NUMBER --json title --jq .title)
- url=$(gh pr view $NUMBER --json url --jq .url)
- branch="backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
+ branch="otelbot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
+ git checkout -b $branch
git cherry-pick $commit
- git push origin HEAD:$branch
- gh pr create --title "[$GITHUB_REF_NAME] $title" \
- --body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
- --head $branch \
- --base $GITHUB_REF_NAME
+ git push --set-upstream origin $branch
+ gh pr create \
+ --title "[$GITHUB_REF_NAME] $title" \
+ --body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
+ --base $GITHUB_REF_NAME
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
new file mode 100644
index 00000000000..13315006df3
--- /dev/null
+++ b/.github/workflows/benchmark.yml
@@ -0,0 +1,81 @@
+name: Benchmark Main
+
+on:
+ push:
+ branches: [ main ]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ sdk-benchmark:
+ if: github.repository == 'open-telemetry/opentelemetry-java'
+ permissions:
+ contents: write # for git push to benchmarks branch
+ name: Benchmark SDK
+ runs-on: oracle-bare-metal-64cpu-1024gb-x86-64-ubuntu-24
+ container:
+ image: ubuntu:26.04@sha256:6a06111c3b0a8600feadb270aec771dc239bf407b25625f93f44ab00e11f4d3c
+ timeout-minutes: 120 # since there is only a single bare metal runner across all repos
+ steps:
+ - name: Install Git
+ run: |
+ apt-get update
+ apt-get install -y git
+
+ - name: Configure Git safe directory
+ run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
+
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - id: setup-java
+ name: Set up Java for build
+ uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
+ with:
+ distribution: temurin
+ java-version: 25
+
+ - name: Set up gradle
+ uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
+ with:
+ cache-read-only: true
+ - name: Run jmh
+ run: ./gradlew jmhJar
+ env:
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+
+ # TODO (jack-berg): Select or build appropriate benchmarks for other key areas:
+ # - Log SDK export
+ # - Trace SDK export
+ # - Metric SDK export
+ # - Noop implementation
+ - name: Run Benchmark
+ run: |
+ cd sdk/all/build
+ java -jar libs/opentelemetry-sdk-*-jmh.jar -rf json MetricRecordBenchmark SpanRecordBenchmark LogRecordBenchmark
+
+ - name: Use CLA approved github bot
+ run: .github/scripts/use-cla-approved-bot.sh
+
+ - name: Store benchmark results
+ uses: benchmark-action/github-action-benchmark@4322e5726e6334590d251fc4f92bec0efafc45dc # v1.22.2
+ with:
+ tool: 'jmh'
+ output-file-path: sdk/all/build/jmh-result.json
+ gh-pages-branch: benchmarks
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ benchmark-data-dir-path: "benchmarks"
+ auto-push: true
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - sdk-benchmark
+ if: always()
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: ${{ needs.sdk-benchmark.result == 'success' }}
diff --git a/.github/workflows/build-daily.yml b/.github/workflows/build-daily.yml
new file mode 100644
index 00000000000..bbfa3049019
--- /dev/null
+++ b/.github/workflows/build-daily.yml
@@ -0,0 +1,60 @@
+name: Build (daily)
+
+on:
+ schedule:
+ # daily at 3:24 UTC
+ - cron: "24 3 * * *"
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ link-check:
+ if: github.repository == 'open-telemetry/opentelemetry-java'
+ uses: $/.github/workflows/reusable-link-check.yml
+
+ publish-snapshots:
+ if: github.repository == 'open-telemetry/opentelemetry-java'
+ environment: protected
+ runs-on: ubuntu-26.04
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - name: Set up Java
+ uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
+ with:
+ distribution: temurin
+ java-version: 25
+
+ - name: Set up gradle
+ uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
+ with:
+ cache-read-only: true
+
+ - name: Publish to Sonatype
+ run: ./gradlew assemble publishToSonatype
+ env:
+ SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
+ SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
+ GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
+ GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
+ # disable gradle build cache, ensuring we're building from source to mitigate supply chain risk
+ DISABLE_REMOTE_BUILD_CACHE: true
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - link-check
+ - publish-snapshots
+ if: always()
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: >-
+ ${{
+ needs.link-check.result == 'success' &&
+ needs.publish-snapshots.result == 'success'
+ }}
diff --git a/.github/workflows/build-tracecontext-testsuite.yml b/.github/workflows/build-tracecontext-testsuite.yml
index 89c4410f037..617e8a8e472 100644
--- a/.github/workflows/build-tracecontext-testsuite.yml
+++ b/.github/workflows/build-tracecontext-testsuite.yml
@@ -9,22 +9,41 @@ on:
- main
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
publish:
+ if: github.repository == 'open-telemetry/opentelemetry-java'
+ permissions:
+ contents: read
+ packages: write
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
- name: Login to GitHub package registry
- uses: docker/login-action@v2
+ uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
- uses: docker/build-push-action@v3.0.0
+ uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: integration-tests/tracecontext/docker
push: true
tags: ghcr.io/open-telemetry/java-test-containers:w3c-tracecontext-testsuite
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - publish
+ if: always()
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: ${{ needs.publish.result == 'success' }}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ef961e9ca20..e6048ae7ff3 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,6 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
+permissions:
+ contents: read
+
jobs:
build:
name: Build
@@ -21,107 +24,141 @@ jobs:
matrix:
os:
- macos-latest
- - ubuntu-20.04
+ - ubuntu-latest
+ - windows-latest
test-java-version:
- 8
- 11
- 17
- - 18
+ - 21
+ - 25
+ # When this release becomes LTS, keep it and add the next feature release as the marked row.
+ - 27 # renovate(java-version)
# Collect coverage on latest LTS
include:
- - os: ubuntu-20.04
- test-java-version: 17
+ - os: ubuntu-latest
+ test-java-version: 25
coverage: true
+ jmh-based-tests: true
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
- fetch-depth: 0
+ persist-credentials: false
- id: setup-java-test
name: Set up Java ${{ matrix.test-java-version }} for tests
- uses: actions/setup-java@v3
+ uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
with:
- distribution: temurin
+ # Zulu publishes new feature releases quickly.
+ distribution: zulu
java-version: ${{ matrix.test-java-version }}
- id: setup-java
name: Set up Java for build
- uses: actions/setup-java@v3
+ uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
with:
distribution: temurin
- java-version: 17
+ java-version: 25
- - uses: gradle/gradle-build-action@v2
+ - name: Set up gradle
+ # zizmor: ignore[cache-poisoning] This tests release branches but does not
+ # publish release artifacts.
+ uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
with:
- arguments: |
- build
+ # Keep one writer per OS because Gradle User Home caches are platform-specific.
+ cache-read-only: ${{ github.ref_name != github.event.repository.default_branch || matrix.test-java-version != 25 }}
+ gradle-home-cache-excludes: >-
+ ${{ secrets.DEVELOCITY_ACCESS_KEY != '' && github.ref_name == github.event.repository.default_branch && matrix.test-java-version == 25 && 'caches/build-cache-1' || '' }}
+ - name: Build
+ shell: bash
+ run: >
+ ./gradlew build
${{ matrix.coverage && 'jacocoTestReport' || '' }}
-PtestJavaVersion=${{ matrix.test-java-version }}
- -Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }}
+ "-Porg.gradle.java.installations.paths=${TEST_JAVA_PATH}"
+ "-Porg.gradle.java.installations.auto-download=false"
+ env:
+ TEST_JAVA_PATH: ${{ steps.setup-java-test.outputs.path }}
+ # JMH-based tests run only if this environment variable is set to true
+ RUN_JMH_BASED_TESTS: ${{ matrix.jmh-based-tests }}
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+
+ - name: Check for diff
+ # The jApiCmp diff compares current to latest, which isn't appropriate for release branches
+ # this fails on windows because of the bash-specific if/then/else syntax, but that's ok
+ # because we only need to run this validation once (on any platform)
+ if: ${{ matrix.os != 'windows-latest' && !startsWith(github.ref_name, 'release/') && !startsWith(github.base_ref, 'release/') }}
+ run: |
+ # need to "git add" in case any generated files did not already exist
+ git add docs/apidiffs
+ if git diff --cached --quiet
+ then
+ echo "No diff detected."
+ else
+ echo "Diff detected - did you run './gradlew jApiCmp'?"
+ echo $(git diff --cached --name-only)
+ echo $(git diff --cached)
+ exit 1
+ fi
- - uses: codecov/codecov-action@v3
+ - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
if: ${{ matrix.coverage }}
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: ${{ matrix.coverage }}
with:
name: coverage-report
path: all/build/reports/jacoco/test/html
markdown-link-check:
- # release branches are excluded to avoid unnecessary maintenance if external links break
- if: ${{ !startsWith(github.ref_name, 'release/') }}
- uses: ./.github/workflows/reusable-markdown-link-check.yml
-
- misspell-check:
- # release branches are excluded to avoid unnecessary maintenance if new misspellings are added
- # to the misspell dictionary
+ # release branches are excluded to avoid unnecessary maintenance
if: ${{ !startsWith(github.ref_name, 'release/') }}
- uses: ./.github/workflows/reusable-misspell-check.yml
+ uses: $/.github/workflows/reusable-link-check.yml
- publish-snapshots:
- # the condition is on the steps below instead of here on the job, because skipping the job
- # causes the job to show up as canceled in the GitHub UI which prevents the build section from
- # collapsing when everything (else) is green
- #
- # and the name is updated when the steps below are skipped which makes what's happening clearer
- # in the GitHub UI
- name: publish-snapshots${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java' && '' || ' (skipped)' }}
- # intentionally not blocking snapshot publishing on markdown-link-check or misspell-check
- needs: build
- runs-on: ubuntu-20.04
+ build-graal:
+ name: Build GraalVM
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ test-graal-version:
+ - 21
+ - 25 # renovate(graal-java-version)
steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
-
- - id: setup-java
- name: Set up Java
- uses: actions/setup-java@v3
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
- distribution: temurin
- java-version: 17
-
- - uses: gradle/gradle-build-action@v2
- # skipping release branches because the versions in those branches are not snapshots
- # (also this skips pull requests)
- if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java' }}
+ persist-credentials: false
+ - uses: graalvm/setup-graalvm@f70bc8032f90a104502824a54bcb94b6f01715bc # v1.6.8
with:
- arguments: assemble publishToSonatype
+ java-version: ${{ matrix.test-graal-version }}
+ distribution: 'graalvm'
+ components: 'native-image'
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Running test
+ run: |
+ echo "GRAALVM_HOME: $GRAALVM_HOME"
+ echo "JAVA_HOME: $JAVA_HOME"
+ java --version
+ native-image --version
+ # Both flags required due to https://github.com/graalvm/native-build-tools/issues/477:
+ # --no-parallel prevents a race where the plugin's shared build service creates project-scoped
+ # detached configurations that are concurrently accessed during task fingerprinting.
+ # --no-configuration-cache prevents the cache store phase from adding additional concurrency.
+ ./gradlew nativeTest --no-configuration-cache --no-parallel
env:
- SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
- SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
- GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
required-status-check:
- # markdown-link-check is not required so that pull requests will not be blocked if external
- # links break
- # similarly misspell-check is not required so that pull requests will not be blocked if new
- # misspellings are added to the misspell dictionary
- needs: build
+ # markdown-link-check is not required so pull requests are not blocked if external links break
+ needs:
+ - build
+ - build-graal
runs-on: ubuntu-latest
if: always()
steps:
- - if: needs.build.result != 'success'
+ - if: |
+ needs.build.result != 'success' ||
+ needs.build-graal.result != 'success'
run: exit 1
diff --git a/.github/workflows/codeql-daily.yml b/.github/workflows/codeql-daily.yml
deleted file mode 100644
index bb1ef7afe51..00000000000
--- a/.github/workflows/codeql-daily.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: CodeQL (daily)
-
-on:
- schedule:
- - cron: '30 1 * * *'
- workflow_dispatch:
-
-jobs:
- analyze:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Set up Java 17
- uses: actions/setup-java@v3
- with:
- distribution: temurin
- java-version: 17
-
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: java
-
- - uses: gradle/gradle-build-action@v2
- with:
- # skipping build cache is needed so that all modules will be analyzed
- arguments: assemble --no-build-cache
-
- - name: Perform CodeQL analysis
- uses: github/codeql-action/analyze@v2
-
- open-issue-on-failure:
- # open an issue on failure because it can be easy to miss CI failure notifications
- needs: analyze
- if: failure()
- uses: ./.github/workflows/reusable-open-issue-on-failure.yml
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 00000000000..7aded5be302
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,83 @@
+name: CodeQL
+
+on:
+ pull_request:
+ branches:
+ - main
+ - release/*
+ - benchmarks
+ push:
+ branches:
+ - main
+ - release/*
+ - benchmarks
+ schedule:
+ - cron: "23 16 * * 2" # weekly at 16:23 UTC on Tuesday
+
+permissions:
+ contents: read
+
+jobs:
+ analyze:
+ permissions:
+ contents: read
+ actions: read # for github/codeql-action/init to get workflow details
+ security-events: write # for github/codeql-action/analyze to upload SARIF results
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - language: actions
+ - language: java
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - name: Set up Java
+ if: matrix.language == 'java'
+ uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
+ with:
+ distribution: temurin
+ java-version: 25
+
+ - name: Set up gradle
+ # zizmor: ignore[cache-poisoning] This workflow analyzes release branches
+ # but does not build or publish release artifacts.
+ if: matrix.language == 'java'
+ uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
+ with:
+ cache-read-only: true
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
+ with:
+ languages: ${{ matrix.language }}
+ # using "linked" helps to keep up with the latest Kotlin support
+ # see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
+ tools: linked
+
+ - name: Assemble
+ if: matrix.language == 'java'
+ # --no-build-cache is required for codeql to analyze all modules
+ # --no-daemon is required for codeql to observe the compilation
+ # (see https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#specifying-build-commands)
+ run: ./gradlew assemble --no-build-cache --no-daemon
+ env:
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+
+ - name: Perform CodeQL analysis
+ uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
+ with:
+ category: "/language:${{matrix.language}}"
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - analyze
+ if: always() && github.event_name == 'schedule'
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: ${{ needs.analyze.result == 'success' }}
diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml
new file mode 100644
index 00000000000..bd9f81a3e31
--- /dev/null
+++ b/.github/workflows/dependency-submission.yml
@@ -0,0 +1,42 @@
+name: Dependency submission
+
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ submit:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - name: Set up JDK for running Gradle
+ uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
+ with:
+ distribution: temurin
+ java-version: 25
+
+ - name: Generate and submit dependency graph
+ uses: gradle/actions/dependency-submission@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
+ with:
+ dependency-graph: generate-and-submit
+ dependency-graph-include-configurations: "runtimeClasspath"
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - submit
+ if: always()
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: ${{ needs.submit.result == 'success' }}
diff --git a/.github/workflows/detect-api-changes.yml b/.github/workflows/detect-api-changes.yml
new file mode 100644
index 00000000000..0b79dadc7e6
--- /dev/null
+++ b/.github/workflows/detect-api-changes.yml
@@ -0,0 +1,99 @@
+name: Detect API Changes
+
+on:
+ # pull_request_target is used instead of pull_request so that the workflow has write access
+ # (to post comments and apply labels) even when triggered by fork PRs.
+ #
+ pull_request_target:
+ # zizmor: ignore[dangerous-triggers] Required to label and comment on fork PRs;
+ # no PR code is checked out, and the PR number and head ref are passed through env
+ # and treated only as data.
+ types: [opened, synchronize, reopened, ready_for_review]
+
+permissions: {}
+
+jobs:
+ detect-api-changes:
+ name: Detect API surface area changes
+ if: github.repository == 'open-telemetry/opentelemetry-java'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
+ id: otelbot-token
+ with:
+ client-id: ${{ vars.OTELBOT_CLIENT_ID }}
+ private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
+ permission-pull-requests: write
+
+ - name: Check for API changes and update PR
+ env:
+ GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
+ PR_NUMBER: ${{ github.event.pull_request.number }}
+ REPO: ${{ github.repository }}
+ HEAD_REF: ${{ github.event.pull_request.head.ref }}
+ run: |
+ MARKER=""
+
+ # Get list of apidiff files changed in this PR.
+ # otelbot/* PRs (release version bumps, post-release updates) only change the version
+ # header in apidiff files β treat them as having no API changes so the cleanup path below runs.
+ if [[ "$HEAD_REF" == otelbot/* ]]; then
+ api_files=""
+ else
+ api_files=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate \
+ --jq '.[] | select(.filename | startswith("docs/apidiffs/current_vs_latest/")) | .filename')
+ fi
+
+ # Find existing bot comment (if any)
+ comment_id=$(gh api "repos/${REPO}/issues/${PR_NUMBER}/comments" --paginate \
+ --jq ".[] | select(.body | startswith(\"${MARKER}\")) | .id" | head -1)
+
+ if [[ -z "$api_files" ]]; then
+ echo "No API diff files changed."
+
+ # Remove label if present (ok to fail if label doesn't exist on PR)
+ gh pr edit "$PR_NUMBER" --repo "$REPO" --remove-label "api-change" 2>/dev/null || true
+
+ # Delete existing comment if present
+ if [[ -n "$comment_id" ]]; then
+ gh api --method DELETE "repos/${REPO}/issues/comments/${comment_id}"
+ echo "Removed stale API change comment."
+ fi
+ exit 0
+ fi
+
+ echo "API diff files changed:"
+ echo "$api_files"
+
+ # Add label
+ gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label "api-change"
+
+ # Build bulleted module list
+ modules=$(echo "$api_files" \
+ | sed 's|docs/apidiffs/current_vs_latest/||' \
+ | sed 's|\.txt$||' \
+ | sort \
+ | sed 's/^/- /')
+
+ BODY=$(cat <
+ contains(github.event.issue.labels.*.name, 'needs author feedback') &&
+ github.event.comment.user.login == github.event.issue.user.login
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - name: Remove labels
+ env:
+ ISSUE_NUMBER: ${{ github.event.issue.number }}
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh issue edit --remove-label "needs author feedback" $ISSUE_NUMBER
+ gh issue edit --remove-label "stale" $ISSUE_NUMBER
diff --git a/.github/workflows/issue-management-stale-action.yml b/.github/workflows/issue-management-stale-action.yml
new file mode 100644
index 00000000000..39e4d8a158f
--- /dev/null
+++ b/.github/workflows/issue-management-stale-action.yml
@@ -0,0 +1,70 @@
+name: Issue management - run stale action
+
+on:
+ schedule:
+ # hourly at minute 23
+ - cron: "23 * * * *"
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ stale:
+ permissions:
+ contents: read
+ actions: write # because actions/stale deletes its old cache before saving new one
+ issues: write # for actions/stale to close stale issues
+ pull-requests: write # for actions/stale to close stale PRs
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
+ with:
+ only-labels: "needs author feedback"
+ days-before-stale: 7
+ days-before-close: 7
+ stale-issue-label: stale
+ stale-issue-message: >
+ This issue has been labeled as stale due to lack of activity and needing author feedback.
+ It will be automatically closed if there is no further activity over the next 7 days.
+ stale-pr-label: stale
+ stale-pr-message: >
+ This PR has been labeled as stale due to lack of activity and needing author feedback.
+ It will be automatically closed if there is no further activity over the next 7 days.
+ operations-per-run: 1000
+
+ - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
+ with:
+ only-labels: "Feature Request"
+ exempt-issue-labels: "needs author feedback"
+ days-before-pr-stale: -1
+ days-before-pr-close: -1
+ days-before-issue-stale: 365
+ days-before-issue-close: 0
+ stale-issue-label: stale
+ close-issue-message: >
+ Since there has been no activity on this enhancement for the past year we are closing it to help maintain our backlog.
+ Anyone who would like to work on it is still welcome to do so, and we can re-open it at that time.
+ operations-per-run: 1000
+
+ - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
+ with:
+ days-before-issue-stale: -1
+ days-before-issue-close: -1
+ days-before-pr-stale: 90
+ days-before-pr-close: 14
+ stale-pr-label: stale
+ stale-pr-message: >
+ This PR has been labeled as stale due to lack of activity.
+ It will be automatically closed if there is no further activity over the next 14 days.
+ operations-per-run: 1000
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - stale
+ if: always()
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: ${{ needs.stale.result == 'success' }}
diff --git a/.github/workflows/javadoc-crawler.yml b/.github/workflows/javadoc-crawler.yml
new file mode 100644
index 00000000000..4a6a20c51fb
--- /dev/null
+++ b/.github/workflows/javadoc-crawler.yml
@@ -0,0 +1,43 @@
+name: Javadoc.io site crawler (daily)
+
+on:
+ schedule:
+ - cron: "30 1 * * *" # daily at 1:30 UTC
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ crawl:
+ if: github.repository == 'open-telemetry/opentelemetry-java'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
+ with:
+ distribution: temurin
+ java-version: 25
+
+ - name: Set up gradle
+ uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
+ with:
+ cache-read-only: true
+
+ - name: Run crawler
+ run: ./gradlew :javadoc-crawler:crawl
+ env:
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - crawl
+ if: always()
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: ${{ needs.crawl.result == 'success' }}
diff --git a/.github/workflows/merge-change-log-to-main.yml b/.github/workflows/merge-change-log-to-main.yml
deleted file mode 100644
index 4668d7303e9..00000000000
--- a/.github/workflows/merge-change-log-to-main.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Merge change log to main
-on:
- workflow_dispatch:
-
-jobs:
- create-pull-request:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- with:
- # this workflow is run against the release branch (see usage of GITHUB_REF_NAME below)
- # but it is creating a pull request against main
- ref: main
- # history is needed to run format-patch below
- fetch-depth: 0
-
- - name: Set git user
- run: .github/scripts/set-git-user.sh
-
- # this will fail if there have been conflicting change log updates introduced in main
- - name: Create pull request against main
- env:
- # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows
- GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
- run: |
- message="Merge change log updates from $GITHUB_REF_NAME"
- body="Merge change log updates from \`$GITHUB_REF_NAME\`."
- branch="merge-change-log-updates-from-${GITHUB_REF_NAME//\//-}"
-
- git format-patch --stdout HEAD..origin/$GITHUB_REF_NAME CHANGELOG.md | git apply --3way
- git commit -a -m "$message"
- git push origin HEAD:$branch
- gh pr create --title "$message" \
- --body "$body" \
- --head $branch \
- --base main
diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml
new file mode 100644
index 00000000000..47cdb06596f
--- /dev/null
+++ b/.github/workflows/ossf-scorecard.yml
@@ -0,0 +1,30 @@
+name: OSSF Scorecard
+
+on:
+ push:
+ branches:
+ - main
+ schedule:
+ - cron: "43 6 * * 5" # weekly at 06:43 (UTC) on Friday
+ workflow_dispatch:
+
+permissions: {}
+
+jobs:
+ analysis:
+ if: github.repository == 'open-telemetry/opentelemetry-java'
+ permissions:
+ contents: read # for actions/checkout
+ id-token: write # for Scorecard to publish results
+ security-events: write # for the SARIF upload to code scanning
+ uses: open-telemetry/shared-workflows/.github/workflows/scorecard.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - analysis
+ if: always()
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: ${{ needs.analysis.result == 'success' }}
diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml
index 6e68c6ad1a7..76d850c0382 100644
--- a/.github/workflows/prepare-patch-release.yml
+++ b/.github/workflows/prepare-patch-release.yml
@@ -2,16 +2,35 @@ name: Prepare patch release
on:
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
prepare-patch-release:
+ permissions:
+ contents: write # for git push to PR branch
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ # zizmor: ignore[artipacked] Credentials are required by the branch push below.
+ persist-credentials: true
+
+ - run: |
+ if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x$ ]]; then
+ echo this workflow should only be run against release branches
+ exit 1
+ fi
+
+ if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then
+ echo the change log is missing an \"Unreleased\" section
+ exit 1
+ fi
- name: Set environment variables
run: |
version=$(.github/scripts/get-version.sh)
- if [[ $version =~ ([0-9]+\.[0-9]+)\.([0-9]+) ]]; then
+ if [[ $version =~ ^([0-9]+\.[0-9]+)\.([0-9]+)$ ]]; then
major_minor="${BASH_REMATCH[1]}"
patch="${BASH_REMATCH[2]}"
else
@@ -21,23 +40,35 @@ jobs:
echo "VERSION=$major_minor.$((patch + 1))" >> $GITHUB_ENV
- name: Update version
+ run: .github/scripts/update-version.sh $VERSION
+
+ - name: Update the change log with the approximate release date
run: |
- sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION/" version.gradle.kts
+ date=$(date "+%Y-%m-%d")
+ sed -Ei "s/^## Unreleased$/## Version $VERSION ($date)/" CHANGELOG.md
+
+ - name: Use CLA approved github bot
+ run: .github/scripts/use-cla-approved-bot.sh
- - name: Set git user
- run: .github/scripts/set-git-user.sh
+ - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
+ id: otelbot-token
+ with:
+ client-id: ${{ vars.OTELBOT_CLIENT_ID }}
+ private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
+ permission-pull-requests: write
- name: Create pull request
env:
- # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows
- GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
+ # pull requests from secrets.GITHUB_TOKEN do not run workflows
+ GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Prepare release $VERSION"
- branch="prepare-release-${VERSION}"
+ branch="otelbot/prepare-release-${VERSION}"
+ git checkout -b $branch
git commit -a -m "$message"
- git push origin HEAD:$branch
- gh pr create --title "[$GITHUB_REF_NAME] $message" \
- --body "$message." \
- --head $branch \
- --base $GITHUB_REF_NAME
+ git push --set-upstream origin $branch
+ gh pr create \
+ --title "[$GITHUB_REF_NAME] $message" \
+ --body "$message." \
+ --base $GITHUB_REF_NAME
diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml
index d77794fd978..3866a5e6a3a 100644
--- a/.github/workflows/prepare-release-branch.yml
+++ b/.github/workflows/prepare-release-branch.yml
@@ -2,18 +2,54 @@ name: Prepare release branch
on:
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
+ prereqs:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - name: Verify prerequisites
+ run: |
+ if [[ $GITHUB_REF_NAME != main ]]; then
+ echo this workflow should only be run against main
+ exit 1
+ fi
+
+ if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then
+ echo the change log is missing an \"Unreleased\" section
+ exit 1
+ fi
+
create-pull-request-against-release-branch:
+ permissions:
+ contents: write # for git push to PR branch
runs-on: ubuntu-latest
+ needs:
+ - prereqs
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ # history is needed to allow fast-forward push below in case
+ # re-running this workflow after merging additional PRs to main
+ fetch-depth: 0
+ # zizmor: ignore[artipacked] Credentials are required by the branch pushes below.
+ persist-credentials: true
- name: Create release branch
- id: create-release-branch
run: |
version=$(.github/scripts/get-version.sh)
version=${version//-SNAPSHOT/}
- release_branch_name=$(echo $version | sed -E 's/([0-9]+)\.([0-9]+)\.0/release\/v\1.\2.x/')
+ if [[ $version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then
+ release_branch_name=$(echo $version | sed -E 's/([0-9]+)\.([0-9]+)\.0/release\/v\1.\2.x/')
+ else
+ echo "unexpected version: $version"
+ exit 1
+ fi
git push origin HEAD:$release_branch_name
@@ -21,64 +57,97 @@ jobs:
echo "RELEASE_BRANCH_NAME=$release_branch_name" >> $GITHUB_ENV
- name: Update version
+ run: sed -Ei "s/val snapshot = true/val snapshot = false/" version.gradle.kts
+
+ - name: Update the change log with the approximate release date
run: |
- sed -Ei "s/val snapshot = true/val snapshot = false/" version.gradle.kts
+ date=$(date "+%Y-%m-%d")
+ sed -Ei "s/^## Unreleased$/## Version $VERSION ($date)/" CHANGELOG.md
+
+ - name: Use CLA approved github bot
+ run: .github/scripts/use-cla-approved-bot.sh
- - name: Set git user
- run: .github/scripts/set-git-user.sh
+ - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
+ id: otelbot-token
+ with:
+ client-id: ${{ vars.OTELBOT_CLIENT_ID }}
+ private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
+ permission-pull-requests: write
- name: Create pull request against the release branch
env:
- # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows
- GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
+ # pull requests from secrets.GITHUB_TOKEN do not run workflows
+ GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Prepare release $VERSION"
- branch="prepare-release-${VERSION}"
+ branch="otelbot/prepare-release-${VERSION}"
+ git checkout -b $branch
git commit -a -m "$message"
- git push origin HEAD:$branch
- gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
- --body "$message." \
- --head $branch \
- --base $RELEASE_BRANCH_NAME
+ git push --set-upstream origin $branch
+ gh pr create \
+ --title "[$RELEASE_BRANCH_NAME] $message" \
+ --body "$message." \
+ --base $RELEASE_BRANCH_NAME
create-pull-request-against-main:
+ permissions:
+ contents: write # for git push to PR branch
runs-on: ubuntu-latest
+ needs:
+ - prereqs
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ # zizmor: ignore[artipacked] Credentials are required by the branch push below.
+ persist-credentials: true
- name: Set environment variables
run: |
version=$(.github/scripts/get-version.sh)
- if [[ $version =~ ([0-9]+)\.([0-9]+)\.0 ]]; then
+ if [[ $version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
+ next_version="$major.$((minor + 1)).0"
else
echo "unexpected version: $version"
exit 1
fi
- next_version="$major.$((minor + 1)).0"
- echo "NEXT_VERSION=$next_version" >> $GITHUB_ENV
+ echo "NEXT_VERSION=${next_version}" >> $GITHUB_ENV
+ echo "VERSION=$version" >> $GITHUB_ENV
- name: Update version
+ run: .github/scripts/update-version.sh $NEXT_VERSION
+
+ - name: Update the change log on main
run: |
- sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$NEXT_VERSION/" version.gradle.kts
+ # the actual release date on main will be updated at the end of the release workflow
+ date=$(date "+%Y-%m-%d")
+ sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version $VERSION ($date)/" CHANGELOG.md
+
+ - name: Use CLA approved github bot
+ run: .github/scripts/use-cla-approved-bot.sh
- - name: Set git user
- run: .github/scripts/set-git-user.sh
+ - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
+ id: otelbot-token
+ with:
+ client-id: ${{ vars.OTELBOT_CLIENT_ID }}
+ private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
+ permission-pull-requests: write
- name: Create pull request against main
env:
- # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows
- GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
+ # pull requests from secrets.GITHUB_TOKEN do not run workflows
+ GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Update version to $NEXT_VERSION"
body="Update version to \`$NEXT_VERSION\`."
- branch="update-version-to-${NEXT_VERSION}"
+ branch="otelbot/update-version-to-${NEXT_VERSION}"
+ git checkout -b $branch
git commit -a -m "$message"
- git push origin HEAD:$branch
- gh pr create --title "$message" \
- --body "$body" \
- --head $branch \
- --base main
+ git push --set-upstream origin $branch
+ gh pr create \
+ --title "$message" \
+ --body "$body" \
+ --base main
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b62d404648c..a9f71664f1e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -2,40 +2,53 @@ name: Release
on:
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
release:
- runs-on: ubuntu-20.04
+ environment: protected
+ permissions:
+ contents: write # for creating the release
+ runs-on: ubuntu-26.04
+ outputs:
+ version: ${{ steps.create-github-release.outputs.version }}
+ prior-version: ${{ steps.create-github-release.outputs.prior-version }}
steps:
- run: |
if [[ $GITHUB_REF_NAME != release/* ]]; then
- echo the release workflow should only be run against release branches
+ echo this workflow should only be run against release branches
exit 1
fi
- - uses: actions/checkout@v3
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
- # tags are needed for the generate-release-contributors.sh script
- fetch-depth: 0
+ persist-credentials: false
- - uses: actions/setup-java@v3
+ - uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
with:
distribution: temurin
- java-version: 17
+ java-version: 25
- - name: Build and publish artifacts
- uses: gradle/gradle-build-action@v2
+ - name: Set up gradle
+ uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
with:
- arguments: assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
+ cache-read-only: true
+
+ - name: Build and publish artifacts
+ run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
+ # disable gradle build cache, ensuring we're building from source to mitigate supply chain risk
+ DISABLE_REMOTE_BUILD_CACHE: true
- name: Set environment variables
run: |
version=$(.github/scripts/get-version.sh)
- if [[ $version =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
+ if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
patch="${BASH_REMATCH[3]}"
@@ -57,72 +70,197 @@ jobs:
echo "VERSION=$version" >> $GITHUB_ENV
echo "PRIOR_VERSION=$prior_version" >> $GITHUB_ENV
+ # check out main branch to verify there won't be problems with merging the change log
+ # at the end of this workflow
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: main
+ persist-credentials: false
+
+ - name: Check that change log update was merged to main
+ run: |
+ if [[ $VERSION == *.0 ]]; then
+ # not making a patch release
+ if ! grep --quiet "^## Version $VERSION " CHANGELOG.md; then
+ echo the pull request generated by prepare-release-branch.yml needs to be merged first
+ exit 1
+ fi
+ fi
+
+ # back to the release branch
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ # tags are needed for the generate-release-contributors.sh script
+ fetch-depth: 0
+ persist-credentials: false
+
- name: Generate release notes
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# conditional blocks not indented because of the heredoc
- if [[ $VERSION == *.0 ]]; then
- cat > release-notes.txt << EOF
- This release targets the OpenTelemetry SDK $VERSION.
-
- EOF
- else
- cat > release-notes.txt << EOF
+ if [[ $VERSION != *.0 ]]; then
+ cat > /tmp/release-notes.txt << EOF
This is a patch release on the previous $PRIOR_VERSION release, fixing the issue(s) below.
EOF
fi
+ # CHANGELOG_SECTION.md is also used at the end of the release workflow
+ # for copying the change log updates to main
+ sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \
+ > /tmp/CHANGELOG_SECTION.md
+
# the complex perl regex is needed because markdown docs render newlines as soft wraps
# while release notes render them as line breaks
- sed -n "0,/^## Version $VERSION/d;/^## Version /q;p" CHANGELOG.md \
- | perl -0pe 's/(?> release-notes.txt
+ perl -0pe 's/(?> /tmp/release-notes.txt
# conditional block not indented because of the heredoc
if [[ $VERSION == *.0 ]]; then
- cat >> release-notes.txt << EOF
+ cat >> /tmp/release-notes.txt << EOF
### π Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
EOF
- .github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> release-notes.txt
+ .github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt
fi
- - name: Create GitHub release
+ - id: create-github-release
+ name: Create GitHub release
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create --target $GITHUB_REF_NAME \
--title "Version $VERSION" \
- --notes-file release-notes.txt \
- --discussion-category announcements \
+ --notes-file /tmp/release-notes.txt \
v$VERSION
- - name: Update the change log with the release date
+ # these are used as job outputs
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
+ echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT
+
+ post-release-updates:
+ permissions:
+ contents: write # for git push to PR branch
+ runs-on: ubuntu-latest
+ needs:
+ - release
+ steps:
+ # add change log sync (if any) into this PR since the apidiff update
+ # is required before any other PR can be merged anyway
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - name: Copy change log section from release branch
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ VERSION: ${{ needs.release.outputs.version }}
run: |
- date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
- sed -Ei "s/## Version $VERSION .*/## Version $VERSION ($date)/" CHANGELOG.md
+ sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \
+ > /tmp/changelog-section.md
+
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: main
+ # zizmor: ignore[artipacked] Credentials are required by the branch push below.
+ persist-credentials: true
- - name: Set git user
- run: .github/scripts/set-git-user.sh
+ - name: Merge change log to main
+ env:
+ VERSION: ${{ needs.release.outputs.version }}
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ release_date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
+ RELEASE_DATE=$release_date .github/scripts/merge-change-log-after-release.sh
+ git add CHANGELOG.md
+
+ - name: Wait for release to be available in maven central
+ env:
+ VERSION: ${{ needs.release.outputs.version }}
+ run: |
+ until curl --silent \
+ --show-error \
+ --output /dev/null \
+ --head \
+ --fail \
+ https://repo1.maven.org/maven2/io/opentelemetry/opentelemetry-api/$VERSION/opentelemetry-api-$VERSION.jar
+ do
+ sleep 60
+ done
+
+ - name: Set up JDK for running Gradle
+ uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
+ with:
+ distribution: temurin
+ java-version: 25
+
+ - name: Set up Gradle
+ uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
+ with:
+ cache-read-only: true
- - name: Create pull request against the release branch
+ - name: Update apidiff baseline
env:
- # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows
- GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
+ VERSION: ${{ needs.release.outputs.version }}
+ PRIOR_VERSION: ${{ needs.release.outputs.prior-version }}
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
run: |
- message="Add the release date for $VERSION to the change log"
- branch="add-release-date-for-${VERSION}"
-
- git commit -a -m "$message"
- git push origin HEAD:$branch
- gh pr create --title "[$GITHUB_REF_NAME] $message" \
- --body "$message." \
- --head $branch \
- --base $GITHUB_REF_NAME
+ # Retry to tolerate Maven Central per-artifact indexing lag: the earlier
+ # wait step only polls opentelemetry-api, but this task resolves every
+ # published module at $VERSION and will fail if any sibling artifact has
+ # not yet propagated.
+ for attempt in 1 2 3 4 5; do
+ if ./gradlew japicmp --refresh-dependencies -PapiBaseVersion=$PRIOR_VERSION -PapiNewVersion=$VERSION; then
+ break
+ fi
+ if [ $attempt -eq 5 ]; then
+ echo "japicmp failed after 5 attempts"
+ exit 1
+ fi
+ echo "japicmp attempt $attempt failed, retrying in 60s"
+ sleep 60
+ done
+ # Pin the apidiff baseline to the just-released version.
+ sed -i "s/^val apidiffBaselineVersion = .*/val apidiffBaselineVersion = \"$VERSION\"/" version.gradle.kts
+ ./gradlew --refresh-dependencies japicmp
+ git add docs/apidiffs
+ git add version.gradle.kts
+
+ - name: Update versions in README.md
+ env:
+ VERSION: ${{ needs.release.outputs.version }}
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+ run: |
+ ./gradlew updateVersionInDocs -Prelease.version=$VERSION
+ git add README.md
+
+ - name: Use CLA approved bot
+ run: .github/scripts/use-cla-approved-bot.sh
+
+ - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
+ id: otelbot-token
+ with:
+ client-id: ${{ vars.OTELBOT_CLIENT_ID }}
+ private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
+ permission-pull-requests: write
+
+ - name: Create pull request against main
+ env:
+ VERSION: ${{ needs.release.outputs.version }}
+ # pull requests from secrets.GITHUB_TOKEN do not run workflows
+ GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
+ run: |
+ message="Post-release updates for $VERSION"
+ body="Post-release updates for \`$VERSION\`."
+ branch="otelbot/post-release-updates-${VERSION}"
+
+ git checkout -b $branch
+ git commit -m "$message"
+ git push --set-upstream origin $branch
+ gh pr create \
+ --title "$message" \
+ --body "$body" \
+ --base main
diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml
new file mode 100644
index 00000000000..7ed9d957606
--- /dev/null
+++ b/.github/workflows/reusable-link-check.yml
@@ -0,0 +1,34 @@
+name: Reusable - Link check
+
+on:
+ workflow_call:
+
+permissions:
+ contents: read
+
+jobs:
+ link-check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ fetch-depth: 0 # needed for merge-base used in modified-files mode
+ persist-credentials: false
+
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
+
+ - name: Link check for pull requests
+ if: github.event_name == 'pull_request'
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ GITHUB_REPOSITORY: ${{ github.repository }}
+ GITHUB_BASE_REF: ${{ github.base_ref }}
+ GITHUB_HEAD_REF: ${{ github.head_ref }}
+ PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
+ run: mise run lint:links
+
+ - name: Link check for pushes and scheduled workflows
+ if: github.event_name != 'pull_request'
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: mise run lint:links --full
diff --git a/.github/workflows/reusable-markdown-link-check.yml b/.github/workflows/reusable-markdown-link-check.yml
deleted file mode 100644
index 97282477879..00000000000
--- a/.github/workflows/reusable-markdown-link-check.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: Reusable - Markdown link check
-
-on:
- workflow_call:
-
-jobs:
- markdown-link-check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - name: Install markdown-link-check
- run: npm install -g markdown-link-check
-
- - name: Run markdown-link-check
- run: |
- find . -type f \
- -name '*.md' \
- -not -path './CHANGELOG.md' \
- | xargs .github/scripts/markdown-link-check-with-retry.sh
diff --git a/.github/workflows/reusable-misspell-check.yml b/.github/workflows/reusable-misspell-check.yml
deleted file mode 100644
index 24f3a2c71be..00000000000
--- a/.github/workflows/reusable-misspell-check.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Reusable - Misspell check
-
-on:
- workflow_call:
-
-jobs:
- misspell-check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - name: Install misspell
- run: |
- curl -L -o ./install-misspell.sh https://git.io/misspell
- sh ./install-misspell.sh
-
- - name: Run misspell
- run: bin/misspell -error .
diff --git a/.github/workflows/reusable-open-issue-on-failure.yml b/.github/workflows/reusable-open-issue-on-failure.yml
deleted file mode 100644
index 31f81f979d4..00000000000
--- a/.github/workflows/reusable-open-issue-on-failure.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Reusable - Open issue on failure
-
-on:
- workflow_call:
-
-jobs:
- open-issue:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - name: Open issue
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- gh issue create --title "$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER failed" \
- --label bug \
- --body "See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
diff --git a/.github/workflows/sonatype-guide-dependency-audit-daily.yml b/.github/workflows/sonatype-guide-dependency-audit-daily.yml
new file mode 100644
index 00000000000..103fe53f5a9
--- /dev/null
+++ b/.github/workflows/sonatype-guide-dependency-audit-daily.yml
@@ -0,0 +1,56 @@
+# the benefit of this over renovate is that this also analyzes transitive dependencies
+# while renovate (at least currently) only analyzes top-level dependencies
+name: Sonatype Guide dependency audit (daily)
+
+on:
+ schedule:
+ - cron: "30 1 * * *" # daily at 1:30 UTC
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ analyze:
+ if: github.repository == 'open-telemetry/opentelemetry-java'
+ environment: protected
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+
+ - uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
+ with:
+ distribution: temurin
+ java-version: 25
+
+ - name: Set up gradle
+ uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
+ with:
+ cache-read-only: true
+
+ # --no-parallel is needed to avoid OverlappingFileLockException on the shared OSS Index cache
+ - run: ./gradlew ossIndexAudit --no-configuration-cache --no-parallel --info
+ id: audit
+ continue-on-error: true
+ env:
+ SONATYPE_GUIDE_PAT: ${{ secrets.SONATYPE_GUIDE_PAT }}
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+
+ - name: Print vulnerability report
+ if: steps.audit.outcome == 'failure'
+ run: |
+ echo "=== Sonatype Guide Vulnerability Report ==="
+ find . -name "oss-index-cyclonedx-bom.json" | xargs cat
+ exit 1
+
+ workflow-notification:
+ permissions:
+ issues: write
+ needs:
+ - analyze
+ if: always()
+ uses: open-telemetry/shared-workflows/.github/workflows/workflow-failure-issue.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ success: ${{ needs.analyze.result == 'success' }}
diff --git a/.github/workflows/survey-on-merged-pr.yml b/.github/workflows/survey-on-merged-pr.yml
new file mode 100644
index 00000000000..de75e900923
--- /dev/null
+++ b/.github/workflows/survey-on-merged-pr.yml
@@ -0,0 +1,18 @@
+name: Survey on Merged PR by Non-Member
+
+on:
+ pull_request_target:
+ # zizmor: ignore[dangerous-triggers] This only calls the trusted reusable
+ # workflow; no PR code is checked out or executed.
+ types: [closed]
+ branches: [main]
+
+permissions: {}
+
+jobs:
+ survey:
+ uses: open-telemetry/shared-workflows/.github/workflows/survey-on-merged-pr.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
+ with:
+ client_id: ${{ vars.OTELBOT_CLIENT_ID }}
+ secrets:
+ private_key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml
new file mode 100644
index 00000000000..4668b65cdb0
--- /dev/null
+++ b/.github/workflows/zizmor.yml
@@ -0,0 +1,20 @@
+name: Zizmor
+
+on:
+ push:
+ branches:
+ - main
+ - release/*
+ pull_request:
+ schedule:
+ - cron: '43 18 * * 5' # weekly at 18:43 UTC on Friday
+ workflow_dispatch:
+
+permissions: {}
+
+jobs:
+ zizmor:
+ permissions:
+ contents: read # for actions/checkout
+ security-events: write # for zizmor to upload SARIF results
+ uses: open-telemetry/shared-workflows/.github/workflows/zizmor.yml@efc55838c9769c5476e0a5cf7183a8c5b4ae70a5 # v0.24.0
diff --git a/.gitignore b/.gitignore
index 69c5f8b7cf9..bafac41ca50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
# Gradle
build
.gradle
+.kotlin
local.properties
out/
@@ -33,3 +34,6 @@ bin
# Vim
.swp
+
+# scan-gradle-plugin
+oss-index-cyclonedx-bom.json
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 00000000000..f0b4dd87691
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,11 @@
+# AGENTS.md
+
+Start with [docs/knowledge/README.md](docs/knowledge/README.md). It is the entry point for
+coding patterns, build conventions, testing guidance, and API stability rules. Load documents
+based on the scope of your work β the README contains a table mapping topics to load conditions.
+
+For project scope, PR process, and CLA requirements, see [CONTRIBUTING.md](CONTRIBUTING.md).
+
+## Additional guidance
+
+* Prefer small, localized changes over broad refactors.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 08f9eb54159..d10010bdddb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,3498 @@
# Changelog
+## Unreleased
+
+## Version 1.68.0 (2026-11-06)
+
+### API
+
+* Add null guards and API usage logging for tracing, metrics, propagation, and context APIs
+ ([#8913](https://github.com/open-telemetry/opentelemetry-java/pull/8913), [#8968](https://github.com/open-telemetry/opentelemetry-java/pull/8968))
+* Add stable `io.opentelemetry.api.impl.Base16EncodingUtils` and `TemporaryBuffers` utilities
+ ([#8929](https://github.com/open-telemetry/opentelemetry-java/pull/8929), [#8955](https://github.com/open-telemetry/opentelemetry-java/pull/8955))
+* Fix uncompilable Javadoc examples in context APIs
+ ([#8934](https://github.com/open-telemetry/opentelemetry-java/pull/8934))
+
+#### Incubating
+
+* Avoid false type warnings in `DeclarativeConfigProperties.toMap()`
+ ([#8921](https://github.com/open-telemetry/opentelemetry-java/pull/8921))
+
+#### Extensions
+
+* Trace propagators: Handle malformed URL escapes in Jaeger headers
+ ([#8912](https://github.com/open-telemetry/opentelemetry-java/pull/8912))
+* Trace propagators: Include the B3 debug header in multi-header propagation fields
+ ([#8930](https://github.com/open-telemetry/opentelemetry-java/pull/8930))
+* Trace propagators: Fix hexadecimal flag parsing in Jaeger headers
+ ([#8975](https://github.com/open-telemetry/opentelemetry-java/pull/8975))
+
+### SDK
+
+* Remove cross-module internal utility dependencies from resource and retry code
+ ([#8916](https://github.com/open-telemetry/opentelemetry-java/pull/8916))
+* Add experimental `SdkResourceProvider` support shared by tracer, meter, and logger providers
+ ([#8865](https://github.com/open-telemetry/opentelemetry-java/pull/8865))
+
+#### Traces
+
+* Retain invalid span links with attributes or trace state
+ ([#8917](https://github.com/open-telemetry/opentelemetry-java/pull/8917))
+
+#### Metrics
+
+* Use a dedicated export worker in `PeriodicMetricReader`, queue concurrent flushes, and add `setExporterTimeout()` with a default equal to the export interval
+ ([#8827](https://github.com/open-telemetry/opentelemetry-java/pull/8827))
+
+#### Exporters
+
+* Logging: Fall back to the observed timestamp in `SystemOutLogRecordExporter` when the timestamp is unset
+ ([#8944](https://github.com/open-telemetry/opentelemetry-java/pull/8944))
+* OTLP: Close the JDK HTTP response body on unsupported `Content-Encoding`
+ ([#8962](https://github.com/open-telemetry/opentelemetry-java/pull/8962))
+* OTLP: Match the `Host` header case-insensitively in the managed-channel gRPC sender
+ ([#8957](https://github.com/open-telemetry/opentelemetry-java/pull/8957))
+* OTLP: Fix exporter metric server attributes for hosts that `java.net.URI` cannot parse
+ ([#8941](https://github.com/open-telemetry/opentelemetry-java/pull/8941))
+* OTLP: Pass the original exception to the JDK HTTP sender's error callback
+ ([#8963](https://github.com/open-telemetry/opentelemetry-java/pull/8963))
+* OTLP: Retry OkHttp gRPC exports on the current thread to avoid rejection by bounded executors
+ ([#8965](https://github.com/open-telemetry/opentelemetry-java/pull/8965))
+* OTLP: Restore per-attempt retry logging in the OkHttp gRPC sender
+ ([#8967](https://github.com/open-telemetry/opentelemetry-java/pull/8967))
+* OTLP: Correct exporter builder Javadoc
+ ([#8996](https://github.com/open-telemetry/opentelemetry-java/pull/8996))
+* OTLP: Accept `0` as no limit for maximum request body and message sizes
+ ([#8945](https://github.com/open-telemetry/opentelemetry-java/pull/8945))
+* OTLP: gRPC exporter internal telemetry uses `rpc.status_code` instead of
+ `rpc.response.status.code` when `InternalTelemetryVersion` is set to `LATEST`
+ ([#9007](https://github.com/open-telemetry/opentelemetry-java/pull/9007))
+* Prometheus: Give exemplar `trace_id` and `span_id` precedence over filtered attributes
+ ([#8959](https://github.com/open-telemetry/opentelemetry-java/pull/8959))
+
+#### Extensions
+
+* **BREAKING** Incubator: Change `SamplingIntent.create()` and `getTraceStateUpdater()` from `Function` to `BiFunction` accepting the final `SamplingDecision`, and fix consistent sampling corner cases
+ ([#8952](https://github.com/open-telemetry/opentelemetry-java/pull/8952))
+* Autoconfigure: Match environment variables for configuration keys containing underscores
+ ([#8933](https://github.com/open-telemetry/opentelemetry-java/pull/8933), [#8951](https://github.com/open-telemetry/opentelemetry-java/pull/8951))
+* Autoconfigure: Support `PeriodicMetricReader` batch sizes through `otel.metric.export.max.batch.size`
+ ([#8935](https://github.com/open-telemetry/opentelemetry-java/pull/8935))
+* Autoconfigure: Correct SPI Javadoc
+ ([#8900](https://github.com/open-telemetry/opentelemetry-java/pull/8900))
+
+#### Testing
+
+* Add fluent metric point assertions to `MetricAssert`
+ ([#8994](https://github.com/open-telemetry/opentelemetry-java/pull/8994))
+* Add a builder supporting aggregation temporality selectors to `InMemoryMetricExporter`
+ ([#8993](https://github.com/open-telemetry/opentelemetry-java/pull/8993))
+
+## Version 1.67.0 (2026-10-09)
+
+### API
+
+* Deprecate `TextMapGetter.keys()` and make `TextMapGetter` a functional interface
+ ([#8531](https://github.com/open-telemetry/opentelemetry-java/pull/8531))
+* Add null guards and API usage logging for tracing, baggage, attributes, logging, and metrics
+ ([#8803](https://github.com/open-telemetry/opentelemetry-java/pull/8803), [#8863](https://github.com/open-telemetry/opentelemetry-java/pull/8863), [#8864](https://github.com/open-telemetry/opentelemetry-java/pull/8864))
+* Fix [GHSA-ccrj-gw8r-854m](https://github.com/open-telemetry/opentelemetry-java/security/advisories/GHSA-ccrj-gw8r-854m): Bound allocations and avoid regex backtracking when parsing W3C `tracestate`
+ ([#8817](https://github.com/open-telemetry/opentelemetry-java/pull/8817), [#8914](https://github.com/open-telemetry/opentelemetry-java/pull/8914))
+
+#### Incubating
+
+* Add type introspection methods to `DeclarativeConfigProperties`
+ ([#8883](https://github.com/open-telemetry/opentelemetry-java/pull/8883))
+
+#### Extensions
+
+* Trace propagators: Bound allocations when parsing Jaeger baggage and B3 single-header propagation
+ ([#8817](https://github.com/open-telemetry/opentelemetry-java/pull/8817))
+
+### SDK
+
+* Run `CompletableResultCode` completion actions outside internal locks to avoid deadlocks
+ ([#8773](https://github.com/open-telemetry/opentelemetry-java/pull/8773))
+* Do not count attribute overwrites as dropped attributes
+ ([#8833](https://github.com/open-telemetry/opentelemetry-java/pull/8833))
+* Avoid regex backtracking in glob matching
+ ([#8909](https://github.com/open-telemetry/opentelemetry-java/pull/8909))
+* Add experimental resource entity support, OTLP export, and configuration through `otel.entities`
+ and declarative resource detectors
+ ([#8464](https://github.com/open-telemetry/opentelemetry-java/pull/8464))
+
+#### Traces
+
+* Return noop tracers when no span processors are configured
+ ([#8815](https://github.com/open-telemetry/opentelemetry-java/pull/8815))
+* Catch `Throwable` in `SimpleSpanProcessor` and `MultiSpanExporter`
+ ([#8848](https://github.com/open-telemetry/opentelemetry-java/pull/8848))
+* Use `{span}` units for span processor self-observability metrics
+ ([#8873](https://github.com/open-telemetry/opentelemetry-java/pull/8873))
+
+#### Metrics
+
+* Stabilize `PeriodicMetricReaderBuilder.setMaxExportBatchSize(int)`
+ ([#8829](https://github.com/open-telemetry/opentelemetry-java/pull/8829))
+* Delete experimental metric attribute / baggage processing
+ ([#8818](https://github.com/open-telemetry/opentelemetry-java/pull/8818))
+* Fix: Reset exemplar span context when a reservoir cell is overwritten outside a span
+ ([#8871](https://github.com/open-telemetry/opentelemetry-java/pull/8871))
+
+#### Logs
+
+* Return noop loggers from `SdkLoggerProvider.get()` when no log record processors are configured
+ ([#8838](https://github.com/open-telemetry/opentelemetry-java/pull/8838))
+* Catch `Throwable` in `SimpleLogRecordProcessor` and `MultiLogRecordExporter`
+ ([#8848](https://github.com/open-telemetry/opentelemetry-java/pull/8848))
+
+#### Profiles
+
+* Fix `KeyValueAndUnitData.create()` to return the public `KeyValueAndUnitData` interface
+ ([#8875](https://github.com/open-telemetry/opentelemetry-java/pull/8875))
+
+#### Exporters
+
+* OTLP: Fix missing request size limits, defaulting to 64 MiB, configurable through
+ `setMaxRequestBodySize(long)` and `setMaxRequestMessageSize(long)` and through declarative config
+ `OtlpGrpcExporter`, `OtlpHttpExporter` (see full schema docs [here](https://opentelemetry.io/docs/specs/otel-config/types/#type-otlpgrpcexporter))
+ ([#8446](https://github.com/open-telemetry/opentelemetry-java/pull/8446))
+* OTLP: Reduce failure logs to `FINE` after shutdown
+ ([#8819](https://github.com/open-telemetry/opentelemetry-java/pull/8819))
+* OTLP: retry gRPC based on response status codes in trailer headers
+ ([#8854](https://github.com/open-telemetry/opentelemetry-java/pull/8854))
+* Prometheus: Avoid regex backtracking when removing unit annotations
+ ([#8910](https://github.com/open-telemetry/opentelemetry-java/pull/8910))
+
+#### Extensions
+
+* Autoconfigure: Stabilize `ServiceInstanceIdResourceProvider` and generate `service.instance.id` by default
+ ([#8770](https://github.com/open-telemetry/opentelemetry-java/pull/8770))
+* Autoconfigure: Preserve unencoded non-ASCII characters when decoding resource attributes
+ ([#8893](https://github.com/open-telemetry/opentelemetry-java/pull/8893))
+* Autoconfigure: Add missing artifact hints for `experimental-otlp/stdout` span and metric exporters
+ ([#8897](https://github.com/open-telemetry/opentelemetry-java/pull/8897))
+* Declarative config: Update to schema v1.2.0 and support the `always_record` sampler
+ ([#8801](https://github.com/open-telemetry/opentelemetry-java/pull/8801))
+* Declarative config: Ignore resource attributes with null values
+ ([#8889](https://github.com/open-telemetry/opentelemetry-java/pull/8889))
+* Declarative config: Match array attributes element-wise in the `rule_based` sampler
+ ([#8895](https://github.com/open-telemetry/opentelemetry-java/pull/8895))
+* Jaeger remote sampler: Reduce failure logs to `FINE` after shutdown
+ ([#8819](https://github.com/open-telemetry/opentelemetry-java/pull/8819))
+* Jaeger remote sampler: Preserve per-operation sampling strategies when the rate limit is zero
+ ([#8888](https://github.com/open-telemetry/opentelemetry-java/pull/8888))
+* Incubator: Make `OnEndSpanProcessor.create()` public
+ ([#8892](https://github.com/open-telemetry/opentelemetry-java/pull/8892))
+* Incubator: Fix the class name in `ComposableProbabilitySampler` descriptions
+ ([#8891](https://github.com/open-telemetry/opentelemetry-java/pull/8891))
+
+#### Testing
+
+* Fix assertion failure messages reporting the wrong value or type
+ ([#8872](https://github.com/open-telemetry/opentelemetry-java/pull/8872))
+
+### Shims
+
+* OpenCensus: Skip W3C multi-tenant `tracestate` keys when converting spans
+ ([#8810](https://github.com/open-telemetry/opentelemetry-java/pull/8810))
+* OpenTracing: Propagate baggage to the parent context in `SpanBuilderShim`
+ ([#8812](https://github.com/open-telemetry/opentelemetry-java/pull/8812))
+
+### Project tooling
+
+* Kotlin extension: Raise the minimum Kotlin version to 2.2
+ ([#8804](https://github.com/open-telemetry/opentelemetry-java/pull/8804))
+
+## Version 1.66.0 (2026-09-11)
+
+### API
+
+* Fix `Baggage.fromContext()` and `Baggage.fromContextOrNull()` to handle a `null` context
+ ([#8667](https://github.com/open-telemetry/opentelemetry-java/pull/8667))
+* Do not percent-encode W3C baggage metadata
+ ([#8682](https://github.com/open-telemetry/opentelemetry-java/pull/8682))
+* Fix `ArrayIndexOutOfBoundsException` in `OtelEncodingUtils` for invalid hex characters
+ ([#8748](https://github.com/open-telemetry/opentelemetry-java/pull/8748))
+
+### SDK
+
+#### Traces
+
+* Record processed spans before export completes and reject new spans on shutdown in
+ `SpanProcessor` self-observability instrumentation
+ ([#8735](https://github.com/open-telemetry/opentelemetry-java/pull/8735))
+
+#### Metrics
+
+* Improve explicit bucket histogram contention performance
+ ([#8717](https://github.com/open-telemetry/opentelemetry-java/pull/8717))
+
+#### Logs
+
+* Record processed logs before export completes and reject new logs on shutdown in
+ `LogRecordProcessor` self-observability instrumentation
+ ([#8698](https://github.com/open-telemetry/opentelemetry-java/pull/8698))
+
+#### Exporters
+
+* OTLP: Respect `Retry-After` in OTLP HTTP senders
+ ([#8633](https://github.com/open-telemetry/opentelemetry-java/pull/8633))
+* OTLP: Add `setEnabledProtocols` option to OTLP HTTP exporter builders
+ ([#8610](https://github.com/open-telemetry/opentelemetry-java/pull/8610))
+* OTLP: Reject mixing `keyManager` and `sslContext` in `TlsConfigHelper`
+ ([#8710](https://github.com/open-telemetry/opentelemetry-java/pull/8710))
+* OTLP: Fix `OkHttpGrpcSender` mTLS when using the platform default trust store
+ ([#8758](https://github.com/open-telemetry/opentelemetry-java/pull/8758))
+* OTLP: Suppress instrumentation of exporter requests in `JdkHttpSender`
+ ([#8757](https://github.com/open-telemetry/opentelemetry-java/pull/8757))
+* OTLP: Accept RFC 1123 hostnames in `EndpointUtil.validateEndpoint` for OkHttp senders
+ ([#8746](https://github.com/open-telemetry/opentelemetry-java/pull/8746))
+* OTLP: Include the number of affected items in exporter error logging
+ ([#8780](https://github.com/open-telemetry/opentelemetry-java/pull/8780))
+* OTLP: Add `toString` to `OtlpJsonLogging{Span,Metric,LogRecord}Exporter`
+ ([#8725](https://github.com/open-telemetry/opentelemetry-java/pull/8725))
+* OTLP Profiles: Improve JFR export example and align `LinkData` null-element handling with the
+ spec ([#8349](https://github.com/open-telemetry/opentelemetry-java/pull/8349))
+* Prometheus: Remove default host log warning in `PrometheusHttpServerBuilder`
+ ([#8679](https://github.com/open-telemetry/opentelemetry-java/pull/8679))
+* Prometheus: Align UCUM byte unit conversions with the specification table
+ ([#8752](https://github.com/open-telemetry/opentelemetry-java/pull/8752))
+
+#### Extensions
+
+* **BREAKING** Declarative config: Rename generated model POJO setters from `with` to
+ `set` ([#8742](https://github.com/open-telemetry/opentelemetry-java/pull/8742))
+* Declarative config: Resolve experimental properties on stable APIs in generated model POJOs
+ ([#8654](https://github.com/open-telemetry/opentelemetry-java/pull/8654))
+* Declarative config: Fix inverted `scope_info_enabled` and `target_info_enabled` flags in the
+ Prometheus component provider
+ ([#8750](https://github.com/open-telemetry/opentelemetry-java/pull/8750))
+* Declarative config: Support `output_stream` in `otlp_file/development`
+ ([#8676](https://github.com/open-telemetry/opentelemetry-java/pull/8676))
+* Incubator: Add `toString` to `ComposableAnnotatingSampler`
+ ([#8645](https://github.com/open-telemetry/opentelemetry-java/pull/8645))
+
+### Project tooling
+
+* Remediate `zizmor` findings in GitHub Actions workflows
+ ([#8592](https://github.com/open-telemetry/opentelemetry-java/pull/8592))
+
+## Version 1.65.0 (2026-08-07)
+
+**NOTE:** The `opentelemetry-exporter-zipkin` artifact has stopped being published. It was
+deprecated in a prior release. Users should migrate to OTLP or use a Zipkin-compatible collector
+exporter.
+
+### API
+
+* Ignore empty baggage keys in `ImmutableBaggage.put`
+ ([#8658](https://github.com/open-telemetry/opentelemetry-java/pull/8658))
+* Use `NumberFormatException` in baggage decoder
+ ([#8593](https://github.com/open-telemetry/opentelemetry-java/pull/8593))
+* Fix `TraceStateBuilder.remove` corrupting the builder when the same key is removed twice
+ ([#8613](https://github.com/open-telemetry/opentelemetry-java/pull/8613))
+
+#### Incubating
+
+* Add bound instrument APIs (`BoundLongCounter`, `BoundDoubleCounter`, `BoundLongHistogram`,
+ `BoundDoubleHistogram`, `BoundLongUpDownCounter`, `BoundDoubleUpDownCounter`, `BoundLongGauge`,
+ `BoundDoubleGauge`) to the incubator metrics API
+ ([#8527](https://github.com/open-telemetry/opentelemetry-java/pull/8527))
+
+#### Extensions
+
+* Trace propagators: Fix `JaegerPropagator` baggage header key case sensitivity
+ ([#8496](https://github.com/open-telemetry/opentelemetry-java/pull/8496))
+* Trace propagators: Do not overwrite existing baggage with empty baggage in `JaegerPropagator`
+ ([#8632](https://github.com/open-telemetry/opentelemetry-java/pull/8632))
+* Trace propagators: Skip empty baggage keys in `OtTracePropagator` extract
+ ([#8631](https://github.com/open-telemetry/opentelemetry-java/pull/8631))
+* Trace propagators: Stop parsing a `jaeger-baggage` header after 64 tokens, including malformed
+ tokens ([#8702](https://github.com/open-telemetry/opentelemetry-java/pull/8702))
+
+### SDK
+
+* Update SDK attributes implementation (`AttributesMap`) to enforce last-value-win semantics based
+ on string value of `AttributeKey.getKey()`
+ ([#8548](https://github.com/open-telemetry/opentelemetry-java/pull/8548))
+
+#### Traces
+
+* Add `Sampler` shutdown lifecycle: `Sampler` now extends `Closeable` and exposes a default
+ `shutdown()` invoked when the `SdkTracerProvider` is shut down; `JaegerRemoteSampler` implements
+ it to stop its polling executor
+ ([#8574](https://github.com/open-telemetry/opentelemetry-java/pull/8574))
+
+#### Metrics
+
+* Gate `PeriodicMetricReader` self-observability metrics by internal telemetry version
+ ([#8597](https://github.com/open-telemetry/opentelemetry-java/pull/8597))
+* Record `error.type` on failed collections in `PeriodicMetricReader`
+ ([#8650](https://github.com/open-telemetry/opentelemetry-java/pull/8650))
+* Testing: Fix `LongExemplarAssert.hasFilteredAttributesSatisfyingExactly` to enforce exact
+ attribute matching
+ ([#8518](https://github.com/open-telemetry/opentelemetry-java/pull/8518))
+
+#### Logs
+
+* Fix `ReadWriteLogRecord` default `getObservedTimestampEpochNanos` returning the record timestamp
+ ([#8504](https://github.com/open-telemetry/opentelemetry-java/pull/8504))
+
+#### Profiles
+
+* Fix profiles data model attribute count parameter name and timestamp doc unit
+ ([#8514](https://github.com/open-telemetry/opentelemetry-java/pull/8514))
+
+#### Exporters
+
+* **WARNING** Zipkin: Delete `opentelemetry-exporter-zipkin`; the artifact is no longer published
+ ([#8677](https://github.com/open-telemetry/opentelemetry-java/pull/8677))
+* OTLP: Use HTTP error response bodies in `HttpExporter` warning logs
+ ([#8428](https://github.com/open-telemetry/opentelemetry-java/pull/8428))
+* OTLP: Fix `OkHttpHttpSender` mTLS when using the platform default trust store
+ ([#8565](https://github.com/open-telemetry/opentelemetry-java/pull/8565))
+* OTLP: Fix sign extension on `LogRecord` flags in the low-allocation log marshaler
+ ([#8493](https://github.com/open-telemetry/opentelemetry-java/pull/8493))
+* OTLP: Standardize `OkHttpHttpSender`, `JdkHttpSender`, and `UpstreamGrpcSender` shutdown to
+ await executor/channel termination
+ ([#8495](https://github.com/open-telemetry/opentelemetry-java/pull/8495),
+ [#8627](https://github.com/open-telemetry/opentelemetry-java/pull/8627),
+ [#8624](https://github.com/open-telemetry/opentelemetry-java/pull/8624))
+* OTLP: Log the underlying except/ion when a gRPC response frame is invalid
+ ([#8626](https://github.com/open-telemetry/opentelemetry-java/pull/8626))
+* OTLP: Avoid the unsafe string encoder on Android
+ ([#8637](https://github.com/open-telemetry/opentelemetry-java/pull/8637))
+* Prometheus: Merge colliding Prometheus label values
+ ([#8364](https://github.com/open-telemetry/opentelemetry-java/pull/8364))
+* Prometheus: Fix `PrometheusHttpServer.toBuilder()` dropping the configured default handler
+ ([#8619](https://github.com/open-telemetry/opentelemetry-java/pull/8619))
+* Logging: Output event name in `SystemOutLogRecordExporter`
+ ([#8609](https://github.com/open-telemetry/opentelemetry-java/pull/8609))
+* Logging: Include aggregation temporality in `LoggingMetricExporter` `toString`
+ ([#8623](https://github.com/open-telemetry/opentelemetry-java/pull/8623))
+
+#### Extensions
+
+* Autoconfigure: Avoid exposing configuration values in error messages
+ ([#8669](https://github.com/open-telemetry/opentelemetry-java/pull/8669))
+* Declarative config: Fix Jaeger sampler polling interval configuration
+ ([#8668](https://github.com/open-telemetry/opentelemetry-java/pull/8668))
+* Declarative config: Remove duplicate `getStringList` resolver in `DeclarativeConfigPropertyUtil`
+ ([#8572](https://github.com/open-telemetry/opentelemetry-java/pull/8572))
+* Declarative config: Replace `jsonschema2pojo` with a hand-rolled POJO generator
+ ([#8600](https://github.com/open-telemetry/opentelemetry-java/pull/8600))
+* Incubator: Restore compliance between composite samplers code and the spec
+ ([#8450](https://github.com/open-telemetry/opentelemetry-java/pull/8450))
+
+### Shims
+
+* **DEPRECATION** Deprecate the OpenCensus shim public API
+ ([#8674](https://github.com/open-telemetry/opentelemetry-java/pull/8674))
+* OpenCensus: Preserve OpenCensus status description when converting to OpenTelemetry
+ ([#8511](https://github.com/open-telemetry/opentelemetry-java/pull/8511))
+* OpenCensus: Add links to the OpenTelemetry span instead of logging a warning and dropping them
+ ([#8635](https://github.com/open-telemetry/opentelemetry-java/pull/8635))
+* OpenTracing: Return `null` from `TracerShim` extract when the carrier has no span context
+ ([#8505](https://github.com/open-telemetry/opentelemetry-java/pull/8505))
+* OpenTracing: Return the extracted `SpanContext` when it is sampled but invalid
+ ([#8634](https://github.com/open-telemetry/opentelemetry-java/pull/8634))
+
+### Project tooling
+
+* Pin japicmp baseline in `version.gradle.kts`
+ ([#8591](https://github.com/open-telemetry/opentelemetry-java/pull/8591))
+* Update contributing guide in response to feedback
+ ([#8655](https://github.com/open-telemetry/opentelemetry-java/pull/8655))
+
+## Version 1.64.0 (2026-07-10)
+
+### API
+
+* Fix `W3CBaggagePropagator` to allow empty baggage values per W3C spec
+ ([#8468](https://github.com/open-telemetry/opentelemetry-java/pull/8468))
+* Fix baggage parsing for invalid percent-encoded members
+ ([#8480](https://github.com/open-telemetry/opentelemetry-java/pull/8480))
+
+#### Incubating
+
+* **BREAKING** Remove deprecated `InstrumentationConfigUtil.peerServiceMapping`
+ ([#8542](https://github.com/open-telemetry/opentelemetry-java/pull/8542))
+* Fix `EnvironmentGetter`/`EnvironmentSetter` to not enumerate or normalize carrier entries, and
+ normalize empty names consistently
+ ([#8474](https://github.com/open-telemetry/opentelemetry-java/pull/8474),
+ [#8481](https://github.com/open-telemetry/opentelemetry-java/pull/8481))
+
+### SDK
+
+#### Traces
+
+* Add `BatchSpanProcessor.create(SpanExporter)` convenience factory to mirror
+ `SimpleSpanProcessor.create(SpanExporter)`
+ ([#8564](https://github.com/open-telemetry/opentelemetry-java/pull/8564))
+* Fix `BatchSpanProcessor` benchmark aux counters (`exportedSpans`/`droppedSpans`) always
+ reporting zero
+ ([#8539](https://github.com/open-telemetry/opentelemetry-java/pull/8539))
+
+#### Metrics
+
+* Fix `PooledHashMap` dropping live entries when an entry is removed during `forEach`
+ ([#8499](https://github.com/open-telemetry/opentelemetry-java/pull/8499))
+* Safely initialize exemplar reservoir storage in `FixedSizeExemplarReservoir`
+ ([#8524](https://github.com/open-telemetry/opentelemetry-java/pull/8524))
+* Use `failExceptionally` in `PeriodicMetricReader` when the exporter is busy
+ ([#8525](https://github.com/open-telemetry/opentelemetry-java/pull/8525))
+* Only set `valuesRecorded` in `AggregatorHandle` when false
+ ([#8559](https://github.com/open-telemetry/opentelemetry-java/pull/8559))
+* Use `volatile` instead of atomics in `Double`/`LongLastValueAggregator`
+ ([#8560](https://github.com/open-telemetry/opentelemetry-java/pull/8560))
+* Randomize per-thread recording order in metric benchmarks to avoid concurrency hotspots
+ ([#8550](https://github.com/open-telemetry/opentelemetry-java/pull/8550))
+
+#### Logs
+
+* Fix `BatchLogRecordProcessor` worker thread being killed by non-runtime exceptions
+ ([#8529](https://github.com/open-telemetry/opentelemetry-java/pull/8529))
+
+#### Exporters
+
+* **BREAKING** Prometheus: Drop deprecated `PrometheusMetricReader` constructors
+ ([#8541](https://github.com/open-telemetry/opentelemetry-java/pull/8541))
+* OTLP: Reject host-less endpoints in `EndpointUtil.validateEndpoint`
+ ([#8489](https://github.com/open-telemetry/opentelemetry-java/pull/8489))
+* OTLP: Replace Jackson OTLP JSON serialization with a hand-rolled implementation
+ ([#8545](https://github.com/open-telemetry/opentelemetry-java/pull/8545))
+* OTLP Profiles: Fix `OtlpGrpcProfileExporter` `toString` class name
+ ([#8492](https://github.com/open-telemetry/opentelemetry-java/pull/8492))
+* Prometheus: Add translation strategy support
+ ([#8346](https://github.com/open-telemetry/opentelemetry-java/pull/8346))
+* Prometheus: Fix serialization of array-valued scope and resource attributes to JSON strings
+ ([#8497](https://github.com/open-telemetry/opentelemetry-java/pull/8497))
+
+#### Extensions
+
+* **BREAKING** Declarative config: Move experimental types to internal package
+ ([#8530](https://github.com/open-telemetry/opentelemetry-java/pull/8530))
+* Declarative config: Commit generated schema POJOs to git
+ ([#8408](https://github.com/open-telemetry/opentelemetry-java/pull/8408))
+* Declarative config: Update to `opentelemetry-configuration` v1.1.0
+ ([#8451](https://github.com/open-telemetry/opentelemetry-java/pull/8451))
+* Declarative config: Adjust POJO `toString`/`hashCode`/`equals` to match AutoValue semantics
+ ([#8526](https://github.com/open-telemetry/opentelemetry-java/pull/8526))
+* Declarative config: Add ref descriptions to generated model classes
+ ([#8540](https://github.com/open-telemetry/opentelemetry-java/pull/8540))
+* Declarative config: Emit consistent `@JsonProperty` annotations on generated models
+ ([#8563](https://github.com/open-telemetry/opentelemetry-java/pull/8563))
+* Declarative config: Remove duplicate resolver in `DeclarativeConfigPropertyUtil`
+ ([#8579](https://github.com/open-telemetry/opentelemetry-java/pull/8579))
+
+### Project tooling
+
+* Add configuration policy guidance
+ ([#8429](https://github.com/open-telemetry/opentelemetry-java/pull/8429))
+* Exclude certain GitHub Actions from running on forks
+ ([#8466](https://github.com/open-telemetry/opentelemetry-java/pull/8466))
+* Add guidance to prefer parameterized tests
+ ([#8469](https://github.com/open-telemetry/opentelemetry-java/pull/8469))
+* Make benchmark path configurable
+ ([#8557](https://github.com/open-telemetry/opentelemetry-java/pull/8557))
+
+## Version 1.63.0 (2026-06-05)
+
+### API
+
+* Add missing `setAttribute` shortcuts to `Span` and `LogRecordBuilder`
+ ([#8255](https://github.com/open-telemetry/opentelemetry-java/pull/8255))
+* Promote `InstrumentationUtil` to public class in `io.opentelemetry.api.impl` package
+ ([#8413](https://github.com/open-telemetry/opentelemetry-java/pull/8413))
+* Fix index-out-of-bounds in `StrictContextStorage`
+ ([#8294](https://github.com/open-telemetry/opentelemetry-java/pull/8294))
+
+#### Incubating
+
+* **BREAKING** Remove deprecated `ExtendedAttributes` and related code
+ ([#8395](https://github.com/open-telemetry/opentelemetry-java/pull/8395))
+
+### SDK
+
+#### Metrics
+
+* Collect async exemplars when exemplar filter is `always_on`
+ ([#8363](https://github.com/open-telemetry/opentelemetry-java/pull/8363))
+* Move delta record/collect coordination from instrument to series level
+ ([#8313](https://github.com/open-telemetry/opentelemetry-java/pull/8313))
+
+#### Exporters
+
+* Add `noop()` factory method to `SpanExporter` and `LogRecordExporter`
+ ([#8435](https://github.com/open-telemetry/opentelemetry-java/pull/8435))
+* **BREAKING** OTLP: Remove support for deprecated `GrpcSenderProvider` and `HttpSenderProvider` SPI
+ property names (use `io.opentelemetry.sdk.common.export.GrpcSenderProvider` /
+ `io.opentelemetry.sdk.common.export.HttpSenderProvider` instead)
+ ([#8392](https://github.com/open-telemetry/opentelemetry-java/pull/8392))
+* OTLP: Bound OkHttp sender dispatchers and surface rejections
+ ([#8422](https://github.com/open-telemetry/opentelemetry-java/pull/8422))
+* Prometheus: Limit exemplar label characters to conform to Prometheus limits
+ ([#8362](https://github.com/open-telemetry/opentelemetry-java/pull/8362))
+* Logging: Fix `LoggingSpanExporter.flush()` to preserve flush failures
+ ([#8361](https://github.com/open-telemetry/opentelemetry-java/pull/8361))
+* Zipkin: Make exporter self-contained by removing shared internal code dependencies
+ ([#8413](https://github.com/open-telemetry/opentelemetry-java/pull/8413))
+
+#### Extensions
+
+* **BREAKING** Autoconfigure: Remove deprecated `otel.experimental.config.file` property
+ ([#8393](https://github.com/open-telemetry/opentelemetry-java/pull/8393))
+* **BREAKING** Incubator: Remove deprecated `ViewConfig`/`ViewConfigCustomizer` view file config mechanism
+ ([#8394](https://github.com/open-telemetry/opentelemetry-java/pull/8394))
+* Declarative config: Fix model package
+ ([#8403](https://github.com/open-telemetry/opentelemetry-java/pull/8403))
+* Declarative config: Fix Java module name to `io.opentelemetry.sdk.autoconfigure.declarativeconfig`
+ ([#8452](https://github.com/open-telemetry/opentelemetry-java/pull/8452))
+
+### Shims
+
+* Deprecate OpenTracing shim public API
+ ([#8373](https://github.com/open-telemetry/opentelemetry-java/pull/8373))
+
+### Project tooling
+
+* Finish adding OSGi support across all modules
+ ([#8401](https://github.com/open-telemetry/opentelemetry-java/pull/8401),
+ [#8417](https://github.com/open-telemetry/opentelemetry-java/pull/8417))
+* Force `io.zipkin.zipkin2:zipkin:3.6.1` to avoid problematic gson version
+ ([#8430](https://github.com/open-telemetry/opentelemetry-java/pull/8430))
+
+## Version 1.62.0 (2026-05-08)
+
+### API
+
+#### Context
+
+* Fix [GHSA-rcgg-9c38-7xpx](https://github.com/open-telemetry/opentelemetry-java/security/advisories/GHSA-rcgg-9c38-7xpx): Apply limits to baggage entries for `W3CBaggagePropagator`, `OtTracePropagator`, `JaegerPropagator`
+ ([#8378](https://github.com/open-telemetry/opentelemetry-java/pull/8378))
+
+### SDK
+
+#### Traces
+
+* Avoid `parentContext` allocation on span start for the common case
+ ([#8332](https://github.com/open-telemetry/opentelemetry-java/pull/8332))
+
+#### Metrics
+
+* Add `setMaxExportBatchSize` to `PeriodicMetricReaderBuilder`
+ ([#8296](https://github.com/open-telemetry/opentelemetry-java/pull/8296))
+* Fix `PeriodicMetricReader` shutdown race that could drop the final flush
+ ([#8299](https://github.com/open-telemetry/opentelemetry-java/pull/8299))
+
+#### Exporters
+
+* **BREAKING** Prometheus: Change default server host from `0.0.0.0` to `localhost`
+ ([#8298](https://github.com/open-telemetry/opentelemetry-java/pull/8298))
+* **BREAKING** Prometheus: Stop converting unit `"1"` to `"ratio"`
+ ([#8252](https://github.com/open-telemetry/opentelemetry-java/pull/8252))
+* OTLP: Fix null input handling in `StringEncoder`
+ ([#8312](https://github.com/open-telemetry/opentelemetry-java/pull/8312))
+* OTLP: Align proto field types and wire tag names in marshalers
+ ([#8293](https://github.com/open-telemetry/opentelemetry-java/pull/8293))
+* OTLP: Fix `MarshalerUtil` `sizeRepeatedString` calculation
+ ([#8284](https://github.com/open-telemetry/opentelemetry-java/pull/8284))
+* OTLP: Bound `JdkHttpSender` thread pool size to prevent unbounded thread creation
+ ([#8276](https://github.com/open-telemetry/opentelemetry-java/pull/8276))
+* OTLP Profiles: Split profiles data model into separate `sdk-profiles` and JFR shim modules
+ ([#8207](https://github.com/open-telemetry/opentelemetry-java/pull/8207))
+* OTLP Profiles: Publish alpha release of `opentelemetry-sdk-profiles` and
+ `opentelemetry-exporter-otlp-profiles`
+ ([#8351](https://github.com/open-telemetry/opentelemetry-java/pull/8351))
+
+#### Extensions
+
+* **BREAKING** Declarative config: Extract to new `opentelemetry-sdk-extension-declarative-config`
+ artifact with new package `io.opentelemetry.sdk.autoconfigure.declarativeconfig`
+ ([#8265](https://github.com/open-telemetry/opentelemetry-java/pull/8265))
+* Autoconfigure: Add file size validation in `OtlpConfigUtil` to avoid unsafe cast to `int`
+ ([#8287](https://github.com/open-telemetry/opentelemetry-java/pull/8287))
+* Declarative config: Fix collection fields to not be initialized to empty by default
+ ([#8356](https://github.com/open-telemetry/opentelemetry-java/pull/8356))
+* Incubator: Add `EventToSpanEventBridge` to bridge log-based events to span events
+ ([#8372](https://github.com/open-telemetry/opentelemetry-java/pull/8372))
+
+#### Testing
+
+* Add `@Nullable` to `equalTo` value argument in `OpenTelemetryAssertions`
+ ([#8301](https://github.com/open-telemetry/opentelemetry-java/pull/8301))
+* Add `hasValueSatisfying` to `LongPointAssert` and `DoublePointAssert` for fuzzy value matching
+ ([#8328](https://github.com/open-telemetry/opentelemetry-java/pull/8328))
+* Add `containsPointsSatisfying` to metric data asserts for "each given assertion must be
+ satisfied by at least one point, extras allowed" checks on sum, gauge, histogram, exponential
+ histogram, and summary data
+ ([#8329](https://github.com/open-telemetry/opentelemetry-java/pull/8329))
+
+### Project tooling
+
+* Add initial OSGi support
+ ([#7964](https://github.com/open-telemetry/opentelemetry-java/pull/7964))
+* Promote `ApiUsageLogger` to `opentelemetry-common` public API
+ ([#8318](https://github.com/open-telemetry/opentelemetry-java/pull/8318))
+* Establish exception logging guidelines and fix inconsistent patterns across exporters and SDK
+ ([#8231](https://github.com/open-telemetry/opentelemetry-java/pull/8231))
+* Add `*.impl.*` package naming convention for internal code with japicmp compatibility
+ ([#8325](https://github.com/open-telemetry/opentelemetry-java/pull/8325))
+* Add Sonatype dependency audit to build
+ ([#8365](https://github.com/open-telemetry/opentelemetry-java/pull/8365))
+
+## Version 1.61.0 (2026-04-10)
+
+### API
+
+* Stabilize `isEnabled()` on `Tracer`, `Logger`, and metric instruments
+ ([#8200](https://github.com/open-telemetry/opentelemetry-java/pull/8200))
+
+#### Incubating
+
+* **BREAKING** Update `EnvironmentGetter` and `EnvironmentSetter` key normalization to reflect spec
+ changes
+ ([#8233](https://github.com/open-telemetry/opentelemetry-java/pull/8233))
+
+### SDK
+
+#### Traces
+
+* Retain propagated context when generating random trace IDs
+ ([#8263](https://github.com/open-telemetry/opentelemetry-java/pull/8263))
+* Add rate-limited warning log when `BatchSpanProcessor` drops spans
+ ([#8167](https://github.com/open-telemetry/opentelemetry-java/pull/8167))
+
+#### Metrics
+
+* Track series start time per aggregator rather than at `SdkMeterProvider` creation time
+ ([#8180](https://github.com/open-telemetry/opentelemetry-java/pull/8180))
+* Capture context class loader during async callback registration
+ ([#8091](https://github.com/open-telemetry/opentelemetry-java/pull/8091))
+* Make include/exclude work correctly with empty (but non-null) lists
+ ([#8185](https://github.com/open-telemetry/opentelemetry-java/pull/8185))
+
+#### Logs
+
+* Fix condition for recording successful log processing metrics
+ ([#8226](https://github.com/open-telemetry/opentelemetry-java/pull/8226))
+
+#### Exporters
+
+* OTLP: add configurable bounds to response body reading
+ ([#8224](https://github.com/open-telemetry/opentelemetry-java/pull/8224), [#8277](https://github.com/open-telemetry/opentelemetry-java/pull/8277))
+* OTLP: only throw invalid response exception when gRPC response size < 5 bytes
+ ([#8194](https://github.com/open-telemetry/opentelemetry-java/pull/8194))
+* OTLP: remove duplicate FINEST-level error logging in gRPC exporter
+ ([#8216](https://github.com/open-telemetry/opentelemetry-java/pull/8216))
+* OTLP Profiles: clean up profile signal exporters for consistency
+ ([#8172](https://github.com/open-telemetry/opentelemetry-java/pull/8172))
+
+#### Extensions
+
+* **BREAKING** Autoconfigure: remove deprecated `ComponentLoader` class (use
+ `io.opentelemetry.common.ComponentLoader` instead)
+ ([#8243](https://github.com/open-telemetry/opentelemetry-java/pull/8243))
+* Declarative config: fix `DeclarativeConfigProperties` javadoc to not throw exceptions
+ ([#8079](https://github.com/open-telemetry/opentelemetry-java/pull/8079))
+* Declarative config: resource attribute filtering should include attributes by default
+ ([#8177](https://github.com/open-telemetry/opentelemetry-java/pull/8177))
+* Declarative config: enforce IncludedExcludeModel .included and .excluded are not empty
+ ([#8266](https://github.com/open-telemetry/opentelemetry-java/pull/8266))
+* Autoconfigure: restructure SDK incubator to not depend on autoconfigure internals
+ ([#8242](https://github.com/open-telemetry/opentelemetry-java/pull/8242))
+
+### Project tooling
+
+* Disable Gradle build cache on releases to mitigate supply chain risk
+ ([#8254](https://github.com/open-telemetry/opentelemetry-java/pull/8254))
+
+## Version 1.60.1 (2026-03-08)
+
+### SDK
+
+#### Extensions
+
+* Autoconfigure: fix warning always emitted
+ ([#8157](https://github.com/open-telemetry/opentelemetry-java/pull/8157))
+
+## Version 1.60.0 (2026-03-06)
+
+### API
+
+* Support W3C trace context random flag
+ ([#8012](https://github.com/open-telemetry/opentelemetry-java/pull/8012))
+* Clarify that `SpanBuilder.setAttribute` allows null values
+ ([#8072](https://github.com/open-telemetry/opentelemetry-java/pull/8072))
+
+#### Incubating
+
+* Implement environment variable context propagation carriers
+ ([#8074](https://github.com/open-telemetry/opentelemetry-java/pull/8074))
+* Deprecate `ExtendedAttributes`, `ExtendedAttributeKey`, `ExtendedAttributeType`,
+ `ExtendedAttributesBuilder`
+ ([#8060](https://github.com/open-telemetry/opentelemetry-java/pull/8060))
+* Deprecate `peerServiceMapping` accessor from `InstrumentationConfigUtil`
+ ([#8088](https://github.com/open-telemetry/opentelemetry-java/pull/8088))
+
+### SDK
+
+#### Traces
+
+* Disable warning when using `TraceIdRatioBasedSampler` as root sampler
+ ([#8065](https://github.com/open-telemetry/opentelemetry-java/pull/8065))
+* User-supplied attributes take precedence over exception-derived attributes
+ ([#7993](https://github.com/open-telemetry/opentelemetry-java/pull/7993))
+* Exclude META-INF/maven from traces SDK shaded dependencies
+ ([#8096](https://github.com/open-telemetry/opentelemetry-java/pull/8096))
+* Fix inverted condition in LegacySpanProcessorInstrumentation#finishSpans
+ ([#8145](https://github.com/open-telemetry/opentelemetry-java/pull/8145))
+
+#### Metrics
+
+* Split out cumulative vs. delta storage
+ ([#8015](https://github.com/open-telemetry/opentelemetry-java/pull/8015))
+* Add metrics for `PeriodicMetricReader`
+ ([#8038](https://github.com/open-telemetry/opentelemetry-java/pull/8038))
+* Allow configuring min/max in histograms
+ ([#8095](https://github.com/open-telemetry/opentelemetry-java/pull/8095))
+* Remove deprecated `otel.experimental.metrics.cardinality.limit` property
+ ([#8124](https://github.com/open-telemetry/opentelemetry-java/pull/8124))
+* **BREAKING** bug fix: `GlobUtil` and `IncludePatternMatching`, used in views and declarative
+ config matching, previously were inconsistent in case sensitivity. If a glob char (* or ?) was
+ present, it was evaluated with case sensitivity. If no glob chars were present, it was evaluated
+ with case insensitivity. Now, all are consistently evaluated with case sensitivity.
+ ([#8152](https://github.com/open-telemetry/opentelemetry-java/pull/8152))
+
+#### Logs
+
+* Stabilize `LogRecordBuilder.setException`
+ ([#8089](https://github.com/open-telemetry/opentelemetry-java/pull/8089))
+* Clarify `setTimestamp` javadoc for event timestamp behavior
+ ([#8104](https://github.com/open-telemetry/opentelemetry-java/pull/8104))
+
+#### Exporters
+
+* OTLP: Fix marshaling for empty string attributes
+ ([#8014](https://github.com/open-telemetry/opentelemetry-java/pull/8014))
+* Prometheus: Update Prometheus client to 1.5.0
+ ([#8080](https://github.com/open-telemetry/opentelemetry-java/pull/8080))
+* OTLP: Serialize exponential histogram sum as optional double
+ ([#8107](https://github.com/open-telemetry/opentelemetry-java/pull/8107))
+* OTLP: Use `KeyManagerFactory.getDefaultAlgorithm()` in `TlsUtil.keyManager()`
+ ([#8122](https://github.com/open-telemetry/opentelemetry-java/pull/8122))
+* OTLP: Ensure proto serializer idCache is cleared when exception is thrown
+ ([#8147](https://github.com/open-telemetry/opentelemetry-java/pull/8147))
+
+#### Extensions
+
+* Autoconfigure: Decode plus sign in resource attributes
+ ([#8059](https://github.com/open-telemetry/opentelemetry-java/pull/8059))
+* Declarative config: update to 1.0 schema
+ ([#8123](https://github.com/open-telemetry/opentelemetry-java/pull/8123))
+* Declarative config: add support for setting schema URL
+ ([#8028](https://github.com/open-telemetry/opentelemetry-java/pull/8028))
+* Declarative config: add version mismatch warning
+ ([#8069](https://github.com/open-telemetry/opentelemetry-java/pull/8069))
+* Declarative config: cache component providers in `DeclarativeConfigContext`
+ ([#8070](https://github.com/open-telemetry/opentelemetry-java/pull/8070))
+* Declarative config: add system property substitution
+ ([#8073](https://github.com/open-telemetry/opentelemetry-java/pull/8073))
+* Declarative config: add exporter customizers
+ ([#8081](https://github.com/open-telemetry/opentelemetry-java/pull/8081))
+* Declarative config: add support for setting internal telemetry version
+ ([#8045](https://github.com/open-telemetry/opentelemetry-java/pull/8045))
+* Deprecate View File Configuration mechanism
+ ([#8133](https://github.com/open-telemetry/opentelemetry-java/pull/8133))
+* Autoconfigure: add property to allow autoconfiguration of SDK telemetry version
+ ([#8037](https://github.com/open-telemetry/opentelemetry-java/pull/8037))
+* Jaeger remote sampler: refactor to leverage senders
+ ([#8046](https://github.com/open-telemetry/opentelemetry-java/pull/8046))
+* Declarative config: document ObjectMapper config
+ ([#8075](https://github.com/open-telemetry/opentelemetry-java/pull/8075))
+* Declarative config: Remove unchecked warning
+ ([#8090](https://github.com/open-telemetry/opentelemetry-java/pull/8090))
+
+### Project tooling
+
+* Add architecture test to detect usage of shared internal code
+ ([#6978](https://github.com/open-telemetry/opentelemetry-java/pull/6978))
+* Replace Xlint deprecation check with custom error-prone check
+ ([#8061](https://github.com/open-telemetry/opentelemetry-java/pull/8061))
+* Enable error-prone's UnnecessarilyFullyQualified check
+ ([#8078](https://github.com/open-telemetry/opentelemetry-java/pull/8078))
+* Small refactoring to make safety clearer
+ ([#8083](https://github.com/open-telemetry/opentelemetry-java/pull/8083))
+* Rework span record benchmark and publish results
+ ([#8031](https://github.com/open-telemetry/opentelemetry-java/pull/8031))
+* Add `LogRecordBenchmark`
+ ([#8106](https://github.com/open-telemetry/opentelemetry-java/pull/8106),
+ [#8117](https://github.com/open-telemetry/opentelemetry-java/pull/8117))
+
+## Version 1.59.0 (2026-02-06)
+
+### API
+
+* Stabilize complex attributes
+ ([#7973](https://github.com/open-telemetry/opentelemetry-java/pull/7973))
+* Limit init valid hex array to range that can be true
+ ([#7809](https://github.com/open-telemetry/opentelemetry-java/pull/7809))
+
+#### Extensions
+
+* Trace propagators: Deprecate OtTracePropagator
+ ([#8020](https://github.com/open-telemetry/opentelemetry-java/pull/8020))
+* Trace propagators: Deprecate JaegerPropagator
+ ([#8019](https://github.com/open-telemetry/opentelemetry-java/pull/8019))
+
+### SDK
+
+* Move io.opentelemetry.sdk.internal to io.opentelemetry.sdk.common.internal
+ ([#8003](https://github.com/open-telemetry/opentelemetry-java/pull/8003))
+* Always return ExtendedOpenTelemetry when incubator is available
+ ([#7991](https://github.com/open-telemetry/opentelemetry-java/pull/7991))
+
+#### Traces
+
+* Fix memory leak in SdkSpan#spanEndingThread
+ ([#7984](https://github.com/open-telemetry/opentelemetry-java/pull/7984))
+
+#### Metrics
+
+* Rework and publish metric benchmarks
+ ([#8000](https://github.com/open-telemetry/opentelemetry-java/pull/8000))
+* Update LongLastValueAggregator algo to avoid allocations
+ ([#8017](https://github.com/open-telemetry/opentelemetry-java/pull/8017))
+
+#### Testing
+
+* Fix OTel JUnit5 Extension cleanup when using Nested test classes
+ ([#7999](https://github.com/open-telemetry/opentelemetry-java/pull/7999))
+* Add assertion support for Span hasException(null)
+ ([#8033](https://github.com/open-telemetry/opentelemetry-java/pull/8033))
+
+#### Exporters
+
+* **DEPRECATION**: `opentelemetry-exporter-zipkin` is now deprecated with the
+ last release planned for 1.65.0 (August 2026)
+ ([#7974](https://github.com/open-telemetry/opentelemetry-java/pull/7974))
+* Refactor http, grpc senders and promote to public API
+ ([#7782](https://github.com/open-telemetry/opentelemetry-java/pull/7782))
+
+#### Extensions
+
+* Jaeger remote sampler: Remove unused code
+ ([#7970](https://github.com/open-telemetry/opentelemetry-java/pull/7970))
+* Incubator: Add AlwaysRecordSampler
+ ([#7877](https://github.com/open-telemetry/opentelemetry-java/pull/7877))
+
+### Project tooling
+
+* Align generate release contributors
+ ([#8023](https://github.com/open-telemetry/opentelemetry-java/pull/8023))
+
+## Version 1.58.0 (2026-01-09)
+
+### API
+
+#### Incubator
+
+* Delete GlobalConfigProvider in favor of access via ExtendedOpenTelemetry
+ ([#7914](https://github.com/open-telemetry/opentelemetry-java/pull/7914))
+* Add DeclarativeConfigProperties#get method
+ ([#7923](https://github.com/open-telemetry/opentelemetry-java/pull/7923))
+* Update ConfigProvider#getInstrumentationConfig response to be non-null
+ ([#7954](https://github.com/open-telemetry/opentelemetry-java/pull/7954))
+* Add declarative config utility methods for common operations
+ ([#7927](https://github.com/open-telemetry/opentelemetry-java/pull/7927))
+
+### SDK
+
+#### Traces
+
+* Implement SDK metrics for trace
+ ([#7895](https://github.com/open-telemetry/opentelemetry-java/pull/7895),
+ [#7930](https://github.com/open-telemetry/opentelemetry-java/pull/7930))
+* Emit warning when TraceIdRatioBasedSampler is used as child sampler
+ ([#7937](https://github.com/open-telemetry/opentelemetry-java/pull/7937))
+
+#### Logs
+
+* Implement SDK metrics for logs
+ ([#7931](https://github.com/open-telemetry/opentelemetry-java/pull/7931))
+
+#### Exporters
+
+* Prom exporter update
+ ([#7934](https://github.com/open-telemetry/opentelemetry-java/pull/7934))
+
+#### Extensions
+
+* Declarative config: update to opentelemetry-configuration 1.0.0-rc.3
+ ([#7861](https://github.com/open-telemetry/opentelemetry-java/pull/7861))
+* Declarative config: update jaeger remote sampler to require endpoint, initial_sampler
+ ([#7943](https://github.com/open-telemetry/opentelemetry-java/pull/7943))
+* Declarative config: add support for view unit
+ ([#7942](https://github.com/open-telemetry/opentelemetry-java/pull/7942))
+* Declarative config: add support for new logger config minimum_severity and trace_based properties
+ ([#7940](https://github.com/open-telemetry/opentelemetry-java/pull/7940))
+* Declarative config: add support for composable parent threshold sampler
+ ([#7941](https://github.com/open-telemetry/opentelemetry-java/pull/7941))
+* Declarative config: improve pattern for validating and loading SDK extension plugins
+ ([#7947](https://github.com/open-telemetry/opentelemetry-java/pull/7947))
+
+### Project tooling
+
+* Use develocity build cache in PRs and local builds
+ ([#7906](https://github.com/open-telemetry/opentelemetry-java/pull/7906))
+* Configure japicmp classpath to avoid false positives
+ ([#7945](https://github.com/open-telemetry/opentelemetry-java/pull/7945))
+
+## Version 1.57.0 (2025-12-05)
+
+### API
+
+* Add `GlobalOpenTelemetry#getOrNoop`, `#isSet`. Update `#get` to always returns obfuscated instance
+ ([#7819](https://github.com/open-telemetry/opentelemetry-java/pull/7819))
+
+#### Incubating
+
+* Logs: Complex attributes incubating implementation
+ ([#7814](https://github.com/open-telemetry/opentelemetry-java/pull/7814))
+
+### SDK
+
+#### Logs
+
+* Add minimum severity and trace-based logger configuration (incubating API)
+ ([#7529](https://github.com/open-telemetry/opentelemetry-java/pull/7529))
+
+#### Exporters
+
+* OTLP: VarHandle string encoder
+ ([#7701](https://github.com/open-telemetry/opentelemetry-java/pull/7701))
+* OTLP: Fix OkHttpGrpcSender to properly await executor shutdown
+ ([#7840](https://github.com/open-telemetry/opentelemetry-java/pull/7840))
+* OTLP: avoid auto-config warning
+ ([#7881](https://github.com/open-telemetry/opentelemetry-java/pull/7881))
+* OTLP: update error message for missing GrpcSenderProvider dependency
+ ([#7884](https://github.com/open-telemetry/opentelemetry-java/pull/7884))
+
+#### Extensions
+
+* Declarative config: add runtime hints for graal VM
+ ([#7866](https://github.com/open-telemetry/opentelemetry-java/pull/7866))
+* Declarative config: add missing warning about discarded value
+ ([#7821](https://github.com/open-telemetry/opentelemetry-java/pull/7821))
+
+### Project tooling
+
+* Update macos version to latest and switch to corretto for testing
+ ([#7841](https://github.com/open-telemetry/opentelemetry-java/pull/7841))
+* Sync Java worflows: Allow re-running prepare release branch workflow
+ ([#7845](https://github.com/open-telemetry/opentelemetry-java/pull/7845))
+* Simplify and standardize renovate custom managers across Java repos
+ ([#7846](https://github.com/open-telemetry/opentelemetry-java/pull/7846))
+* Remove misspell workflow
+ ([#7852](https://github.com/open-telemetry/opentelemetry-java/pull/7852))
+* Fix link checks on main
+ ([#7867](https://github.com/open-telemetry/opentelemetry-java/pull/7867))
+* Add zeitlinger as approver
+ ([#7868](https://github.com/open-telemetry/opentelemetry-java/pull/7868))
+* Move snapshot publishing to daily build
+ ([#7886](https://github.com/open-telemetry/opentelemetry-java/pull/7886))
+
+## Version 1.56.0 (2025-11-07)
+
+### API
+
+#### Incubator
+
+* Support ExtendedOpenTelemetry in GlobalOpenTelemetry
+ ([#7799](https://github.com/open-telemetry/opentelemetry-java/pull/7799))
+
+### SDK
+
+* Changes to MeterConfig, LoggerConfig, TracerConfig are guaranteed to be eventually visible
+ ([#7706](https://github.com/open-telemetry/opentelemetry-java/pull/7706))
+
+#### Metrics
+
+* Stabilize ExemplarFilter
+ ([#7768](https://github.com/open-telemetry/opentelemetry-java/pull/7768))
+* Type specific exemplar reservoirs
+ ([#7758](https://github.com/open-telemetry/opentelemetry-java/pull/7758))
+
+#### Extensions
+
+* SDK incubator: Add incubator ComposableRuleBasedSampler
+ ([#7787](https://github.com/open-telemetry/opentelemetry-java/pull/7787))
+* SDK incubator: Add incubator ComposableAnnotatingSampler
+ ([#7804](https://github.com/open-telemetry/opentelemetry-java/pull/7804))
+* SDK incubator: Rename ComposableTraceIdRatioBased to ComposableProbability
+ ([#7786](https://github.com/open-telemetry/opentelemetry-java/pull/7786))
+* Declarative config: **BREAKING** Remove component provider generic type
+ ([#7606](https://github.com/open-telemetry/opentelemetry-java/pull/7606))
+* Declarative config: Add declarative config support for ExemplarFilter
+ ([#7769](https://github.com/open-telemetry/opentelemetry-java/pull/7769))
+* Declarative config: Fix a few declarative configuration bugs
+ ([#7807](https://github.com/open-telemetry/opentelemetry-java/pull/7807))
+
+### Project tooling
+
+* Move to oracle bare metal benchmark runner
+ ([#7740](https://github.com/open-telemetry/opentelemetry-java/pull/7740))
+* Enable Develocity build scans
+ ([#7776](https://github.com/open-telemetry/opentelemetry-java/pull/7776))
+* Document GPG signing key
+ ([#7783](https://github.com/open-telemetry/opentelemetry-java/pull/7783))
+* Update build to use java 21
+ ([#7784](https://github.com/open-telemetry/opentelemetry-java/pull/7784))
+* Sync repository-settings.md documentation
+ ([#7791](https://github.com/open-telemetry/opentelemetry-java/pull/7791))
+* Fix gradle deprecation warning
+ ([#7780](https://github.com/open-telemetry/opentelemetry-java/pull/7780))
+* Small alignments of workflows across the 6 Java repos
+ ([#7806](https://github.com/open-telemetry/opentelemetry-java/pull/7806))
+* Implement min java version gradle tooling from instrumentation repo
+ ([#7801](https://github.com/open-telemetry/opentelemetry-java/pull/7801))
+
+## Version 1.55.0 (2025-10-13)
+
+### API
+
+#### Common
+
+* Improve GraalVM native image compatibility
+ ([#7160](https://github.com/open-telemetry/opentelemetry-java/pull/7160))
+
+#### Traces
+
+* Fix `TraceState` key validation limits to match W3C specification
+ ([#7575](https://github.com/open-telemetry/opentelemetry-java/pull/7575))
+
+#### Incubator
+
+* Add `ExtendedOpenTelemetry` API
+ ([#7496](https://github.com/open-telemetry/opentelemetry-java/pull/7496))
+* Add incubator implementation of composite sampling specification
+ ([#7626](https://github.com/open-telemetry/opentelemetry-java/pull/7626))
+
+### SDK
+
+#### Traces
+
+* Proactively avoid `Unsafe` on Java 23+ to avoid triggering JVM warning message
+ ([#7691](https://github.com/open-telemetry/opentelemetry-java/pull/7691))
+
+#### Metrics
+
+* Add `setMeterConfigurator()` support to `MeterProvider` (incubating API)
+ ([#7346](https://github.com/open-telemetry/opentelemetry-java/pull/7346))
+
+#### Exporters
+
+* OTLP: Configure metric exporter to use SDK's `MeterProvider` for internal metrics
+ ([#7541](https://github.com/open-telemetry/opentelemetry-java/pull/7541))
+* OTLP: Suppress logging of `InterruptedException` from managed OkHttp threads
+ ([#7565](https://github.com/open-telemetry/opentelemetry-java/pull/7565))
+* OTLP: Update dependency from `okhttp-jvm` back to `okhttp` for Gradle users,
+ preserving `okhttp-jvm` for Maven users
+ ([#7681](https://github.com/open-telemetry/opentelemetry-java/pull/7681))
+* Prometheus: Remove separate `otel_scope_info` metric and always add scope labels to data points
+ ([#7398](https://github.com/open-telemetry/opentelemetry-java/pull/7398))
+* Prometheus: Update exporter dependencies to use protobuf-free formats
+ ([#7664](https://github.com/open-telemetry/opentelemetry-java/pull/7664))
+
+#### Profiling
+
+* Update profiles exporter to support proto v1.8.0-alpha changes
+ ([#7638](https://github.com/open-telemetry/opentelemetry-java/pull/7638))
+* Add abstractions to assist with dictionary table assembly
+ ([#7717](https://github.com/open-telemetry/opentelemetry-java/pull/7717))
+* Add abstractions to assist with sample composition
+ ([#7727](https://github.com/open-telemetry/opentelemetry-java/pull/7727))
+
+#### Extensions
+
+* Autoconfigure: Improve exception logging when running in Maven
+ ([#7336](https://github.com/open-telemetry/opentelemetry-java/pull/7336))
+* Declarative configuration: Return `Resource`
+ ([#7639](https://github.com/open-telemetry/opentelemetry-java/pull/7639))
+* Declarative configuration: Invoke auto-configure listeners
+ ([#7654](https://github.com/open-telemetry/opentelemetry-java/pull/7654))
+* Declarative configuration: Add logging when incompatible types are found
+ ([#7693](https://github.com/open-telemetry/opentelemetry-java/pull/7693))
+
+### Shims
+
+#### OpenTracing Shim
+
+* Improve log levels in error scenarios
+ ([#6832](https://github.com/open-telemetry/opentelemetry-java/pull/6832))
+
+### Project tooling
+
+* Respect `testJavaVersion` property when running JMH benchmarks
+ ([#7697](https://github.com/open-telemetry/opentelemetry-java/pull/7697))
+
+## Version 1.54.1 (2025-09-18)
+
+### SDK
+
+#### Exporters
+
+* Prometheus: Fix regression in protobuf format export
+ ([#7664](https://github.com/open-telemetry/opentelemetry-java/pull/7664))
+
+## Version 1.54.0 (2025-09-05)
+
+### API
+
+#### Baggage
+
+* Fix guard against ArrayIndexOutOfBoundsException in BaggageCodec
+ ([#7239](https://github.com/open-telemetry/opentelemetry-java/pull/7239))
+
+### SDK
+
+#### Metrics
+
+* Fix MetricData.getDoubleSumData() ClassCastException with custom implementations
+ ([#7597](https://github.com/open-telemetry/opentelemetry-java/pull/7597))
+
+#### Exporters
+
+* Fix HttpExporterBuilder.copy() and GrpcExporterBuilder.copy() to preserve component loader
+ ([#7596](https://github.com/open-telemetry/opentelemetry-java/pull/7596))
+
+#### Extensions
+
+* Autoconfigure: Remove support for old EnvironmentResourceProvider package name
+ ([#7622](https://github.com/open-telemetry/opentelemetry-java/pull/7622))
+* Declarative config: Add DeclarativeConfigurationProvider SPI
+ ([#7472](https://github.com/open-telemetry/opentelemetry-java/pull/7472))
+* Declarative config: Pass meter provider to avoid using the global OpenTelemetry instance
+ ([#7475](https://github.com/open-telemetry/opentelemetry-java/pull/7475))
+
+### Project tooling
+
+* Update to Gradle v9
+ ([#7590](https://github.com/open-telemetry/opentelemetry-java/pull/7590))
+
+## Version 1.53.0 (2025-08-08)
+
+### SDK
+
+* File based config will log the wrong file format, when applicable.
+ ([#7498](https://github.com/open-telemetry/opentelemetry-java/pull/7498))
+
+#### Exporters
+
+* Change `okhttp` dependency to `okhttp-jvm`, which fixes missing class failures in
+ transitive dependencies.
+ ([#7517](https://github.com/open-telemetry/opentelemetry-java/pull/7517))
+
+## Version 1.52.0 (2025-07-11)
+
+### API
+
+#### Common
+
+* Promote `ComponentLoader` to new `opentelemetry-common` artifact,
+ standardize SPI loading
+ ([#7446](https://github.com/open-telemetry/opentelemetry-java/pull/7446))
+
+#### Context
+
+* LazyStorage passes its ClassLoader when loading ContextStorageProvider SPI
+ ([#7424](https://github.com/open-telemetry/opentelemetry-java/pull/7424))
+
+#### Incubator
+
+* Add context and severity params to ExtendedLogger#isEnabled
+ ([#7268](https://github.com/open-telemetry/opentelemetry-java/pull/7268))
+* Add new convenience methods for converting DeclarativeConfigProperties to config model
+ ([#7453](https://github.com/open-telemetry/opentelemetry-java/pull/7453))
+
+### SDK
+
+* Add custom stacktrace renderer which is length limit aware
+ ([#7281](https://github.com/open-telemetry/opentelemetry-java/pull/7281))
+
+#### Metrics
+
+* Propagate flush to PeriodicMetricReader's metricExporter.
+ ([#7410](https://github.com/open-telemetry/opentelemetry-java/pull/7410))
+
+#### Exporters
+
+* OTLP - JdkHttpSender: ensure proper closure of HttpClient in shutdown method
+ ([#7390](https://github.com/open-telemetry/opentelemetry-java/pull/7390))
+* OTLP: profile exporters fix and test improvements
+ ([#7442](https://github.com/open-telemetry/opentelemetry-java/pull/7442))
+* OTLP: Loading Compressor SPI via ComponentLoader configured through setComponentLoader
+ ([#7428](https://github.com/open-telemetry/opentelemetry-java/pull/7428))
+* Prometheus: add scope schema URL and attributes
+ ([#7356](https://github.com/open-telemetry/opentelemetry-java/pull/7356))
+* Prometheus: extend prometheus declarative config support to include without_scope_info,
+ with_resource_constant_labels
+ ([#6840](https://github.com/open-telemetry/opentelemetry-java/pull/6840))
+
+#### Extensions
+
+* Autoconfigure: fix race condition of `GlobalOpenTelemetry` initialization with
+ `AutoConfiguredOpenTelemetrySdkBuilder`
+ ([#7365](https://github.com/open-telemetry/opentelemetry-java/pull/7365))
+* Declarative config: update to declarative config 1.0-rc.1
+ ([#7436](https://github.com/open-telemetry/opentelemetry-java/pull/7436))
+* Declarative config: resolve environment variable substitution for mixed quotes
+ ([#7433](https://github.com/open-telemetry/opentelemetry-java/pull/7433))
+
+## Version 1.51.0 (2025-06-06)
+
+### API
+
+#### Context
+
+* Fix context storage provider property name in log message
+ ([#7342](https://github.com/open-telemetry/opentelemetry-java/pull/7342))
+
+### SDK
+
+* Experimental configurable exception.* attribute resolution for SdkTracerProvider,
+ SdkLoggerProvider
+ ([#7266](https://github.com/open-telemetry/opentelemetry-java/pull/7266))
+
+#### Exporters
+
+* All exporters: implement new SemConv exporter health metrics, with configuration API for selecting
+ schema version
+ ([#7265](https://github.com/open-telemetry/opentelemetry-java/pull/7265))
+* OTLP: Add gRPC export for profiles signal type.
+ ([#7301](https://github.com/open-telemetry/opentelemetry-java/pull/7301))
+* OTLP: Run JDK HTTP sender on non-daemon threads.
+ ([#7322](https://github.com/open-telemetry/opentelemetry-java/pull/7322))
+* Prometheus: fix serialization of arrays
+ ([#7291](https://github.com/open-telemetry/opentelemetry-java/pull/7291))
+* OTLP: exporter tolerates instances of LogRecordData when incubator is present
+ ([#7393](https://github.com/open-telemetry/opentelemetry-java/pull/7393))
+
+#### Extensions
+
+* Declarative config: Handle instrumentation node changes in yaml config file format 0.4
+ ([#7357](https://github.com/open-telemetry/opentelemetry-java/pull/7357))
+
+## Version 1.50.0 (2025-05-09)
+
+### API
+
+* Clarify that AttributesBuilder.put allows nulls
+ ([#7271](https://github.com/open-telemetry/opentelemetry-java/pull/7271))
+* Stabilize log record event name
+ ([#7277](https://github.com/open-telemetry/opentelemetry-java/pull/7277))
+
+#### Context
+
+* Fix duplicated ExecutorService wrap
+ ([#7245](https://github.com/open-telemetry/opentelemetry-java/pull/7245))
+* Promote getAll to TextMapGetter stable API
+ ([#7267](https://github.com/open-telemetry/opentelemetry-java/pull/7267))
+
+#### Incubator
+
+* Add ExtendedLogRecordBuilder#setException
+ ([#7182](https://github.com/open-telemetry/opentelemetry-java/pull/7182))
+* Add experimental support for log extended attributes
+ ([#7123](https://github.com/open-telemetry/opentelemetry-java/pull/7123))
+
+### SDK
+
+* Remove Java9VersionSpecific clock implementation
+ ([#7221](https://github.com/open-telemetry/opentelemetry-java/pull/7221))
+* Add addProcessorFirst to SdkTracerProviderBuilder, SdkLoggerProviderBuilder
+ ([#7243](https://github.com/open-telemetry/opentelemetry-java/pull/7243))
+
+#### Logs
+
+* Add `setLoggerConfigurator` support to `LoggerProvider`
+ ([#7332](https://github.com/open-telemetry/opentelemetry-java/pull/7332))
+
+#### Metrics
+
+* Add DelegatingMetricData
+ ([#7229](https://github.com/open-telemetry/opentelemetry-java/pull/7229))
+* Spatial aggregation for async instruments with filtering views
+ ([#7264](https://github.com/open-telemetry/opentelemetry-java/pull/7264))
+
+#### Exporters
+
+* Prometheus: Add Authenticator support for PrometheusHttpServer
+ ([#7225](https://github.com/open-telemetry/opentelemetry-java/pull/7225))
+* OTLP: Fix OTLP metric exporter toBuilder() loosing temporality
+ ([#7280](https://github.com/open-telemetry/opentelemetry-java/pull/7280))
+* OTLP: Allow Otlp*MetricExporter's to publish export stats
+ ([#7255](https://github.com/open-telemetry/opentelemetry-java/pull/7255))
+
+#### Extensions
+
+* Declarative config: Add support for escaping env var substitution
+ ([#7033](https://github.com/open-telemetry/opentelemetry-java/pull/7033))
+* Declarative config: update to opentelemetry-configuration 0.4
+ ([#7064](https://github.com/open-telemetry/opentelemetry-java/pull/7064))
+* Declarativeconfig: Refactor internals to add DeclarativeConfigContext
+ ([#7293](https://github.com/open-telemetry/opentelemetry-java/pull/7293))
+
+### Project tooling
+
+* Kotlin extension: Update min kotlin version to 1.8
+ ([#7155](https://github.com/open-telemetry/opentelemetry-java/pull/7155))
+* Add javadoc site crawler
+ ([#7300](https://github.com/open-telemetry/opentelemetry-java/pull/7300),
+ [#7316](https://github.com/open-telemetry/opentelemetry-java/pull/7316))
+
+## Version 1.49.0 (2025-04-04)
+
+### SDK
+
+#### Trace
+
+* Avoid linear queue.size() calls in span producers by storing queue size separately
+ ([#7141](https://github.com/open-telemetry/opentelemetry-java/pull/7141))
+
+#### Exporters
+
+* OTLP: Add support for setting exporter executor service
+ ([#7152](https://github.com/open-telemetry/opentelemetry-java/pull/7152))
+* OTLP: Refine delay jitter for exponential backoff
+ ([#7206](https://github.com/open-telemetry/opentelemetry-java/pull/7206))
+
+#### Extensions
+
+* Autoconfigure: Remove support for otel.experimental.exporter.otlp.retry.enabled
+ ([#7200](https://github.com/open-telemetry/opentelemetry-java/pull/7200))
+* Autoconfigure: Add stable cardinality limit property otel.java.metrics.cardinality.limit
+ ([#7199](https://github.com/open-telemetry/opentelemetry-java/pull/7199))
+* Incubator: Add declarative config model customizer SPI
+ ([#7118](https://github.com/open-telemetry/opentelemetry-java/pull/7118))
+
+## Version 1.48.0 (2025-03-07)
+
+### API
+
+* Add some helpful logging attribute methods to `LogRecordBuilder`
+ ([#7089](https://github.com/open-telemetry/opentelemetry-java/pull/7089))
+
+#### Incubator
+
+* Introduce ConfigProvider API. Rename `StructuredConfigProperties` to `DeclarativeConfigProperties`
+ and move to `opentelemetry-api-incubator`. Rename `FileConfiguration`
+ to `DeclarativeConfiguration`.
+ ([#6549](https://github.com/open-telemetry/opentelemetry-java/pull/6549))
+
+### SDK
+
+* Log warning and adjust when BatchLogRecordProcessor, BatchSpanProcessor `maxExportBatchSize`
+ exceeds `maxQueueSize`.
+ ([#7045](https://github.com/open-telemetry/opentelemetry-java/pull/7045),
+ [#7148](https://github.com/open-telemetry/opentelemetry-java/pull/7148))
+* Fix bug causing `ThrottlingLogger` to log more than once per minute
+ ([#7156](https://github.com/open-telemetry/opentelemetry-java/pull/7156))
+
+#### Metrics
+
+* Remove obsolete `SdkMeterProviderUtil#setCardinalitylimit` API
+ ([#7169](https://github.com/open-telemetry/opentelemetry-java/pull/7169))
+
+#### Traces
+
+* Fix bug preventing accurate reporting of span event dropped attribute count
+ ([#7142](https://github.com/open-telemetry/opentelemetry-java/pull/7142))
+
+#### Exporters
+
+* OTLP: remove support for `otel.java.experimental.exporter.memory_mode`
+ which was previously replaced by `otel.java.exporter.memory_mode`
+ ([#7127](https://github.com/open-telemetry/opentelemetry-java/pull/7127))
+* OTLP: Extract sender parameters to config carrier class
+ (incubating API)
+ ([#7151](https://github.com/open-telemetry/opentelemetry-java/pull/7151))
+* OTLP: Add support for setting OTLP exporter service class loader
+ ([#7150](https://github.com/open-telemetry/opentelemetry-java/pull/7150))
+
+### Tooling
+
+* Update android animalsniffer min API version to 23
+ ([#7153](https://github.com/open-telemetry/opentelemetry-java/pull/7153))
+
+## Version 1.47.0 (2025-02-07)
+
+### API
+
+#### Incubator
+
+* Make `ExtendedTracer` easier to use
+ ([#6943](https://github.com/open-telemetry/opentelemetry-java/pull/6943))
+* Add `ExtendedLogRecordBuilder#setEventName` and corresponding SDK and OTLP serialization
+ ([#7012](https://github.com/open-telemetry/opentelemetry-java/pull/7012))
+* BREAKING: Drop event API / SDK
+ ([#7053](https://github.com/open-telemetry/opentelemetry-java/pull/7053))
+
+### SDK
+
+* Remove -alpha artifacts from runtime classpath of stable components
+ ([#6944](https://github.com/open-telemetry/opentelemetry-java/pull/6944))
+
+#### Traces
+
+* Bugfix: Follow spec on span limits, batch processors
+ ([#7030](https://github.com/open-telemetry/opentelemetry-java/pull/7030))
+* Add experimental `SdkTracerProvider.setScopeConfigurator(ScopeConfigurator)` for
+ updating `TracerConfig` at runtime
+ ([#7021](https://github.com/open-telemetry/opentelemetry-java/pull/7021))
+
+#### Profiles
+
+* Add AttributeKeyValue abstraction to common otlp exporters
+ ([#7026](https://github.com/open-telemetry/opentelemetry-java/pull/7026))
+* Improve profiles attribute table handling
+ ([#7031](https://github.com/open-telemetry/opentelemetry-java/pull/7031))
+
+#### Exporters
+
+* Interpret timeout zero value as no limit
+ ([#7023](https://github.com/open-telemetry/opentelemetry-java/pull/7023))
+* Bugfix - OTLP: Fix concurrent span reusable data marshaler
+ ([#7041](https://github.com/open-telemetry/opentelemetry-java/pull/7041))
+* OTLP: Add ability to customize retry exception predicate
+ ([#6991](https://github.com/open-telemetry/opentelemetry-java/pull/6991))
+* OTLP: Expand default OkHttp sender retry exception predicate
+ ([#7047](https://github.com/open-telemetry/opentelemetry-java/pull/7047),
+ [#7057](https://github.com/open-telemetry/opentelemetry-java/pull/7057))
+
+#### Extensions
+
+* Autoconfigure: Consistent application of exporter customizers when otel.{signal}.exporter=none
+ ([#7017](https://github.com/open-telemetry/opentelemetry-java/pull/7017))
+* Autoconfigure: Promote EnvironmentResourceProvider to public API
+ ([#7052](https://github.com/open-telemetry/opentelemetry-java/pull/7052))
+* Autoconfigure: Ensure `OTEL_PROPAGATORS` still works when `OTEL_SDK_DISABLED=true`.
+ ([#7062](https://github.com/open-telemetry/opentelemetry-java/pull/7062))%
+
+#### Testing
+
+* Add W3CBaggagePropagator to `OpenTelemetryRule`, `OpenTelemetryExtension`.
+ ([#7056](https://github.com/open-telemetry/opentelemetry-java/pull/7056))
+
+## Version 1.46.0 (2025-01-10)
+
+### SDK
+
+* Remove unused dependencies, cleanup code after stabilizing Value
+ ([#6948](https://github.com/open-telemetry/opentelemetry-java/pull/6948))
+* Explicitly allow null into CompletableResultCode.failExceptionally()
+ ([#6963](https://github.com/open-telemetry/opentelemetry-java/pull/6963))
+
+#### Traces
+
+* Fix span setStatus
+ ([#6990](https://github.com/open-telemetry/opentelemetry-java/pull/6990))
+
+#### Logs
+
+* Add getters/accessors for readable fields in ReadWriteLogRecord.
+ ([#6924](https://github.com/open-telemetry/opentelemetry-java/pull/6924))
+
+#### Exporters
+
+* OTLP: Update to opentelemetry-proto 1.5
+ ([#6999](https://github.com/open-telemetry/opentelemetry-java/pull/6999))
+* Bugfix - OTLP: Ensure Serializer runtime exceptions are rethrown as IOException
+ ([#6969](https://github.com/open-telemetry/opentelemetry-java/pull/6969))
+* BREAKING - OTLP: Delete experimental OTLP authenticator concept.
+ See [OTLP authentication docs](https://opentelemetry.io/docs/languages/java/sdk/#authentication)
+ for supported solutions.
+ ([#6984](https://github.com/open-telemetry/opentelemetry-java/pull/6984))
+
+#### Extensions
+
+* BREAKING - Autoconfigure: Remove support for deprecated otel.experimental.resource.disabled.keys
+ ([#6931](https://github.com/open-telemetry/opentelemetry-java/pull/6931))
+
+## Version 1.45.0 (2024-12-06)
+
+### API
+
+* Add convenience method `setAttribute(Attribute, int)` to SpanBuilder (matching the existing
+ convenience method in Span)
+ ([#6884](https://github.com/open-telemetry/opentelemetry-java/pull/6884))
+* Extends TextMapGetter with experimental GetAll() method, implement usage in W3CBaggagePropagator
+ ([#6852](https://github.com/open-telemetry/opentelemetry-java/pull/6852))
+
+### SDK
+
+#### Traces
+
+* Add synchronization to SimpleSpanProcessor to ensure thread-safe export of spans
+ ([#6885](https://github.com/open-telemetry/opentelemetry-java/pull/6885))
+
+#### Metrics
+
+* Lazily initialize ReservoirCells
+ ([#6851](https://github.com/open-telemetry/opentelemetry-java/pull/6851))
+
+#### Logs
+
+* Add synchronization to SimpleLogRecordProcessor to ensure thread-safe export of logs
+ ([#6885](https://github.com/open-telemetry/opentelemetry-java/pull/6885))
+
+#### Exporters
+
+* OTLP: Update opentelementry-proto to 1.4
+ ([#6906](https://github.com/open-telemetry/opentelemetry-java/pull/6906))
+* OTLP: Rename internal Marshaler#writeJsonToGenerator method to allow jackson runtimeOnly dependency
+ ([#6896](https://github.com/open-telemetry/opentelemetry-java/pull/6896))
+* OTLP: Fix repeated string serialization for JSON.
+ ([#6888](https://github.com/open-telemetry/opentelemetry-java/pull/6888))
+* OTLP: Fix missing unsafe available check
+ ([#6920](https://github.com/open-telemetry/opentelemetry-java/pull/6920))
+
+#### Extensions
+
+* Declarative config: Don't require empty objects when referencing custom components
+ ([#6891](https://github.com/open-telemetry/opentelemetry-java/pull/6891))
+
+### Tooling
+
+* Add javadoc boilerplate internal comment v2 for experimental classes
+ ([#6886](https://github.com/open-telemetry/opentelemetry-java/pull/6886))
+* Update develocity configuration
+ ([#6903](https://github.com/open-telemetry/opentelemetry-java/pull/6903))
+
+## Version 1.44.1 (2024-11-10)
+
+### SDK
+
+#### Traces
+
+* Fix regression in event attributes
+ ([#6865](https://github.com/open-telemetry/opentelemetry-java/pull/6865))
+
+## Version 1.44.0 (2024-11-08)
+
+### API
+
+* Fix ConfigUtil#getString ConcurrentModificationException
+ ([#6841](https://github.com/open-telemetry/opentelemetry-java/pull/6841))
+
+### SDK
+
+#### Traces
+
+* Stabilize ExceptionEventData
+ ([#6795](https://github.com/open-telemetry/opentelemetry-java/pull/6795))
+
+#### Metrics
+
+* Stabilize metric cardinality limits
+ ([#6794](https://github.com/open-telemetry/opentelemetry-java/pull/6794))
+* Refactor metrics internals to remove MeterSharedState
+ ([#6845](https://github.com/open-telemetry/opentelemetry-java/pull/6845))
+
+#### Exporters
+
+* Add memory mode option to stdout exporters
+ ([#6774](https://github.com/open-telemetry/opentelemetry-java/pull/6774))
+* Log a warning if OTLP endpoint port is likely incorrect given the protocol
+ ([#6813](https://github.com/open-telemetry/opentelemetry-java/pull/6813))
+* Fix OTLP gRPC retry mechanism for unsuccessful HTTP responses
+ ([#6829](https://github.com/open-telemetry/opentelemetry-java/pull/6829))
+* Add ByteBuffer field type marshaling support
+ ([#6686](https://github.com/open-telemetry/opentelemetry-java/pull/6686))
+* Fix stdout exporter format by adding newline after each export
+ ([#6848](https://github.com/open-telemetry/opentelemetry-java/pull/6848))
+* Enable `reusuable_data` memory mode by default for `OtlpGrpc{Signal}Exporter`,
+ `OtlpHttp{Signal}Exporter`, `OtlpStdout{Signal}Exporter`, and `PrometheusHttpServer`
+ ([#6799](https://github.com/open-telemetry/opentelemetry-java/pull/6799))
+
+#### Extension
+
+* Rebrand file configuration to declarative configuration in documentation
+ ([#6812](https://github.com/open-telemetry/opentelemetry-java/pull/6812))
+* Fix declarative config `file_format` validation
+ ([#6786](https://github.com/open-telemetry/opentelemetry-java/pull/6786))
+* Fix declarative config env substitution by disallowing '}' in default value
+ ([#6793](https://github.com/open-telemetry/opentelemetry-java/pull/6793))
+* Set declarative config default OTLP protocol to http/protobuf
+ ([#6800](https://github.com/open-telemetry/opentelemetry-java/pull/6800))
+* Stabilize autoconfigure disabling of resource keys via `otel.resource.disabled.keys`
+ ([#6809](https://github.com/open-telemetry/opentelemetry-java/pull/6809))
+
+### Tooling
+
+* Run tests on Java 23
+ ([#6825](https://github.com/open-telemetry/opentelemetry-java/pull/6825))
+* Test Windows in CI
+ ([#6824](https://github.com/open-telemetry/opentelemetry-java/pull/6824))
+* Add error prone checks for internal javadoc and private constructors
+ ([#6844](https://github.com/open-telemetry/opentelemetry-java/pull/6844))
+
+## Version 1.43.0 (2024-10-11)
+
+### API
+
+* Add helper class to capture context using ScheduledExecutorService
+ ([#6712](https://github.com/open-telemetry/opentelemetry-java/pull/6712))
+* Adds Baggage.getEntry(String key)
+ ([#6765](https://github.com/open-telemetry/opentelemetry-java/pull/6765))
+
+#### Extensions
+
+* Fix ottracepropagation for short span ids
+ ([#6734](https://github.com/open-telemetry/opentelemetry-java/pull/6734))
+
+### SDK
+
+#### Metrics
+
+* Optimize advice with FilteredAttributes
+ ([#6633](https://github.com/open-telemetry/opentelemetry-java/pull/6633))
+
+#### Exporters
+
+* Add experimental stdout log, metric, trace exporters for printing records to stdout in standard
+ OTLP JSON format.
+ ([#6675](https://github.com/open-telemetry/opentelemetry-java/pull/6675), [#6750](https://github.com/open-telemetry/opentelemetry-java/pull/6750))
+* Add Marshalers for profiling signal type
+ ([#6680](https://github.com/open-telemetry/opentelemetry-java/pull/6680))
+
+#### Extensions
+
+* Add `*Model` suffix to declarative config generated classes.
+ ([#6721](https://github.com/open-telemetry/opentelemetry-java/pull/6721))
+* Use autoconfigured ClassLoader to load declarative config
+ ([#6725](https://github.com/open-telemetry/opentelemetry-java/pull/6725))
+* Update declarative config to use opentelemetry-configuration v0.3.0
+ ([#6733](https://github.com/open-telemetry/opentelemetry-java/pull/6733))
+* Add `StructuredConfigProperties#getStructured` default method,
+ add `StructuredConfigProperties.empty()`
+ ([#6759](https://github.com/open-telemetry/opentelemetry-java/pull/6759))
+
+#### Testing
+
+* Add context info about wrong span or trace.
+ ([#6703](https://github.com/open-telemetry/opentelemetry-java/pull/6703))
+
+## Version 1.42.1 (2024-09-10)
+
+### API
+
+* Revert `java-test-fixtures` plugin to remove test dependencies from `pom.xml`.
+ ([#6695](https://github.com/open-telemetry/opentelemetry-java/pull/6695))
+
+## Version 1.42.0 (2024-09-06)
+
+### API
+
+* BREAKING: Stabilize log support for AnyValue bodies. Rename `AnyValue` to `Value`, promote
+ from `opentelemetry-api-incubator` to `opentelemetry-api`, change package
+ from `io.opentelemetry.api.incubator.logs` to `io.opentelemetry.api.common`.
+ ([#6591](https://github.com/open-telemetry/opentelemetry-java/pull/6591))
+* Noop implementations detect when `opentelemetry-api-incubator` is present and return extended noop
+ implementations.
+ ([#6617](https://github.com/open-telemetry/opentelemetry-java/pull/6617))%
+
+### SDK
+
+#### Traces
+
+* Added experimental support for SpanProcessor OnEnding callback
+ ([#6367](https://github.com/open-telemetry/opentelemetry-java/pull/6367))
+* Remove final modifier from SdkTracer.tracerEnabled
+ ([#6687](https://github.com/open-telemetry/opentelemetry-java/pull/6687))
+
+#### Exporters
+
+* Suppress zipkin exporter instrumentation
+ ([#6552](https://github.com/open-telemetry/opentelemetry-java/pull/6552))
+* OTLP exporters return status code exceptions via CompletableResultCode in GrpcExporter and
+ HttpExporter.
+ ([#6645](https://github.com/open-telemetry/opentelemetry-java/pull/6645))
+* Align GrpcSender contract with HttpSender
+ ([#6658](https://github.com/open-telemetry/opentelemetry-java/pull/6658))
+
+#### Extensions
+
+* Add autoconfigure support for ns and us durations
+ ([#6654](https://github.com/open-telemetry/opentelemetry-java/pull/6654))
+* Add declarative configuration ComponentProvider support for resources
+ ([#6625](https://github.com/open-telemetry/opentelemetry-java/pull/6625))
+* Add declarative configuration ComponentProvider support for processors
+ ([#6623](https://github.com/open-telemetry/opentelemetry-java/pull/6623))
+* Add declarative configuration ComponentProvider support for samplers
+ ([#6494](https://github.com/open-telemetry/opentelemetry-java/pull/6494))
+* Add declarative configuration ComponentProvider support for propagators
+ ([#6624](https://github.com/open-telemetry/opentelemetry-java/pull/6624))
+* Add declarative configuration missing pieces
+ ([#6677](https://github.com/open-telemetry/opentelemetry-java/pull/6677))
+* Change jaeger remote sampler autoconfigure property from `pollingInterval` to `pollingIntervalMs`
+ to match spec.
+ ([#6672](https://github.com/open-telemetry/opentelemetry-java/pull/6672))
+
+#### Testing
+
+* Add asserts for log record body fields
+ ([#6509](https://github.com/open-telemetry/opentelemetry-java/pull/6509))
+
+## Version 1.41.0 (2024-08-09)
+
+### API
+
+* Move experimental suppress instrumentation context key to api internal package
+ ([#6546](https://github.com/open-telemetry/opentelemetry-java/pull/6546))
+
+#### Incubator
+
+* Fix bug in `ExtendedContextPropagators` preventing context extraction when case is incorrect.
+ ([#6569](https://github.com/open-telemetry/opentelemetry-java/pull/6569))
+
+### SDK
+
+* Extend `CompletableResultCode` with `failExceptionally(Throwable)`.
+ ([#6348](https://github.com/open-telemetry/opentelemetry-java/pull/6348))
+
+#### Metrics
+
+* Avoid allocations when experimental advice doesn't remove any attributes.
+ ([#6629](https://github.com/open-telemetry/opentelemetry-java/pull/6629))
+
+#### Exporter
+
+* Enable retry by default for OTLP exporters.
+ ([#6588](https://github.com/open-telemetry/opentelemetry-java/pull/6588))
+* Retry ConnectException, add retry logging.
+ ([#6614](https://github.com/open-telemetry/opentelemetry-java/pull/6614))
+* Extend `PrometheusHttpServer` with ability to configure default aggregation as function of
+ instrument kind, including experimental env var support.
+ ([#6541](https://github.com/open-telemetry/opentelemetry-java/pull/6541))
+* Add exporter data model impl for profiling signal type.
+ ([#6498](https://github.com/open-telemetry/opentelemetry-java/pull/6498))
+* Add Marshalers for profiling signal type.
+ ([#6565](https://github.com/open-telemetry/opentelemetry-java/pull/6565))
+* Use generateCertificates() of CertificateFactory to process certificates.
+ ([#6579](https://github.com/open-telemetry/opentelemetry-java/pull/6579))
+
+#### Extensions
+
+* Add file configuration ComponentProvider support for exporters.
+ ([#6493](https://github.com/open-telemetry/opentelemetry-java/pull/6493))
+* Remove nullable from file config Factory contract.
+ ([#6612](https://github.com/open-telemetry/opentelemetry-java/pull/6612))
+
+## Version 1.40.0 (2024-07-05)
+
+### API
+
+#### Incubator
+
+* Narrow ExtendedSpanBuilder return types for chaining
+ ([#6514](https://github.com/open-telemetry/opentelemetry-java/pull/6514))
+* Add APIs to determine if tracer, logger, instruments are enabled
+ ([#6502](https://github.com/open-telemetry/opentelemetry-java/pull/6502))
+
+### SDK
+
+#### Extensions
+
+* Move autoconfigure docs to opentelemetry.io
+ ([#6491](https://github.com/open-telemetry/opentelemetry-java/pull/6491))
+
+## Version 1.39.0 (2024-06-07)
+
+### API
+
+#### Incubator
+
+* BREAKING: Refactor ExtendedTracer, ExtendedSpanBuilder to reflect incubating API conventions
+ ([#6497](https://github.com/open-telemetry/opentelemetry-java/pull/6497))
+
+### SDK
+
+#### Exporter
+
+* BREAKING: Serve prometheus metrics only on `/metrics` by default. To restore the previous behavior
+ and serve metrics on all paths, override the default handler
+ as [demonstrated here](https://github.com/open-telemetry/opentelemetry-java/blob/main/exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServerTest.java#L251-L259).
+ ([#6476](https://github.com/open-telemetry/opentelemetry-java/pull/6476))
+* Make OTLP exporter memory mode API public
+ ([#6469](https://github.com/open-telemetry/opentelemetry-java/pull/6469))
+* Speed up OTLP string marshaling using sun.misc.Unsafe
+ ([#6433](https://github.com/open-telemetry/opentelemetry-java/pull/6433))
+* Add exporter data classes for experimental profiling signal type.
+ ([#6374](https://github.com/open-telemetry/opentelemetry-java/pull/6374))
+* Start prometheus http server with daemon thread
+ ([#6472](https://github.com/open-telemetry/opentelemetry-java/pull/6472))
+* Update the Prometheus metrics library and improve how units are included in metric names.
+ ([#6473](https://github.com/open-telemetry/opentelemetry-java/pull/6473))
+* Remove android animalsniffer check from prometheus exporter
+ ([#6478](https://github.com/open-telemetry/opentelemetry-java/pull/6478))
+
+#### Extensions
+
+* Load file config YAML using core schema, ensure that env var substitution retains string types.
+ ([#6436](https://github.com/open-telemetry/opentelemetry-java/pull/6436))
+* Define dedicated file configuration SPI ComponentProvider
+ ([#6457](https://github.com/open-telemetry/opentelemetry-java/pull/6457))
+
+### Tooling
+
+* Normalize timestamps and file ordering in jars, making the outputs reproducible
+ ([#6471](https://github.com/open-telemetry/opentelemetry-java/pull/6471))
+* GHA for generating the post-release pull request
+ ([#6449](https://github.com/open-telemetry/opentelemetry-java/pull/6449))
+
+## Version 1.38.0 (2024-05-10)
+
+### API
+
+* Stabilize synchronous gauge
+ ([#6419](https://github.com/open-telemetry/opentelemetry-java/pull/6419))
+
+#### Incubator
+
+* Add put(AttributeKey, T) overload to EventBuilder
+ ([#6331](https://github.com/open-telemetry/opentelemetry-java/pull/6331))
+
+#### Baggage
+
+* Baggage filters space-only keys
+ ([#6431](https://github.com/open-telemetry/opentelemetry-java/pull/6431))
+
+### SDK
+
+* Add experimental scope config to enable / disable scopes (i.e. meter, logger, tracer)
+ ([#6375](https://github.com/open-telemetry/opentelemetry-java/pull/6375))
+
+#### Traces
+
+* Add ReadableSpan#getAttributes
+ ([#6382](https://github.com/open-telemetry/opentelemetry-java/pull/6382))
+* Use standard ArrayList size rather than max number of links for initial span links allocation
+ ([#6252](https://github.com/open-telemetry/opentelemetry-java/pull/6252))
+
+#### Metrics
+
+* Use low precision Clock#now when computing timestamp for exemplars
+ ([#6417](https://github.com/open-telemetry/opentelemetry-java/pull/6417))
+* Update invalid instrument name log message now that forward slash `/` is valid
+ ([#6343](https://github.com/open-telemetry/opentelemetry-java/pull/6343))
+
+#### Exporters
+
+* Introduce low allocation OTLP marshalers. If using autoconfigure, opt in
+ via `OTEL_JAVA_EXPERIMENTAL_EXPORTER_MEMORY_MODE=REUSABLE_DATA`.
+ * Low allocation OTLP logs marshaler
+ ([#6429](https://github.com/open-telemetry/opentelemetry-java/pull/6429))
+ * Low allocation OTLP metrics marshaler
+ ([#6422](https://github.com/open-telemetry/opentelemetry-java/pull/6422))
+ * Low allocation OTLP trace marshaler
+ ([#6410](https://github.com/open-telemetry/opentelemetry-java/pull/6410))
+ * Add memory mode support to OTLP exporters
+ ([#6430](https://github.com/open-telemetry/opentelemetry-java/pull/6430))
+ * Marshal span status description without allocation
+ ([#6423](https://github.com/open-telemetry/opentelemetry-java/pull/6423))
+ * Add private constructors for stateless marshalers
+ ([#6434](https://github.com/open-telemetry/opentelemetry-java/pull/6434))
+* Mark opentelemetry-exporter-sender-jdk stable
+ ([#6357](https://github.com/open-telemetry/opentelemetry-java/pull/6357))
+* PrometheusHttpServer prevent concurrent reads when reusable memory mode
+ ([#6371](https://github.com/open-telemetry/opentelemetry-java/pull/6371))
+* Ignore TLS components (SSLContext, TrustManager, KeyManager) if plain HTTP protocol is used for
+ exporting
+ ([#6329](https://github.com/open-telemetry/opentelemetry-java/pull/6329))
+* Add is_remote_parent span flags to OTLP exported Spans and SpanLinks
+ ([#6388](https://github.com/open-telemetry/opentelemetry-java/pull/6388))
+* Add missing fields to OTLP metric exporters `toString()`
+ ([#6402](https://github.com/open-telemetry/opentelemetry-java/pull/6402))
+
+#### Extensions
+
+* Rename otel.config.file to otel.experimental.config.file for autoconfigure
+ ([#6396](https://github.com/open-telemetry/opentelemetry-java/pull/6396))
+
+### OpenCensus Shim
+
+* Fix opencensus shim spanBuilderWithRemoteParent behavior
+ ([#6415](https://github.com/open-telemetry/opentelemetry-java/pull/6415))
+
+### Tooling
+
+* Add additional API incubator docs
+ ([#6356](https://github.com/open-telemetry/opentelemetry-java/pull/6356))
+* Run build on java 21
+ ([#6370](https://github.com/open-telemetry/opentelemetry-java/pull/6370))
+* Fix running tests with java 8 on macos
+ ([#6411](https://github.com/open-telemetry/opentelemetry-java/pull/6411))
+* Move away from deprecated gradle enterprise APIs
+ ([#6363](https://github.com/open-telemetry/opentelemetry-java/pull/6363))
+
+## Version 1.37.0 (2024-04-05)
+
+**NOTICE:** This release contains a significant restructuring of the experimental event API and the API incubator artifact. Please read the notes in the `API -> Incubator` section carefully.
+
+### API
+
+* Promote `Span#addLink` to stable API
+ ([#6317](https://github.com/open-telemetry/opentelemetry-java/pull/6317))
+
+#### Incubator
+
+* BREAKING: Rename `opentelemetry-extension-incubator` to `opentelemetry-api-incubator`,
+ merge `opentelemetry-api-events` into `opentelemetry-api-incubator`.
+ ([#6289](https://github.com/open-telemetry/opentelemetry-java/pull/6289))
+* BREAKING: Remove domain from event api. `EventEmitterProvider#setEventDomain` has been removed.
+ The `event.name` field should now be namespaced to avoid collisions.
+ See [Semantic Conventions for Event Attributes](https://opentelemetry.io/docs/specs/semconv/general/events/)
+ for more details.
+ ([#6253](https://github.com/open-telemetry/opentelemetry-java/pull/6253))
+* BREAKING: Rename `EventEmitter` and related classes to `EventLogger`.
+ ([#6316](https://github.com/open-telemetry/opentelemetry-java/pull/6316))
+* BREAKING: Refactor Event API to reflect spec changes. Restructure API to put fields in
+ the `AnyValue` log record body. Add setters for timestamp, context, and severity. Set default
+ severity to `INFO=9`.
+ ([#6318](https://github.com/open-telemetry/opentelemetry-java/pull/6318))
+
+### SDK
+
+* Add `get{Signal}Exporter` methods to `Simple{Signal}Processor`, `Batch{Signal}Processor`.
+ ([#6078](https://github.com/open-telemetry/opentelemetry-java/pull/6078))
+
+#### Metrics
+
+* Use synchronized instead of reentrant lock in explicit bucket histogram
+ ([#6309](https://github.com/open-telemetry/opentelemetry-java/pull/6309))
+
+#### Exporters
+
+* Fix typo in OTLP javadoc
+ ([#6311](https://github.com/open-telemetry/opentelemetry-java/pull/6311))
+* Add `PrometheusHttpServer#toBuilder()`
+ ([#6333](https://github.com/open-telemetry/opentelemetry-java/pull/6333))
+* Bugfix: Use `getPrometheusName` for Otel2PrometheusConverter map keys to avoid metric name
+ conflicts
+ ([#6308](https://github.com/open-telemetry/opentelemetry-java/pull/6308))
+
+#### Extensions
+
+* Add Metric exporter REUSABLE_DATA memory mode configuration options, including autoconfigure
+ support via env var `OTEL_JAVA_EXPERIMENTAL_EXPORTER_MEMORY_MODE=REUSABLE_DATA`.
+ ([#6304](https://github.com/open-telemetry/opentelemetry-java/pull/6304))
+* Add autoconfigure console alias for logging exporter
+ ([#6027](https://github.com/open-telemetry/opentelemetry-java/pull/6027))
+* Update jaeger autoconfigure docs to point to OTLP
+ ([#6307](https://github.com/open-telemetry/opentelemetry-java/pull/6307))
+* Add `ServiceInstanceIdResourceProvider` implementation for generating `service.instance.id` UUID
+ if not already provided by user. Included in `opentelemetry-sdk-extension-incubator`.
+ ([#6226](https://github.com/open-telemetry/opentelemetry-java/pull/6226))
+* Add GCP resource detector to list of resource providers in autoconfigure docs
+ ([#6336](https://github.com/open-telemetry/opentelemetry-java/pull/6336))
+
+### Tooling
+
+* Check for Java 17 toolchain and fail if not found
+ ([#6303](https://github.com/open-telemetry/opentelemetry-java/pull/6303))
+
+## Version 1.36.0 (2024-03-08)
+
+### SDK
+
+#### Traces
+
+* Lazily initialize the container for events in the SDK Span implementation
+ ([#6244](https://github.com/open-telemetry/opentelemetry-java/pull/6244))
+
+#### Exporters
+
+* Add basic proxy configuration to OtlpHttp{Signal}Exporters
+ ([#6270](https://github.com/open-telemetry/opentelemetry-java/pull/6270))
+* Add connectTimeout configuration option OtlpGrpc{Signal}Exporters
+ ([#6079](https://github.com/open-telemetry/opentelemetry-java/pull/6079))
+
+#### Extensions
+
+* Add ComponentLoader to autoconfigure support more scenarios
+ ([#6217](https://github.com/open-telemetry/opentelemetry-java/pull/6217))
+* Added MetricReader customizer for AutoConfiguredOpenTelemetrySdkBuilder
+ ([#6231](https://github.com/open-telemetry/opentelemetry-java/pull/6231))
+* Return AutoConfiguredOpenTelemetrySdkBuilder instead of the base type
+ ([#6248](https://github.com/open-telemetry/opentelemetry-java/pull/6248))
+
+### Tooling
+
+* Add note about draft PRs to CONTRIBUTING.md
+ ([#6247](https://github.com/open-telemetry/opentelemetry-java/pull/6247))
+
+## Version 1.35.0 (2024-02-09)
+
+**NOTE:** The `opentelemetry-exporter-jaeger` and `opentelemetry-exporter-jaeger-thift` artifacts
+have stopped being published. Jaeger
+has [native support for OTLP](https://opentelemetry.io/blog/2022/jaeger-native-otlp/), and users
+should export to jaeger
+using OTLP
+instead.
+
+### API
+
+#### Incubator
+
+* Add Span#addLink, for adding a link after span start
+ ([#6084](https://github.com/open-telemetry/opentelemetry-java/pull/6084))
+
+### SDK
+
+#### Traces
+
+* Bugfix: Ensure span status cannot be updated after set to StatusCode.OK
+ ([#6209](https://github.com/open-telemetry/opentelemetry-java/pull/6209)
+
+#### Metrics
+
+* Reusable memory Mode: Adding support for exponential histogram aggregation
+ ([#6058](https://github.com/open-telemetry/opentelemetry-java/pull/6058),
+ [#6136](https://github.com/open-telemetry/opentelemetry-java/pull/6136))
+* Reusable memory mode: Adding support for explicit histogram aggregation
+ ([#6153](https://github.com/open-telemetry/opentelemetry-java/pull/6153))
+* Reusable memory mode: Adding support for sum aggregation
+ ([#6182](https://github.com/open-telemetry/opentelemetry-java/pull/6182))
+* Reusable memory mode: Adding support for last value aggregation
+ ([#6196](https://github.com/open-telemetry/opentelemetry-java/pull/6196))
+
+#### Exporters
+
+* Recreate / fix graal issue detecting RetryPolicy class
+ ([#6139](https://github.com/open-telemetry/opentelemetry-java/pull/6139),
+ [#6134](https://github.com/open-telemetry/opentelemetry-java/pull/6134))
+* Restore prometheus metric name mapper tests, fix regressions
+ ([#6138](https://github.com/open-telemetry/opentelemetry-java/pull/6138))
+* WARNING: Remove jaeger exporters
+ ([#6119](https://github.com/open-telemetry/opentelemetry-java/pull/6119))
+* Update dependency `io.zipkin.reporter2:zipkin-reporter-bom` to 3.2.1.
+ Note: `ZipkinSpanExporterBuilder#setEncoder(zipkin2.codec.BytesEncoder)` has been deprecated in
+ favor of `ZipkinSpanExporterBuilder#setEncoder(zipkin2.reporter.BytesEncoder)`.
+ `ZipkinSpanExporterBuilder#setSender(zipkin2.reporter.Sender)` has been deprecated in favor
+ of `ZipkinSpanExporterBuilder#setSender(zipkin2.reporter.BytesMessageSender)`.
+ ([#6129](https://github.com/open-telemetry/opentelemetry-java/pull/6129),
+ [#6151](https://github.com/open-telemetry/opentelemetry-java/pull/6151))
+* Include trace flags in otlp marshaller
+ ([#6167](https://github.com/open-telemetry/opentelemetry-java/pull/6167))
+* Add Compressor SPI support to OtlpGrpc{Signal}Exporters
+ ([#6103](https://github.com/open-telemetry/opentelemetry-java/pull/6103))
+* Allow Prometheus exporter to add resource attributes to metric attributes
+ ([#6179](https://github.com/open-telemetry/opentelemetry-java/pull/6179))
+
+#### Extension
+
+* Autoconfigure accepts encoded header values for OTLP exporters
+ ([#6164](https://github.com/open-telemetry/opentelemetry-java/pull/6164))
+* Return implementation type from `AutoConfiguredOpenTelemetrySdkBuilder.addLogRecordProcessorCustomizer`
+ ([#6248](https://github.com/open-telemetry/opentelemetry-java/pull/6248))
+
+#### Incubator
+
+* Align file configuration with latest changes to spec
+ ([#6088](https://github.com/open-telemetry/opentelemetry-java/pull/6088))
+
+### Tooling
+
+* Stop including old artifacts in bom
+ ([#6157](https://github.com/open-telemetry/opentelemetry-java/pull/6157))
+* Define CODECOV token
+ ([#6186](https://github.com/open-telemetry/opentelemetry-java/pull/6186))
+
+## Version 1.34.1 (2024-01-11)
+
+* Fix prometheus exporter regressions
+ ([#6138](https://github.com/open-telemetry/opentelemetry-java/pull/6138))
+* Fix native image regression
+ ([#6134](https://github.com/open-telemetry/opentelemetry-java/pull/6134))
+
+## Version 1.34.0 (2024-01-05)
+
+**NOTE:** This is the LAST release for `opentelemetry-exporter-jaeger`
+and `opentelemetry-exporter-jaeger-thift`. Jaeger
+has [native support for OTLP](https://opentelemetry.io/blog/2022/jaeger-native-otlp/), and users
+should export to jaeger
+using OTLP
+instead.
+
+### API
+
+* Ability to access version.properties API file with GraalVM native
+ ([#6095](https://github.com/open-telemetry/opentelemetry-java/pull/6095))
+
+### SDK
+
+#### Traces
+
+* Only call SpanProcessor onStart / onEnd if required
+ ([#6112](https://github.com/open-telemetry/opentelemetry-java/pull/6112))
+* Add option to export unsampled spans from span processors
+ ([#6057](https://github.com/open-telemetry/opentelemetry-java/pull/6057))
+
+#### Metrics
+
+* Memory Mode: Adding first part support for synchronous instruments - storage
+ ([#5998](https://github.com/open-telemetry/opentelemetry-java/pull/5998))
+* Base2ExponentialHistogramAggregation maxBuckets must be >= 2
+ ([#6093](https://github.com/open-telemetry/opentelemetry-java/pull/6093))
+* Convert histogram measurements to double before passing recording exemplar reservoir
+ ([#6024](https://github.com/open-telemetry/opentelemetry-java/pull/6024))
+
+#### Exporters
+
+* Add compressor SPI to support additional compression algos
+ ([#5990](https://github.com/open-telemetry/opentelemetry-java/pull/5990))
+* Test OTLP exporters with different OkHttp versions
+ ([#6045](https://github.com/open-telemetry/opentelemetry-java/pull/6045))
+* Refactor prometheus exporter to use `io.prometheus:prometheus-metrics-exporter-httpserver`, add
+ exponential Histogram support
+ ([#6015](https://github.com/open-telemetry/opentelemetry-java/pull/6015))
+* UpstreamGrpcSenderProvider uses minimal fallback managed channel when none is specified
+ ([#6110](https://github.com/open-telemetry/opentelemetry-java/pull/6110))
+* OTLP exporters propagate serialization IOException instead of rethrowing as runtime
+ ([#6082](https://github.com/open-telemetry/opentelemetry-java/pull/6082))
+
+#### Extensions
+
+* Autoconfigure reads normalized otel.config.file property
+ ([#6105](https://github.com/open-telemetry/opentelemetry-java/pull/6105))
+
+## Version 1.33.0 (2023-12-08)
+
+### API
+
+* Fix issue where wrapping "invalid" SpanContexts in Span does not preserve SpanContext
+ ([#6044](https://github.com/open-telemetry/opentelemetry-java/pull/6044))
+
+#### Incubator
+
+* Refactor and add to ExtendedTracer, add ExtendedContextPropagators
+ ([#6017](https://github.com/open-telemetry/opentelemetry-java/pull/6017))
+* Base64 encode AnyValue bytes in string representation
+ ([#6003](https://github.com/open-telemetry/opentelemetry-java/pull/6003))
+
+### SDK
+
+#### Exporters
+
+* Add connectTimeout configuration option OtlpHttp{Signal}Exporters
+ ([#5941](https://github.com/open-telemetry/opentelemetry-java/pull/5941))
+* Add ability for Otlp{Protocol}LogRecordExporter to serialize log body any value
+ ([#5938](https://github.com/open-telemetry/opentelemetry-java/pull/5938))
+* Android environments can now handle base64 encoded PEM keys, remove exception handling in
+ TlsUtil#decodePem
+ ([#6034](https://github.com/open-telemetry/opentelemetry-java/pull/6034))
+* Add header supplier configuration option to OTLP exporters
+ ([#6004](https://github.com/open-telemetry/opentelemetry-java/pull/6004))
+
+
+#### Extensions
+
+* Add autoconfigure option for customizing SpanProcessor, LogRecordProcessor
+ ([#5986](https://github.com/open-telemetry/opentelemetry-java/pull/5986))
+* Incubator allows for simpler creation of start-only and end-only SpanProcessors.
+ ([#5923](https://github.com/open-telemetry/opentelemetry-java/pull/5923))
+
+#### Testing
+
+* Add hasAttributesSatisfying overload to AbstractPointAssert
+ ([#6048](https://github.com/open-telemetry/opentelemetry-java/pull/6048))
+
+### Project Tooling
+
+* Building animal sniffer signatures directly from android corelib
+ ([#5973](https://github.com/open-telemetry/opentelemetry-java/pull/5973))
+* Target kotlin 1.6 in kotlin extension
+ ([#5910](https://github.com/open-telemetry/opentelemetry-java/pull/5910))
+* Define language version compatibility requirements
+ ([#5983](https://github.com/open-telemetry/opentelemetry-java/pull/5983))
+
+## Version 1.32.0 (2023-11-13)
+
+### API
+
+* Stabilize explicit bucket boundaries advice API
+ ([#5897](https://github.com/open-telemetry/opentelemetry-java/pull/5897))
+* Allow events to be emitted with timestamp
+ ([#5928](https://github.com/open-telemetry/opentelemetry-java/pull/5928))
+
+#### Context
+
+* Add null check to StrictContextStorage
+ ([#5954](https://github.com/open-telemetry/opentelemetry-java/pull/5954))
+
+#### Incubator
+
+* Experimental support for Log AnyValue body
+ ([#5880](https://github.com/open-telemetry/opentelemetry-java/pull/5880))
+
+### SDK
+
+#### Metrics
+
+* Dismantle AbstractInstrumentBuilder inheritance hierarchy
+ ([#5820](https://github.com/open-telemetry/opentelemetry-java/pull/5820))
+* Fix delta metric storage concurrency bug that allows for lost writes when record operations occur
+ during collection. The fix introduces additional work on record threads to ensure correctness. The
+ additional overhead is non-blocking and should be small according to performance testing. Still,
+ there may be an opportunity for further optimization.
+ ([#5932](https://github.com/open-telemetry/opentelemetry-java/pull/5932),
+ [#5976](https://github.com/open-telemetry/opentelemetry-java/pull/5976))
+
+
+#### Exporters
+
+* Prometheus exporter: omit empty otel_scope_info and otel_target_info metrics
+ ([#5887](https://github.com/open-telemetry/opentelemetry-java/pull/5887))
+* JdkHttpSender should retry on connect exceptions
+ ([#5867](https://github.com/open-telemetry/opentelemetry-java/pull/5867))
+* Expand the set of retryable exceptions in JdkHttpSender
+ ([#5942](https://github.com/open-telemetry/opentelemetry-java/pull/5942))
+* Identify OTLP export calls with context key used for instrumentation suppression
+ ([#5918](https://github.com/open-telemetry/opentelemetry-java/pull/5918))
+
+#### Testing
+
+* Add log support to junit extensions
+ ([#5966](https://github.com/open-telemetry/opentelemetry-java/pull/5966))
+
+#### SDK Extensions
+
+* Add file configuration to autoconfigure
+ ([#5831](https://github.com/open-telemetry/opentelemetry-java/pull/5831))
+* Update to file configuration to use opentelemetry-configuration v0.1.0
+ ([#5899](https://github.com/open-telemetry/opentelemetry-java/pull/5899))
+* Add env var substitution support to file configuration
+ ([#5914](https://github.com/open-telemetry/opentelemetry-java/pull/5914))
+* Stop setting Resource schemaUrl in autoconfigure
+ ([#5911](https://github.com/open-telemetry/opentelemetry-java/pull/5911))
+* Add AutoConfigureListener to provide components with autoconfigured SDK
+ ([#5931](https://github.com/open-telemetry/opentelemetry-java/pull/5931))
+
+### OpenCensus Shim
+
+* Clean up OpenCensus shim
+ ([#5858](https://github.com/open-telemetry/opentelemetry-java/pull/5858))
+
+### OpenTracing Shim
+
+* Fix OpenTracing header name issue
+ ([#5840](https://github.com/open-telemetry/opentelemetry-java/pull/5840))
+
+## Version 1.31.0 (2023-10-06)
+
+### API
+
+#### Incubator
+
+* Refactor advice API to simplify usage
+ ([#5848](https://github.com/open-telemetry/opentelemetry-java/pull/5848))
+
+### SDK
+
+* BatchLogRecordProcessor and BatchSpanProcessor unify `queueSize` metric
+ description and attribute name for `processorType`
+ ([#5836](https://github.com/open-telemetry/opentelemetry-java/pull/5836))
+
+#### Metrics
+
+* Allow instrument names to contain a forward slash
+ ([#5824](https://github.com/open-telemetry/opentelemetry-java/pull/5824))
+* Memory Mode support: Adding memory mode, and implementing it for Asynchronous Instruments
+ ([#5709](https://github.com/open-telemetry/opentelemetry-java/pull/5709),
+ [#5855](https://github.com/open-telemetry/opentelemetry-java/pull/5855))
+* Stabilize MetricProducer, allow custom MetricReaders
+ ([#5835](https://github.com/open-telemetry/opentelemetry-java/pull/5835))
+* Drop NaN measurements to metric instruments
+ ([#5859](https://github.com/open-telemetry/opentelemetry-java/pull/5859))
+* Fix flaky MetricExporterConfigurationTest
+ ([#5877](https://github.com/open-telemetry/opentelemetry-java/pull/5877))
+
+#### Logs
+
+* Add addAllAttributes() to ReadWriteLogRecord.
+ ([#5825](https://github.com/open-telemetry/opentelemetry-java/pull/5825))
+
+#### Exporters
+
+* Prometheus exporter: handle colliding metric attribute keys
+ ([#5717](https://github.com/open-telemetry/opentelemetry-java/pull/5717))
+
+#### SDK Extensions
+
+* File configuration ConfigurationReader handles null values as empty
+ ([#5829](https://github.com/open-telemetry/opentelemetry-java/pull/5829))
+
+#### Semantic conventions
+
+* BREAKING: Stop publishing `io.opentelemetry:opentelemetry-semconv`. Please use
+ `io.opentelemetry.semconv:opentelemetry-semconv:1.21.0-alpha` instead, which is published
+ from [open-telemetry/semantic-conventions-java](https://github.com/open-telemetry/semantic-conventions-java).
+ The new repository is published in lockstep
+ with [open-telemetry/semantic-conventions](https://github.com/open-telemetry/semantic-conventions).
+ ([#5807](https://github.com/open-telemetry/opentelemetry-java/pull/5807))
+
+### Project Tooling
+
+* Add Benchmark workflows
+ ([#5842](https://github.com/open-telemetry/opentelemetry-java/pull/5842),
+ [#5874](https://github.com/open-telemetry/opentelemetry-java/pull/5874))
+* Add clearer docs around coroutine support with an example
+ ([#5799](https://github.com/open-telemetry/opentelemetry-java/pull/5799))
+
+## Version 1.30.1 (2023-09-11)
+
+* Fix autoconfigure bug creating multiple `PrometheusHttpServer` instances with same port
+ ([#5811](https://github.com/open-telemetry/opentelemetry-java/pull/5811))
+
+## Version 1.30.0 (2023-09-08)
+
+### API
+
+#### Incubator
+
+* Add experimental synchronous gauge
+ ([#5506](https://github.com/open-telemetry/opentelemetry-java/pull/5506))
+
+### SDK
+
+#### Metrics
+
+* Add attributes advice API
+ ([#5677](https://github.com/open-telemetry/opentelemetry-java/pull/5677),
+ [#5722](https://github.com/open-telemetry/opentelemetry-java/pull/5722))
+* Add AttributesProcessor toString, add attribute filter helper
+ ([#5765](https://github.com/open-telemetry/opentelemetry-java/pull/5765))
+* Increase metric name maximum length from 63 to 255 characters
+ ([#5697](https://github.com/open-telemetry/opentelemetry-java/pull/5697))
+
+#### Exporter
+
+* Prometheus exporter: remove non-ucum units from conversion
+ ([#5719](https://github.com/open-telemetry/opentelemetry-java/pull/5719))
+* Prometheus exporter: add units to metric names in TYPE and HELP comments
+ ([#5718](https://github.com/open-telemetry/opentelemetry-java/pull/5718))
+
+#### SDK Extensions
+
+* Add support for file based configuration to incubator
+ ([#5687](https://github.com/open-telemetry/opentelemetry-java/pull/5687),
+ [#5751](https://github.com/open-telemetry/opentelemetry-java/pull/5751),
+ [#5758](https://github.com/open-telemetry/opentelemetry-java/pull/5758),
+ [#5757](https://github.com/open-telemetry/opentelemetry-java/pull/5757),
+ [#5755](https://github.com/open-telemetry/opentelemetry-java/pull/5755),
+ [#5763](https://github.com/open-telemetry/opentelemetry-java/pull/5763),
+ [#5766](https://github.com/open-telemetry/opentelemetry-java/pull/5766),
+ [#5773](https://github.com/open-telemetry/opentelemetry-java/pull/5773),
+ [#5771](https://github.com/open-telemetry/opentelemetry-java/pull/5771),
+ [#5779](https://github.com/open-telemetry/opentelemetry-java/pull/5779))
+* Autoconfigure ConfigProperties#getMap filters entries with blank values instead of throwing
+ ([#5784](https://github.com/open-telemetry/opentelemetry-java/pull/5784))
+
+### Semantic conventions
+
+* DEPRECATION: `io.opentelemetry:opentelemetry-semconv` is deprecated for removal. Please use
+ `io.opentelemetry.semconv:opentelemetry-semconv:1.21.0-alpha` instead, which is published
+ from [open-telemetry/semantic-conventions-java](https://github.com/open-telemetry/semantic-conventions-java).
+ The new repository is published in lockstep
+ with [open-telemetry/semantic-conventions](https://github.com/open-telemetry/semantic-conventions).
+ ([#5786](https://github.com/open-telemetry/opentelemetry-java/pull/5786))
+
+### Project Tooling
+
+* Update Gradle Wrapper from 8.2.1 to 8.3
+ ([#5728](https://github.com/open-telemetry/opentelemetry-java/pull/5728))
+* Remove dependabot and `update-gradle-wrapper` task in favor of renovate
+ ([#5746](https://github.com/open-telemetry/opentelemetry-java/pull/5746))
+
+## Version 1.29.0 (2023-08-11)
+
+### API
+
+* Update Span javadoc to allow null/empty attr values
+ ([#5616](https://github.com/open-telemetry/opentelemetry-java/pull/5616))
+
+### SDK
+
+* Add Sdk{Signal}ProviderBuilder#addResource(Resource) method to merge Resource
+ with current
+ ([#5619](https://github.com/open-telemetry/opentelemetry-java/pull/5619))
+
+#### Metrics
+
+* Add LongHistogramAdviceConfigurer to improve api surface types
+ ([#5689](https://github.com/open-telemetry/opentelemetry-java/pull/5689))
+* Instruments with names which are case-insensitive equal contribute to same
+ metric, advice is not part of instrument identity.
+ ([#5701](https://github.com/open-telemetry/opentelemetry-java/pull/5701))
+
+#### Exporter
+
+* Add OtlpHttp{Signal}Exporter#toBuilder() methods
+ ([#5652](https://github.com/open-telemetry/opentelemetry-java/pull/5652))
+* Add OtlpGrpc{Signal}Exporter#toBuilder() methods
+ ([#5680](https://github.com/open-telemetry/opentelemetry-java/pull/5680))
+* Add #toString to OTLP exporters
+ ([#5686](https://github.com/open-telemetry/opentelemetry-java/pull/5686))
+* Break out GrpcSender, GrpcSenderProvider
+ ([#5617](https://github.com/open-telemetry/opentelemetry-java/pull/5617))
+
+#### SDK Extensions
+
+* BREAKING: Delete zpages
+ ([#5611](https://github.com/open-telemetry/opentelemetry-java/pull/5611))
+* Initialize file configuration with generated model classes and parse method
+ ([#5399](https://github.com/open-telemetry/opentelemetry-java/pull/5399))
+* Refactor SpiUtil to improve mocking
+ ([#5679](https://github.com/open-telemetry/opentelemetry-java/pull/5679))
+* Switch from snakeyaml to snakeyaml engine
+ ([#5691](https://github.com/open-telemetry/opentelemetry-java/pull/5691))
+* Add experimental autoconfigure support for customizing cardinality limit
+ ([#5659](https://github.com/open-telemetry/opentelemetry-java/pull/5659))
+* Reorganize autoconfigure docs by signal
+ ([#5665](https://github.com/open-telemetry/opentelemetry-java/pull/5665))
+
+#### Testing
+
+* Add hasResourceSatisfying to LogRecordDataAssert
+ ([#5690](https://github.com/open-telemetry/opentelemetry-java/pull/5690))
+
+### OpenCensus Shim
+
+* Change OpenCensus shim default sampling to defer to OpenTelemetry
+ ([#5604](https://github.com/open-telemetry/opentelemetry-java/pull/5604))
+
+### Project Tooling
+
+* Update Gradle Wrapper from 8.2 to 8.2.1
+ ([#5618](https://github.com/open-telemetry/opentelemetry-java/pull/5618))
+* Fix gradle java version requirement warning
+ ([#5624](https://github.com/open-telemetry/opentelemetry-java/pull/5624))
+* Refer to Adoptium/Temurin instead of AdoptOpenJDK
+ ([#5636](https://github.com/open-telemetry/opentelemetry-java/pull/5636))
+* Use OtelVersionClassPlugin instead of reading version from resource
+ ([#5622](https://github.com/open-telemetry/opentelemetry-java/pull/5622))
+* Enforce build-graal success in required status check
+ ([#5696](https://github.com/open-telemetry/opentelemetry-java/pull/5696))
+
+## Version 1.28.0 (2023-07-07)
+
+[opentelemetry-sdk-extension-autoconfigure](./sdk-extensions/autoconfigure) is now stable! See "SDK
+Extension" notes below for changes made prior to stabilization.
+
+### SDK
+
+#### Metrics
+
+* Make Advice proper immutable class
+ ([#5532](https://github.com/open-telemetry/opentelemetry-java/pull/5532))
+* Show attributes when async instruments record duplicate measurements
+ ([#5542](https://github.com/open-telemetry/opentelemetry-java/pull/5542))
+* After cardinality limit exceeded record measurements to overflow series
+ ([#5560](https://github.com/open-telemetry/opentelemetry-java/pull/5560))
+
+#### Exporter
+
+* Add HttpSender abstraction with OkHttp implementation
+ ([#5505](https://github.com/open-telemetry/opentelemetry-java/pull/5505))
+* Add HttpSenderProvider SPI
+ ([#5533](https://github.com/open-telemetry/opentelemetry-java/pull/5533))
+* Add JDK 11+ HttpClient HttpSender implementation
+ ([#5557](https://github.com/open-telemetry/opentelemetry-java/pull/5557))
+* Remove unnecessary :exporter:otlp:common dependencies
+ ([#5535](https://github.com/open-telemetry/opentelemetry-java/pull/5535))
+* Fix OTLP exporter artifact name in an error message
+ ([#5541](https://github.com/open-telemetry/opentelemetry-java/pull/5541))
+* Stabilize RetryPolicy API for OTLP exporters
+ ([#5524](https://github.com/open-telemetry/opentelemetry-java/pull/5524))
+* DEPRECATION: `opentelemetry-exporter-jaeger` and `opentelemetry-exporter-jaeger-thrift` are now
+ deprecated with the last release planned for 1.34.0 (January 2024)
+ ([#5190](https://github.com/open-telemetry/opentelemetry-java/pull/5190))
+
+#### SDK Extensions
+
+* Mark opentelemetry-sdk-extension-autoconfigure as stable
+ ([#5577](https://github.com/open-telemetry/opentelemetry-java/pull/5577))
+* Refactor autoconfigure registerShutdownHook(boolean) to disableShutdownHook()
+ ([#5565](https://github.com/open-telemetry/opentelemetry-java/pull/5565))
+* AutoConfiguredOpenTelemetrySdkBuilder does not set GlobalOpenTelemetry by default
+ ([#5564](https://github.com/open-telemetry/opentelemetry-java/pull/5564))
+* Add public API to autoconfigure to access environment resource
+ ([#5554](https://github.com/open-telemetry/opentelemetry-java/pull/5554))
+* Move autoconfigure getConfig to internal, remove getResource
+ ([#5467](https://github.com/open-telemetry/opentelemetry-java/pull/5467))
+* Add autoconfigure support for low memory metric temporality setting
+ ([#5558](https://github.com/open-telemetry/opentelemetry-java/pull/5558))
+* DEPRECATION: zpages extension from opentelemetry-sdk-extension-incubator
+ is now deprecated
+ ([#5578](https://github.com/open-telemetry/opentelemetry-java/pull/5578))
+
+### Project tooling
+
+* Publish build scans to ge.opentelemetry.io
+ ([#5510](https://github.com/open-telemetry/opentelemetry-java/pull/5510))
+* Update Gradle Wrapper from 8.0.1 to 8.1.1
+ ([#5531](https://github.com/open-telemetry/opentelemetry-java/pull/5531))
+* Add action to auto update gradle wrapper
+ ([#5511](https://github.com/open-telemetry/opentelemetry-java/pull/5511))
+
+## Version 1.27.0 (2023-06-09)
+
+The log bridge API / SDK are now stable! Some important notes:
+
+* The contents of `opentelemetry-api-logs` have been merged into `opentelemetry-api`.
+* The contents of `opentelemetry-exporter-otlp-logs` have been merged
+ into `opentelemetry-exporter-otlp`.
+* The contents of `opentelemetry-sdk-logs-testing` have been merged into `opentelemetry-sdk-testing`.
+* The `opentelemetry-sdk-logs` artifact has been marked stable.
+* `opentelemetry-sdk-extension-autoconfigure` has changed the default value
+ of `otel.logs.exporter` from `none` to `otlp`.
+
+NOTE: reminder that
+the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/logs/bridge-api.md)
+is _not_ meant for end users. Log appenders use the API to bridge logs from existing log
+frameworks (e.g. JUL, Log4j, SLf4J, Logback) into OpenTelemetry. Users configure the Log SDK to
+dictate how logs are processed and exported.
+See [opentelemetry.io](https://opentelemetry.io/docs/languages/java/api/#loggerprovider) for
+documentation on usage.
+
+### API
+
+* Promote log API to stable
+ ([#5341](https://github.com/open-telemetry/opentelemetry-java/pull/5341))
+* fix doc for OpenTelemetry class
+ ([#5454](https://github.com/open-telemetry/opentelemetry-java/pull/5454))
+
+### SDK
+
+* Ensure correct compiled output and sources are included in multi version jar
+ ([#5487](https://github.com/open-telemetry/opentelemetry-java/pull/5487))
+
+#### Logs
+
+* Fix broken link
+ ([#5451](https://github.com/open-telemetry/opentelemetry-java/pull/5451))
+* Add meaningful `.toString` to `NoopLogRecordProcessor` and `DefaultOpenTelemetry`
+ ([#5493](https://github.com/open-telemetry/opentelemetry-java/pull/5493))
+* Promote log SDK to stable
+ ([#5341](https://github.com/open-telemetry/opentelemetry-java/pull/5341))
+
+#### Metrics
+
+* Reset exponential aggregator scale after collection
+ ([#5496](https://github.com/open-telemetry/opentelemetry-java/pull/5496))
+* Experimental metric reader and view cardinality limits
+ ([#5494](https://github.com/open-telemetry/opentelemetry-java/pull/5494))
+
+#### Exporter
+
+* Merge otlp logs
+ ([#5432](https://github.com/open-telemetry/opentelemetry-java/pull/5432))
+* Append unit to prometheus metric names
+ ([#5400](https://github.com/open-telemetry/opentelemetry-java/pull/5400))
+
+#### Testing
+
+* Merge sdk logs testing
+ ([#5431](https://github.com/open-telemetry/opentelemetry-java/pull/5431))
+* Add a `hasBucketBoundaries()` variant that allows specifying precision
+ ([#5457](https://github.com/open-telemetry/opentelemetry-java/pull/5457))
+
+### SDK Extensions
+
+* Enable otlp logs by default in autoconfigure
+ ([#5433](https://github.com/open-telemetry/opentelemetry-java/pull/5433))
+
+### Semantic Conventions
+
+* Update to semconv 1.20.0
+ ([#5497](https://github.com/open-telemetry/opentelemetry-java/pull/5497))
+
+## Version 1.26.0 (2023-05-05)
+
+This release represents the release candidate ("RC") release for the Logs Bridge API / SDK. In the
+next release (1.27.0), `opentelemetry-api-logs` will be merged into `opentelemetry-api`,
+`opentelemetry-sdk-logs` will be marked as stable, `opentelemetry-exporter-otlp-logs` will be
+merged into `opentelemetry-exporter-otlp`, `opentelemetry-sdk-logs-testing` will be merged
+into `opentelemetry-sdk-testing`, `opentelemetry-sdk-extension-autoconfigure` will enable `otlp`
+log exporter by default (i.e. `otel.logs.exporter=otlp`). For more details, see tracking
+issue [#5340](https://github.com/open-telemetry/opentelemetry-java/issues/5340). NOTE: reminder that
+the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/logs/bridge-api.md)
+is _not_ meant for end users. Log appenders use the API to bridge logs from existing log
+frameworks (e.g. JUL, Log4j, SLf4J, Logback) into OpenTelemetry. Users configure the Log SDK to
+dictate how logs are processed and exported.
+
+`opentelemetry-opentracing-shim` is now stable!
+
+### SDK
+
+* Create OtelVersion class at build time which is used to resolve artifact version in `Resource`.
+ ([#5365](https://github.com/open-telemetry/opentelemetry-java/pull/5365))
+
+#### Metrics
+
+* Add prototype histogram advice API (i.e. Hints).
+ ([#5217](https://github.com/open-telemetry/opentelemetry-java/pull/5217))
+
+#### Logs
+
+* Add LogRecord observed timestamp field.
+ ([#5370](https://github.com/open-telemetry/opentelemetry-java/pull/5370))
+* Remove log record timestamp default.
+ ([#5374](https://github.com/open-telemetry/opentelemetry-java/pull/5374))
+* Align BatchLogRecordProcessor defaults with specification.
+ ([#5364](https://github.com/open-telemetry/opentelemetry-java/pull/5364))
+* Rename setEpoch to setTimestamp.
+ ([#5368](https://github.com/open-telemetry/opentelemetry-java/pull/5368))
+* Log SDK cleanup. Move `InMemoryLogRecordExporter` to `opentelemetry-sdk-logs-testing`.
+ Rename `InMemoryLogRecordExporter#getFinishedLogItems` to `getFinishedLogRecordItems`.
+ Move `SdkEventEmitterProvder` to internal package.
+ ([#5368](https://github.com/open-telemetry/opentelemetry-java/pull/5368))
+
+### Exporters
+
+* Add scaffolding for low level exporter TLS API.
+ ([#5362](https://github.com/open-telemetry/opentelemetry-java/pull/5362))
+* Add new low level TLS APIs on OTLP and Jaeger gRPC exporter builders.
+ ([#5280](https://github.com/open-telemetry/opentelemetry-java/pull/5280),
+ [#5422](https://github.com/open-telemetry/opentelemetry-java/pull/5422))
+* OTLP LogRecord exporters serialize observed timestamp.
+ ([#5382](https://github.com/open-telemetry/opentelemetry-java/pull/5382))
+* Update prometheus test to reflect new collector behavior.
+ ([#5417](https://github.com/open-telemetry/opentelemetry-java/pull/5417))
+* Prometheus exporter checks metrics name to prevent add duplicated _total suffix.
+ ([#5308](https://github.com/open-telemetry/opentelemetry-java/pull/5308))
+* Add additional OTLP test for authenticator.
+ ([#5391](https://github.com/open-telemetry/opentelemetry-java/pull/5391))
+
+### OpenTracing Shim
+
+* Mark opentracing-shim as stable.
+ ([#5371](https://github.com/open-telemetry/opentelemetry-java/pull/5371))
+
+### SDK Extensions
+
+* Fixes jaeger remote sampler service strategies bug resolving service name.
+ ([#5418](https://github.com/open-telemetry/opentelemetry-java/pull/5418))
+* Fix flaky JaegerRemoteSamplerGrpcNettyTest.
+ ([#5385](https://github.com/open-telemetry/opentelemetry-java/pull/5385))
+* Add new log level TLS APIs on JaegerRemoteSamplerBuilder.
+ ([#5422](https://github.com/open-telemetry/opentelemetry-java/pull/5422))
+* Fix a parameter name typo in autoconfigure-spi module.
+ ([#5409](https://github.com/open-telemetry/opentelemetry-java/pull/5409))
+
+### Semantic Conventinos
+
+* Add missing links to deprecated constants in SemanticAttributes.
+ ([#5406](https://github.com/open-telemetry/opentelemetry-java/pull/5406))
+
+### Project Tooling
+
+* Update stale workflow.
+ ([#5381](https://github.com/open-telemetry/opentelemetry-java/pull/5381))
+* Skip OWASP dependencyCheck on test modules.
+ ([#5383](https://github.com/open-telemetry/opentelemetry-java/pull/5383))
+* Skip OWASP dependencyCheck on jmh tasks.
+ ([#5384](https://github.com/open-telemetry/opentelemetry-java/pull/5384))
+* Drop create website pull request release step
+ ([#5361](https://github.com/open-telemetry/opentelemetry-java/pull/5361))
+
+## Version 1.25.0 (2023-04-07)
+
+### API
+
+* Cache ImmutableKeyValuePairs#hashCode
+ ([#5307](https://github.com/open-telemetry/opentelemetry-java/pull/5307))
+
+#### Propagators
+
+* Remove streams from B3Propagator
+ ([#5326](https://github.com/open-telemetry/opentelemetry-java/pull/5326))
+
+### SDK
+
+#### Metrics
+
+* Stop validating instrument unit
+ ([#5279](https://github.com/open-telemetry/opentelemetry-java/pull/5279))
+* Make the Executor for PrometheusHttpServer configurable
+ ([#5296](https://github.com/open-telemetry/opentelemetry-java/pull/5296))
+
+#### Exporter
+
+* Fix marshaler self suppression error
+ ([#5318](https://github.com/open-telemetry/opentelemetry-java/pull/5318))
+* Add sdk dependency to Logging OTLP exporter
+ ([#5291](https://github.com/open-telemetry/opentelemetry-java/pull/5291))
+
+#### Testing
+
+* Fixing up javadoc to reflect how to create a junit4 OpenTelemetryRule
+ ([#5299](https://github.com/open-telemetry/opentelemetry-java/pull/5299))
+
+### SDK Extensions
+
+* BREAKING: Autoconfigure drops support
+ for `otel.exporter.otlp.metrics.default.histogram.aggregation=EXPONENTIAL_BUCKET_HISTOGRAM`.
+ Use `BASE2_EXPONENTIAL_BUCKET_HISTOGRAM` instead.
+ ([#5290](https://github.com/open-telemetry/opentelemetry-java/pull/5290))
+* JaegerRemoteSampler use upstream grpc implementation if ManagedChannel is set
+ ([#5287](https://github.com/open-telemetry/opentelemetry-java/pull/5287))
+
+### OpenTracing Shim
+
+* Adds version to otel tracer instrumentation scope
+ ([#5336](https://github.com/open-telemetry/opentelemetry-java/pull/5336))
+
+### OpenCensus Shim
+
+* Adds version to otel tracer instrumentation scope
+ ([#5336](https://github.com/open-telemetry/opentelemetry-java/pull/5336))
+
+### Semantic Conventions
+
+* Update semconv to 1.19.0 and related build tool changes
+ ([#5311](https://github.com/open-telemetry/opentelemetry-java/pull/5311))
+
+## Version 1.24.0 (2023-03-10)
+
+### SDK
+
+#### Metrics
+
+* Optimize DefaultSynchronousMetricStorage iteration to reduce allocations
+ ([#5183](https://github.com/open-telemetry/opentelemetry-java/pull/5183))
+* Avoid exemplar allocations if there are no measurements
+ ([#5182](https://github.com/open-telemetry/opentelemetry-java/pull/5182))
+* Remove boxed primitives from aggregations to reduce allocations
+ ([#5184](https://github.com/open-telemetry/opentelemetry-java/pull/5184))
+* Stop ignoring long measurements in HistogramExemplarReservoir
+ ([#5216](https://github.com/open-telemetry/opentelemetry-java/pull/5216))
+* Remove validations for noop instrument names and units
+ ([#5146](https://github.com/open-telemetry/opentelemetry-java/pull/5146))
+* Allow views to select on instrument unit
+ ([#5255](https://github.com/open-telemetry/opentelemetry-java/pull/5255))
+
+#### Exporter
+
+* Add (internal) TlsConfigHelper for additional TLS configurability
+ ([#5246](https://github.com/open-telemetry/opentelemetry-java/pull/5246))
+
+#### SDK Extensions
+
+* Introduce mTLS support for JaegerRemoteSamplerBuilder (#5209)
+ ([#5248](https://github.com/open-telemetry/opentelemetry-java/pull/5248))
+
+### OpenTracing Shim
+
+* OpenTracing Shim: Update Tracer.close()
+ ([#5151](https://github.com/open-telemetry/opentelemetry-java/pull/5151))
+
+* Update version to 1.24.0
+ ([#5198](https://github.com/open-telemetry/opentelemetry-java/pull/5198))
+* Post release 1.23.0
+ ([#5202](https://github.com/open-telemetry/opentelemetry-java/pull/5202))
+
+### OpenCensus Shim
+
+* Addresses opencensus-shim trace issues under otel javaagent
+ ([#4900](https://github.com/open-telemetry/opentelemetry-java/pull/4900))
+
+### Project tooling
+
+* Cleanup readmes
+ ([#5263](https://github.com/open-telemetry/opentelemetry-java/pull/5263))
+* Upgrade to gradle 8.0.1
+ ([#5256](https://github.com/open-telemetry/opentelemetry-java/pull/5256))
+* Fixed example resource provider classname.
+ ([#5235](https://github.com/open-telemetry/opentelemetry-java/pull/5235))
+* Fix case of bug label in open issue workflow
+ ([#5268](https://github.com/open-telemetry/opentelemetry-java/pull/5268))
+
+### Semantic Conventions
+
+* Update semconv to 1.19.0
+ ([#5311](https://github.com/open-telemetry/opentelemetry-java/pull/5311))
+
+## Version 1.23.1 (2023-02-15)
+
+* Fix bug that broke `AutoConfiguredOpenTelemetrySdk`'s shutdown hook.
+ ([#5221](https://github.com/open-telemetry/opentelemetry-java/pull/5221))
+
+## Version 1.23.0 (2023-02-10)
+
+This release is a notable release for metrics:
+
+* The base2 exponential histogram aggregation has been marked as stable. To use, configure
+ your `MetricExporter` with a default aggregation
+ of `Aggregation.base2ExponentialBucketHistogram()` for histogram instruments. If using OTLP
+ exporter with autoconfigure,
+ set `OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=BASE2_EXPONENTIAL_BUCKET_HISTOGRAM`.
+ If using configuring OTLP programatically,
+ use `Otlp*MetricExporterBuilder#setDefaultAggregationSelector(DefaultAggregationSelector)`.
+* The metrics SDK undergone significant internal refactoring which results in reduced complexity and
+ significantly reduced memory allocation during metric collection / export.
+
+### API
+
+#### Logs
+
+* WARNING: Split out Event API from Log API. Event API is now published in `opentelemetry-api-events`.
+ API / SDK usage has also changed - see PR for details.
+ ([#5049](https://github.com/open-telemetry/opentelemetry-java/pull/5049))
+
+### SDK
+
+* Add shutdown / close to `OpenTelemetrySdk`
+ ([#5100](https://github.com/open-telemetry/opentelemetry-java/pull/5100))
+
+#### Metrics
+
+* Base2 exponential histogram aggregations are now stable. Add `base2ExponentialBucketHistogram()`
+ to `Aggregation`.
+ ([#5143](https://github.com/open-telemetry/opentelemetry-java/pull/5143))
+* Promote exponential histogram data interfaces to stable package
+ ([#5120](https://github.com/open-telemetry/opentelemetry-java/pull/5120))
+* Add Base2 prefix to internal exponential histogram classes
+ ([#5179](https://github.com/open-telemetry/opentelemetry-java/pull/5179))
+* Add MaxScale config parameter to `Base2ExponentialBucketHistogram`
+ ([#5044](https://github.com/open-telemetry/opentelemetry-java/pull/5044))
+* Add close method to `MetricReader`
+ ([#5109](https://github.com/open-telemetry/opentelemetry-java/pull/5109))
+* Reuse `AggregatorHandle` with cumulative temporality to reduce allocations
+ ([#5142](https://github.com/open-telemetry/opentelemetry-java/pull/5142))
+* Delete notion of accumulation to reduce allocations
+ ([#5154](https://github.com/open-telemetry/opentelemetry-java/pull/5154))
+* Delete bound instruments
+ ([#5157](https://github.com/open-telemetry/opentelemetry-java/pull/5157))
+* Reuse aggregation handles for delta temporality to reduce allocations
+ ([#5176](https://github.com/open-telemetry/opentelemetry-java/pull/5176))
+
+#### Exporter
+
+* Add proper shutdown implementations for all exporters
+ ([#5113](https://github.com/open-telemetry/opentelemetry-java/pull/5113))
+
+#### SDK Extensions
+
+* WARNING: Remove deprecated autoconfigure exemplar filter names. Previous names `none`, `all`
+ , `with_sampled_trace` have been removed. Use `always_off`, `always_on`, `trace_based` instead.
+ ([#5098](https://github.com/open-telemetry/opentelemetry-java/pull/5098))
+* Add autoconfigure support for "none" option for propagator value
+ ([#5121](https://github.com/open-telemetry/opentelemetry-java/pull/5121))
+* Add autoconfigure support for `parentbased_jaeger_remote` sampler
+ ([#5123](https://github.com/open-telemetry/opentelemetry-java/pull/5123))
+* Autoconfigure closes up autoconfigured resources in case of exception
+ ([#5117](https://github.com/open-telemetry/opentelemetry-java/pull/5117))
+* View file based config has switched from snakeyaml to snakeyaml-engine for YAML parsing.
+ ([#5138](https://github.com/open-telemetry/opentelemetry-java/pull/5138))
+* Fix autoconfigure resource providers property docs
+ ([#5135](https://github.com/open-telemetry/opentelemetry-java/pull/5135))
+
+#### Testing
+
+* WARNING: Merge `opentelemetry-sdk-metrics-testing` into `opentelemetry-sdk-testing`. Stop
+ publishing `opentelemetry-sdk-metrics-testing`.
+ ([#5144](https://github.com/open-telemetry/opentelemetry-java/pull/5144))
+* Sort spans by start time (parents before children as tiebreaker) to avoid common causes for flaky
+ tests
+ ([#5026](https://github.com/open-telemetry/opentelemetry-java/pull/5026))
+* Add resource assertion methods to `SpanDataAssert` and `MetricAssert`
+ ([#5160](https://github.com/open-telemetry/opentelemetry-java/pull/5160))
+
+
+### Semantic Conventions
+
+* Update semconv to 1.18.0
+ ([#5188](https://github.com/open-telemetry/opentelemetry-java/pull/5188))
+ ([#5134](https://github.com/open-telemetry/opentelemetry-java/pull/5134))
+
+### OpenTracing Shim
+
+* Refactor to remove internal objects `BaseShimObject` and `TelemetryInfo`
+ ([#5087](https://github.com/open-telemetry/opentelemetry-java/pull/5087))
+* WARNING: Minimize public surface area of OpenTracingShim. Remove `createTracerShim()`
+ , `createTracerShim(Tracer)`, `createTracerShim(Tracer, OpenTracingPropagators)`.
+ Add `createTracerShim(TracerProvder,TextMapPropagator,TextMapPropagator)`.
+ ([#5110](https://github.com/open-telemetry/opentelemetry-java/pull/5110))
+
+### Project tooling
+
+* Add OWASP dependency check
+ ([#5177](https://github.com/open-telemetry/opentelemetry-java/pull/5177))
+
+## Version 1.22.0 (2023-01-06)
+
+### API
+
+* WARNING: GlobalOpenTelemetry trigger of autoconfiguration is now opt-in.
+ Previously, `GlobalOpenTelemetry.get` triggered autoconfiguration
+ if `opentelemetry-sdk-extension-autoconfigure` was detected on the classpath. That behavior is now
+ opt-in by setting environment variable `OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED=true`.
+ ([#5010](https://github.com/open-telemetry/opentelemetry-java/pull/5010))
+* Update LoggerBuilder, MeterBuilder, TracerBuilder javadoc
+ ([#5050](https://github.com/open-telemetry/opentelemetry-java/pull/5050))
+
+#### Context
+
+* Make closing scope idempotent and non-operational when corresponding context is not current.
+ [(#5061)](https://github.com/open-telemetry/opentelemetry-java/pull/5061)
+
+### SDK
+
+* Standardize internal usage of `ConfigUtil` for reading environment variables and system properties
+ ([#5048](https://github.com/open-telemetry/opentelemetry-java/pull/5048))
+
+#### Metrics
+
+* Lazily initialize exponential histogram buckets
+ ([#5023](https://github.com/open-telemetry/opentelemetry-java/pull/5023))
+* Delete MapCounter alternative exponential histogram implementation
+ ([#5047](https://github.com/open-telemetry/opentelemetry-java/pull/5047))
+* Add toString to SdkMeter, SdkObservableInstrument, AbstractInstrumentBuilder
+ ([#5072](https://github.com/open-telemetry/opentelemetry-java/pull/5072))
+
+#### Exporter
+
+* `OtlpGrpcSpanExporter`, `OtlpHttpSpanExporter`, `OtlpGrpcLogRecordExporter`,
+ `OtlpHttpLogRecordExporter`, `ZipkinSpanExporter`, and `JaegerGrpcSpanExporter` are now
+ instrumented with `GlobalOpenTelemetry` by default. Instrumentation initializes lazily to prevent
+ ordering issue of accessing `GlobalOpenTelemetry.get` before `GlobalOpenTelemetry.set` is called.
+ ([#4993](https://github.com/open-telemetry/opentelemetry-java/pull/4993))
+* Add `ConfigurableSpanExporterProvider` implementation for `JaegerGrpcSpanExporter`
+ ([#5002](https://github.com/open-telemetry/opentelemetry-java/pull/5002))
+* Add `ConfigurableSpanExporterProvider`, `ConfigurableMetricExporterProvider`,
+ `ConfigurableLogRecordExporterProvider` for `OtlpGrpc{Signal}Exporter`s
+ and `OtlpHttp{SignalExporter`s
+ ([#5003](https://github.com/open-telemetry/opentelemetry-java/pull/5003))
+* Replace OTLP User-Agent spaces with dashes
+ ([#5080](https://github.com/open-telemetry/opentelemetry-java/pull/5080))
+* Add `AutoConfigurationCustomizerProvider` implementation for `PrometheusHttpServer`
+ ([#5053](https://github.com/open-telemetry/opentelemetry-java/pull/5053))
+* Add resource `target_info` and scope `target_info` metrics to `PrometheusHttpServer` in compliance
+ with spec
+ ([#5039](https://github.com/open-telemetry/opentelemetry-java/pull/5039))
+* Drop delta metrics in `PrometheusHttpServer`
+ ([#5062](https://github.com/open-telemetry/opentelemetry-java/pull/5062))
+* PrometheusHttpServer drops metrics with same name and different type
+ ([#5078](https://github.com/open-telemetry/opentelemetry-java/pull/5078))
+
+#### SDK Extensions
+
+* DEPRECATION: Align autoconfigure exemplar filter names with spec. Previous names `none`, `all`,
+ `with_sampled_trace` are deprecated. Use `always_off`, `always_on`, `trace_based` instead.
+ ([#5063](https://github.com/open-telemetry/opentelemetry-java/pull/5063))
+
+### OpenTracing Shim
+
+* Add createTracerShim function
+ ([#4988](https://github.com/open-telemetry/opentelemetry-java/pull/4988))
+
+## Version 1.21.0 (2022-12-09)
+
+### API
+
+### API Extensions
+
+* WARNING: `opentelemetry-extension-aws` has been removed following its relocation
+ to [opentelemetry-java-contrib/aws-xray-propagator](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-xray-propagator),
+ which is published under
+ coordinates `io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:{version}`.
+ We will push security patches to `1.20.x` as needed. The latest `opentelemetry-bom` will point
+ to the latest published version, currently `1.20.1`.
+ ([#4945](https://github.com/open-telemetry/opentelemetry-java/pull/4945))
+* Add toString implementation to various propagator components
+ ([#4996](https://github.com/open-telemetry/opentelemetry-java/pull/4996))
+
+### SDK
+
+#### Logs
+
+* Add toString implementation to various log SDK components
+ ([#4979](https://github.com/open-telemetry/opentelemetry-java/pull/4979))
+
+#### Metrics
+
+* Add histogram collection benchmark
+ ([#4912](https://github.com/open-telemetry/opentelemetry-java/pull/4912))
+* Add ExponentialHistogramIndexerBenchmark
+ ([#4989](https://github.com/open-telemetry/opentelemetry-java/pull/4989))
+* Stop extra copy of exponential histogram buckets
+ ([#5020](https://github.com/open-telemetry/opentelemetry-java/pull/5020))
+
+#### Exporter
+
+* Zipkin exporter serializes EventData attributes as JSON
+ ([#4934](https://github.com/open-telemetry/opentelemetry-java/pull/4934))
+* Add support for EC mTLS keys (applies to `OtlpHttp{Signal}Exporter`, `OtlpGrpc{Signal}Exporter`,
+ `JaegerGrpcSpanExporter`, `JaegerRemoteSampler`)
+ ([#4920](https://github.com/open-telemetry/opentelemetry-java/pull/4920))
+* Add `Configurable{Signal}ExporterProvider` implementations for `Logging{Signal}Exporter`s
+ ([#4950](https://github.com/open-telemetry/opentelemetry-java/pull/4950))
+* Add `ConfigurableSpanExporterProvider` implementation for `ZipkinSpanExporter`
+ ([#4991](https://github.com/open-telemetry/opentelemetry-java/pull/4991))
+* Add `Configurable{Signal}ExporterProvider` implementations for `OtlpJsonLogging{Signal}Exporter`s
+ ([#4992](https://github.com/open-telemetry/opentelemetry-java/pull/4992))
+* `ZipkinSpanExporter` populates remoteEndpoint
+ ([#4933](https://github.com/open-telemetry/opentelemetry-java/pull/4933))
+
+#### SDK Extensions
+
+* BREAKING: Remove support for otel.experimental.sdk.enabled from autoconfigure
+ ([#4973](https://github.com/open-telemetry/opentelemetry-java/pull/4973))
+* De-singleton ZPageServer implementation
+ ([#4935](https://github.com/open-telemetry/opentelemetry-java/pull/4935))
+* Add auto-configure support for logging-otlp exporters
+ ([#4879](https://github.com/open-telemetry/opentelemetry-java/pull/4879))
+* Move DefaultConfigProperties to internal package in `opentelemetry-sdk-extension-autoconfigure-spi`
+ ([#5001](https://github.com/open-telemetry/opentelemetry-java/pull/5001))
+
+#### Testing
+
+* Make APIs for asserting attributes consistent
+ ([#4882](https://github.com/open-telemetry/opentelemetry-java/pull/4882))
+* Attribute assertions error messages always contain the attr key
+ ([#5027](https://github.com/open-telemetry/opentelemetry-java/pull/5027))
+
+### Semantic Conventions
+
+* Update semantic and resource attributes for spec v1.16.0
+ ([#4938](https://github.com/open-telemetry/opentelemetry-java/pull/4938),
+ [#5033](https://github.com/open-telemetry/opentelemetry-java/pull/5033))
+
+### OpenTracing Shim
+
+* Handle unsupported types when setting Attributes
+ ([#4939](https://github.com/open-telemetry/opentelemetry-java/pull/4939))
+* Properly set the status based on the error tag
+ ([#4962](https://github.com/open-telemetry/opentelemetry-java/pull/4962))
+* Handle `io.opentracing.noop.NoopSpan` correctly
+ ([#4968](https://github.com/open-telemetry/opentelemetry-java/pull/4968))
+* Log invalid arguments rather than throwing exceptions.
+ ([#5012](https://github.com/open-telemetry/opentelemetry-java/pull/5012))
+* Stop mapping semconv values from OpenTracing to OTel.
+ ([#5016](https://github.com/open-telemetry/opentelemetry-java/pull/5016))
+
+## Version 1.20.1 (2022-11-15)
+
+### Bugfixes
+
+* Fix bug in `ComponentRegistry` that produces `ConcurrentModificationException` when reading
+ metrics at the same time as obtaining a meter.
+ [(#4951)](https://github.com/open-telemetry/opentelemetry-java/pull/4951)
+
+## Version 1.20.0 (2022-11-11)
+
+### API
+
+- Fix bug in `W3CBaggagePropagator` that caused `+` characters to be decoded as whitespace ` `.
+ [(#4898)](https://github.com/open-telemetry/opentelemetry-java/pull/4898)
+
+#### API Extensions
+
+* DEPRECATION: the `opentelemetry-extension-aws` module containing
+ various `AwsXrayPropagator` implementations has been deprecated for removal in next minor version.
+ A copy of the code will instead be maintained
+ in [opentelemetry-java-contrib/aws-xray-propagator](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-xray-propagator)
+ and published under
+ coordinates `io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:{version}`.
+ [(#4862)](https://github.com/open-telemetry/opentelemetry-java/pull/4862)
+
+### SDK
+
+#### Traces
+
+* Add graal hints for shaded dependencies, allowing `JcTools` queue to be used in graal environment.
+ [(#4832)](https://github.com/open-telemetry/opentelemetry-java/pull/4832)
+* `Sampler#getDescription()` implementations are now locale independent.
+ [(#4877)](https://github.com/open-telemetry/opentelemetry-java/pull/4887)
+* Allow SDK to run in environments prohibiting use of `sun.misc.Unsafe`.
+ [(#4902)](https://github.com/open-telemetry/opentelemetry-java/pull/4902)
+
+#### Metrics
+
+* Add `toString` to `AbstractInstrument`.
+ [(#4833)](https://github.com/open-telemetry/opentelemetry-java/pull/4883)
+* Add zero bucket boundary to default explicit bucket histogram aggregation.
+ [(#4819)](https://github.com/open-telemetry/opentelemetry-java/pull/4819)
+
+#### Logs
+
+* Optimize log hot path, reducing allocations significantly.
+ [(#4913)](https://github.com/open-telemetry/opentelemetry-java/pull/4913)
+* BREAKING: Add `Context` argument to `LogRecordProcessor#onEmit`.
+ [(#4889)](https://github.com/open-telemetry/opentelemetry-java/pull/4889)
+
+#### Exporter
+
+* `OtlpLogging{Signal}Exporter`s encode enums as numbers.
+ [(#4783)](https://github.com/open-telemetry/opentelemetry-java/pull/4783)
+* Add `User-Agent` header of `OTel OTLP Exporter Java/{version}` to OTLP export requests.
+ [(#4784)](https://github.com/open-telemetry/opentelemetry-java/pull/4784)
+
+#### SDK Extensions
+
+* WARNING: `opentelemetry-sdk-extension-aws` has been removed following its relocation
+ to [opentelemetry-java-contrib/instrumentation-aws-xray](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-xray),
+ which is published under
+ coordinates `io.opentelemetry.contrib:opentelemetry-aws-resources:{version}`.
+ We will push security patches to `1.19.x` as needed. The latest `opentelemetry-bom` will point
+ to the latest published version, currently `1.19.0`.
+ [(#4830)](https://github.com/open-telemetry/opentelemetry-java/pull/4830)
+* WARNING: `opentelemetry-sdk-extension-resources` has been removed following its relocation
+ to [opentelemetry-java-instrumentation/instrumentation/resources/library](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/resources/library),
+ which is published under
+ coordinates `io.opentelemetry.instrumentation:opentelemetry-resources:{version}`.
+ We will push security patches to `1.19.x` as needed. The latest `opentelemetry-bom` will point
+ to the latest published version, currently `1.19.0`.
+ [(#4828)](https://github.com/open-telemetry/opentelemetry-java/pull/4828)
+* Add autoconfigure support for `BatchLogRecordProcessor`.
+ [(#4811)](https://github.com/open-telemetry/opentelemetry-java/pull/4811)
+* Autoconfigure performs percent decoding on `otel.resource.attributes` values.
+ [(#4653)](https://github.com/open-telemetry/opentelemetry-java/issues/4653)
+* Unify compression configuration for exporters including
+ [(#4775)](https://github.com/open-telemetry/opentelemetry-java/pull/4775):
+ * Fix handling of `none` in OTLP exporters.
+ * Add `JaegerGrpcSpanExporterBuilder#setCompression(String)`.
+ * Add `ZipkinSpanExporterBuilder#setCompression(String)`.
+
+### Semantic Conventions
+
+* Add migration notes to deprecated attributes
+ [(#4840)](https://github.com/open-telemetry/opentelemetry-java/pull/4840)
+
+### OpenTracing Shim
+
+* Use `opentracing-shim` as instrumentation scope name.
+ [(#4890)](https://github.com/open-telemetry/opentelemetry-java/pull/4890)
+* Add full support for multiple parents.
+ [(#4916)](https://github.com/open-telemetry/opentelemetry-java/pull/4916)
+
+## Version 1.19.0 (2022-10-07)
+
+This release contains a large number of changes to the log signal following a series of significant
+changes to
+the [log specification](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/logs).
+The changes include renaming key classes like `LogExporter` to `LogRecordExporter`,
+and `LogProcessor` to `LogRecordProcessor`, and `LogEmitter` to `Logger`, and more. Additionally, a
+log API component has been added for emitting events and for writing log appenders. Note, the log
+API is not a substitute for traditional log frameworks like Log4j, JUL, SLF4J, or Logback. While the
+event portion of the API is intended for instrumentation authors and end users, the API for emitting
+LogRecords is not.
+See [LoggerProvider](./api/all/src/main/java/io/opentelemetry/api/logs/LoggerProvider.java)
+and [Logger](./api/all/src/main/java/io/opentelemetry/api/logs/Logger.java) javadoc for more
+details.
+
+### General
+
+* Add `opentelemetry-bom` as a dependency to `opentelemetry-bom-alpha`, ensuring synchronization
+ between alpha and stable artifact versions.
+
+### API
+
+#### API Extensions
+
+* WARNING: `opentelemetry-extension-annotations` has been removed following its relocation
+ to [opentelemetry-java-instrumentation/instrumentation-annotations](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation-annotations),
+ which is published under
+ coordinates `io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:{version}`.
+ We will push security patches to `1.18.x` as needed. The latest `opentelemetry-bom` will point
+ to the latest published version, currently `1.18.0`.
+
+#### Logs
+
+* Introduce log API for emitting events and writing log appenders. The artifact is available at
+ coordinates `io.opentelemetry:opentelemetry-api-logs:1.19.0-alpha`.
+
+### SDK
+
+#### Metrics
+
+* Change exponential histogram bucket boundaries to be lower exclusive / upper inclusive, instead of
+ lower inclusive / upper exclusive.
+
+#### Logs
+
+* BREAKING: Rename `SdkLogEmitterProvider` to `SdkLoggerProvider`.
+ `OpenTelemetrySdkBuilder#setLogEmitterProvider` has changed
+ to `OpenTelemetrySdkBuilder#setLoggerProvider`. `OpenTelemetrySdk#getSdkLogEmitterProvider` has
+ changed to `OpenTelemetrySdk#getSdkLoggerProvider`.
+ `AutoConfigurationCustomizer#addLogEmitterProviderCustomizer` has changed
+ to `AutoConfigurationCustomizer#addLoggerProviderCustomizer`.
+* BREAKING: Rename `LogEmitter` to `Logger`.
+* BREAKING: Rename `LogExporter` to `LogRecordExporter`. `SystemOutLogExporter` has changed
+ to `SystemOutLogRecordExporter`. `OtlpJsonLoggingLogExporter` has changed
+ to `OtlpJsonLoggingLogRecordExporter`. `OtlpHttpLogExporter` has changed
+ to `OtlpHttpLogRecordExporter`. `OtlpGrpcLogExporter` has changed to `OtlpGrpcLogRecordExporter`.
+ `InMemoryLogExporter` has changed to `InMemoryLogRecordExporter`.
+ ConfigurableLogExporterProvider` has changed to `ConfigurableLogRecordExporterProvider`.
+* BREAKING: Rename `LogData` to `LogRecordData`. `TestLogData` has changed to `TestLogRecordData`.
+* BREAKING: Rename `LogProcessor` to `LogRecordProcessor`. `BatchLogProcessor` has changed
+ to `BatchLogRecordProcessor`. `SimpleLogProcessor` has changed to `SimpleLogRecordProcessor`.
+
+#### Exporter
+
+* OTLP log record exporters now
+ include [dropped_attributes_count](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/logs/v1/logs.proto#L157).
+
+#### SDK Extensions
+
+* Autoconfigure now supports an option to disable the SDK. If `otel.sdk.disabled=true`,
+ `AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()` returns a minimal (but not
+ noop) `OpenTelemetrySdk` with noop tracing, metric and logging providers. The same minimal
+ instance is set to `GlobalOpenTelemetry`. The now deprecated
+ property `otel.experimental.sdk.enabled` will continue to work in the same way during a transition
+ period.
+* Fix `ProcessResource` directory separator to use `/` or `\` instead of `:` or `;`.
+* DEPRECATION: the `opentelemetry-sdk-extension-resource` module containing
+ various `ResourceProvider` implementations has been deprecated for removal in next major version.
+ A copy of the code will instead be maintained
+ in [opentelemetry-java-instrumentation/instrumentation/resources/library](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/resources/library)
+ and published under
+ coordinates `io.opentelemetry.instrumentation:opentelemetry-resources:{version}`.
+* DEPRECATION: the `opentelemetry-sdk-extension-aws` module containing AWS `ResourceProvider`
+ implementations has been deprecated for removal in next major version. A copy of the code will
+ instead be maintained
+ in [opentelemetry-java-contrib/aws-resources](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources)
+ and published under coordinates `io.opentelemetry.contrib:opentelemetry-aws-resources:{version}`.
+
+### OpenTracing Shim
+
+* Fully support Baggage-only propagation.
+
+### Semantic conventions
+
+* The semantic conventions have been updated to 1.13.0.
+
+## Version 1.18.0 (2022-09-09)
+
+### SDK
+
+* Added scope attributes to `InstrumentationScopeInfo` accessible
+ via `InstrumentationScopeInfo#getAttributes()`. Will add the ability to specify scope attributes
+ in Meter, Tracer, and Logger in a future version.
+* DEPRECATION: The `InstrumentationScopeInfo#create(String, String, String)` method has been
+ deprecated in favor of
+ `InstrumentationScopeInfo#builer(String).setVersion(String).setSchemaUrl(String).build()`.
+* Optimize `Resource#merge(Resource)` by returning early if the other resource is empty.
+
+#### Logs
+
+* Fix module name of `opentelemetry-sdk-logs` by changing
+ from `io.opentelemetry.sdk.extension.logging` to `io.opentelemetry.sdk.logs`.
+
+#### Testing
+
+* Add methods to assert attributes do not contain keys via `AttributeAssert#doesNotContainKey()`.
+
+#### Exporter
+
+* Added ability to specify local IP address in `ZipkinSpanExporter`
+ via `ZipkinSpanExporterBuilder#setLocalIpAddressSupplier(Supplier)`.
+* Upgrade to OTLP protobuf version 0.19.0.
+* OTLP exporters now serialize `InstrumentationScopeInfo#getAttributes()`.
+* Stop publishing `opentelemetry-exporter-jaeger-proto`. The `opentelemetry-bom` will include a
+ constraint on the last published version `1.17.0`. If security issues are discovered, patches will
+ be published to `1.17.x`.
+
+#### SDK Extensions
+
+* BREAKING: `opentelemetry-sdk-extension-metric-incubator`,
+ `opentelemetry-sdk-extension-tracing-incubator`, and `opentelemetry-sdk-extension-zpages` merged
+ into `opentelemetry-sdk-extension-incubator`.
+* BREAKING: Move `opentelemetry-sdk-extension-jfr-events`
+ to [opentelemetry-java-contrib/jfr-events](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/jfr-events).
+ It will now be published under the
+ coordinates `io.opentelemetry.contrib:opentelemetry-jfr-events:{version}`.
+* BREAKING: Move `opentelemetry-extension-noop-api`
+ to [opentelemetry-java-contrib/noop-api](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/noop-api).
+ It will now be published under the
+ coordinates `io.opentelemetry.contrib:opentelemetry-noop-api:{version}`.
+* Improve ECS resource detection to include `aws.ecs.container.arn`, `container.image.name`,
+ `container.image.tag`, `aws.ecs.container.image.id`, `aws.log.group.arns`, `aws.log.group.names`,
+ `aws.log.steam.names`, `aws.ecs.task.arn`, `aws.ecs.task.family`, and `aws.ecs.task.revision`.
+* Fix resource `container.id` detection when using k8s with containerd v1.5.0+.
+* Add experimental `ConditionalResourceProvider` SPI, for conditionally applying resource providers
+ based on current config and resource.
+
+### Micrometer shim
+
+* BREAKING: Move `opentelemetry-micrometer1-shim`
+ to [opentelemetry-java-instrumentation/instrumentation/micrometer/micrometer-1.5/library](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/micrometer/micrometer-1.5/library).
+ It will now be published under the
+ coordinates `io.opentelemetry.instrumentation:opentelemetry-micrometer-1.5:{version}`.
+
+## Version 1.17.0 (2022-08-12)
+
+### API
+
+#### API Extensions
+
+* DEPRECATION: the `opentelemetry-extension-annotations` module containing `@WithSpan`
+ and `@SpanAttribute` annotations has been deprecated for removal in next major version. A copy of
+ the code will instead be maintained
+ in [opentelemetry-java-instrumentation/instrumentation-annotations](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation-annotations)
+ and published under
+ coordinates `io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:{version}`.
+
+### SDK
+
+#### Traces
+
+* Add default implementation for `SpanData#getInstrumentationScopeInfo()`
+ and `ReadableSpan#getInstrumentationScopeInfo()`. This fixes a previous mistake where those
+ interfaces were extended without default implementation, a breaking change for source
+ compatibility. Stricter checks have been added to ensure this mistake is not repeated.
+
+#### Logs
+
+* BREAKING: delete `LogDataBuilder`. A similar implementation of `LogData` called `TestLogData` has
+ been added to `opentelemetry-sdk-logs-testing`.
+* BREAKING: rename `LogProcessor#emit(LogData)` to `LogProcessor#onEmit(ReadWriteLogRecord)`. The
+ argument change from `LogData` to `ReadWriteLogRecord` allows implementations to mutate logs. To
+ obtain `LogData`, call `ReadWriteLogRecord#toLogData()`.
+* Optimize `SdkLogEmitterProvider` to return noop `LogEmitter` when no `LogProcessor`s are
+ registered.
+
+#### Exporter
+
+* Split out shared and internal exporter classes from `opentelemetry-exporter-otlp-common`
+ to `opentelemetry-exporter-common`.
+* Add experimental support for OTLP header based authentication. To use, add a dependency
+ on `opentelemetry-exporter-common` and
+ call `io.opentelemetry.exporter.internal.auth.Authenticator#setAuthenticatorOnDelegate(OtlpHttp{Signal}Builder, Authenticator)`.
+* Add ability to collect export metrics on `ZipkinSpanExporter`
+ via `ZipkinSpanExporter#setMeterProvider(MeterProvider)`.
+* Minor optimization to OkHttp based exporters to cache endpoint URLs. Applies
+ to `OtlpHttp{Signal}Exporter`, `OtlpGrpc{Signal}Exporter`, and more.
+* Fix diagnostic log message in `OtlpGrpc{Signal}Exporter` to include correct environment variables.
+
+#### SDK Extensions
+
+* Extend View file based configuration with support for specifying explicit bucket histogram bucket
+ boundaries and exponential bucket counts.
+* Extend autoconfigure SPI `AutoConfigurationCustomizerProvider` and `ResourceProvider` with option
+ to specify ordering.
+* Add autoconfigure SPI with `ConfigurableLogExporterProvider`, allowing custom named log exporters
+ to be provided and selected via autoconfigure.
+* Extend autoconfigure SPI with `AutoConfigurationCustomizer#addPropertiesCustomizer`, providing the
+ ability examine current configuration properties and add / overwrite properties.
+
+## Version 1.16.0 (2022-07-13)
+
+### API
+
+* Fix bug `ImmutableKeyValuePairs` implementation that causes `ArrayIndexOutOfBoundsException` to be
+ thrown under certain conditions.
+
+### SDK
+
+#### Traces
+
+* Optimize `BatchSpanProcessor` using JcTools.
+
+#### Metrics
+
+* Tighten up exponential histogram implementation for alignment with specification: Default to 160
+ positive and negative buckets. Remove ability to configure starting scale. Minimum number of
+ buckets is one instead of zero.
+* Allow `MetricExporter` and `MetricReader` to influence default aggregation. The default
+ aggregation is used when no registered views match an instrument.
+
+#### Exporter
+
+* Fix handling of client keys in PEM format.
+* For OTLP exporters, change behavior to use `OkHttpGrpcExporter` (OkHttp implementation that
+ doesn't use any gRPC dependencies) unless `OtlpGrpc{Signal}Builder#setChannel(ManagedChannel)` is
+ called by user. Previously, `OkHttpGrpcExporter` was used if no gRPC implementation was found on
+ classpath.
+* Add support to configure default aggregation on OTLP metric exporters
+ via `Otlp{Protocol}MetricExporterBuilder#setDefaultAggregationSelector(DefaultAggregationSelector)`.
+
+#### Testing
+
+* Add span status assertions.
+
+#### SDK Extensions
+
+* Autoconfigure properly handles non-string system properties.
+* Autoconfigure normalizes hyphens `-` to periods `.` when accessing `ConfigProperties`.
+
+### OpenTracing Shim
+
+* Add support for span wrappers.
+* Store OpenTracing `SpanContext` in OpenTracing `Span` wrapper.
+* Use `Baggage` of active span.
+
+## Version 1.15.0 (2022-06-10)
+
+### API
+
+* Add batch callback API, allowing a single callback to record measurements to multiple metric
+ instruments.
+
+### SDK
+
+#### Metrics
+
+* `SdkMeterProvider#toString()` now returns a useful string describing configuration.
+* Fix bug preventing proper function of Metrics SDK when multiple readers are
+ present ([#4436](https://github.com/open-telemetry/opentelemetry-java/pull/4436)).
+* Fix reporting intervals for metrics for delta
+ readers ([#4400](https://github.com/open-telemetry/opentelemetry-java/issues/4400)).
+
+#### Exporter
+
+* BREAKING: merge all stable OTLP exporters into `opentelemetry-exporter-otlp`.
+ `opentelemetry-exporter-otlp-trace`, `opentelemetry-exporter-otlp-metrics`,
+ `opentelemetry-exporter-otlp-http-trace`, and `opentelemetry-exporter-otlp-http-metrics` are no
+ longer published and their contents have been merged into a single artifact.
+* BREAKING: merge log OTLP exporters into `opentelemetry-exporter-otlp-logs`.
+ `opentelemetry-exporter-otlp-http-logs` is no longer published and its contents have been merged
+ into a single artifact.
+* Upgrade to OTLP protobuf version 0.18.0.
+* RetryInterceptor retries on `SocketTimeoutException` with no message.
+* Added `JaegerGrpcSpanExporterBuilder#setMeterProvider()`, enabling support of experimental jaeger
+ span export metrics.
+* DEPRECATION: the `opentelemetry-exporter-jaeger-proto` module containing jaeger proto definitions
+ and corresponding generated classes is deprecated for removal in next major version.
+* OTLP gRPC exporters support overriding `:authority`
+ via `OtlpGrpc*ExporterBuilder#addHeader("host", "my-authority-override")`.
+
+#### SDK Extensions
+
+* BREAKING: Move `ConfigureableMetricExporterProvider`
+ from `opentelemetry-sdk-extension-autoconfigure` to
+ stable `opentelemetry-sdk-extension-autoconfigure-spi`.
+* Autoconfigure now supports multiple values for `otel.metrics.exporter`.
+* Autoconfigure now
+ supports [general attribute limits](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits),
+ applicable to span attributes, span event attributes, span link attributes, and log attributes.
+* Autoconfigure now supports an experimental option to disable the SDK.
+ If `otel.experimental.sdk.enabled=true`, `AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()`
+ returns a minimal (but not noop) `OpenTelemetrySdk`. The same minimal instance is set
+ to `GlobalOpenTelemetry`.
+* New "get or default" methods have been added to `ConfigProperties`.
+ E.g. `ConfigProperties#getString("otel.metrics.exporter", "otlp")` fetches the value for the
+ property `otel.metrics.exporter` and returns `otlp` if it is not set.
+* Fix bug in `ContainerResource` provider that caused it to throw an exception in some instances
+ when containerd is used.
+
+### Micrometer shim
+
+* Cache descriptions such that metrics with the same name use the first seen description.
+
## Version 1.14.0 (2022-05-09)
The metrics SDK is stable! New stable artifacts include:
@@ -234,7 +3727,7 @@ should not be many. Thanks for bearing with us on this.
### General
* Examples moved
- to [opentelemetry-java-docs](https://github.com/open-telemetry/opentelemetry-java-docs)
+ to [opentelemetry-java-examples](https://github.com/open-telemetry/opentelemetry-java-examples)
### SDK
@@ -444,7 +3937,7 @@ should not be many. Thanks for bearing with us on this.
This provides improved ergonomics and control around autoconfigure customization.
- Added experimental support for enabling OTLP retry support for the `grpc` exporters. If enabled
via `otel.experimental.exporter.otlp.retry.enabled`,
- a [default retry policy](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure#otlp-exporter-retry)
+ a [default retry policy](https://opentelemetry.io/docs/languages/java/configuration/#properties-exporters)
will be used.
- The metric export interval of `PeriodicMetricReader` is now configured
via `otel.metric.export.interval`. The existing `otel.imr.export.interval` property has been
@@ -1544,7 +5037,7 @@ See the `opentelemetry-extension-kotlin` module for details.
#### Breaking changes
-- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the [YAML Model for Semantic Conventions](https://github.com/open-telemetry/opentelemetry-specification/tree/master/semantic_conventions).
+- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the [YAML Model for Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/model/README.md#yaml-model-for-semantic-conventions).
- All API classes have been moved into the `io.opentelemetry.api.` prefix to support JPMS users.
- The API no longer uses the `grpc-context` as the context implementation. It now uses `io.opentelemetry.context.Context`. This is published in the `opentelemetry-context` artifact. Interactions with the context were mostly moved to static methods in the `Span` and `Baggage` interfaces.
- The Baggage API has been reworked to more closely match the specification. This includes the removal of the `BaggageManager`. Baggage is fully functional within the API, without needing to install an SDK.
@@ -1575,7 +5068,7 @@ See the `opentelemetry-extension-kotlin` module for details.
#### Breaking changes
-- `TraceConfig` configuration option names (environment variables and system properties) were renamed to match the OpenTelemetery Specification. For more information, see [TraceConfig](./QUICKSTART.md#TraceConfig).
+- `TraceConfig` configuration option names (environment variables and system properties) were renamed to match the OpenTelemetery Specification.
- The Jaeger gRPC exporter was updated to match the OpenTelemetry Specification. The `message` log entry attribute has been renamed to `event` and a new `dropped attributes count` attribute was added. For more information, see the [Overview](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md).
- The `SpanData.getHasRemoteParent()` and `SpanData.getHasEnded()` methods were renamed to `hasRemoteParent()` and `hasEnded()`, respectively.
- The `IdsGenerator` interface has been renamed to `IdGenerator`, and all implementations and relevant factory methods were similarly renamed.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 19a7580fc75..31a27583c30 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,222 +1,95 @@
# Contributing
-Welcome to OpenTelemetry Java repository!
+Welcome to the OpenTelemetry Java repository!
-Before you start - see OpenTelemetry general
-[contributing](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md)
+Before you start, see the OpenTelemetry general
+[contributing](https://github.com/open-telemetry/community/blob/main/guides/contributor/README.md)
requirements and recommendations.
-If you want to add new features or change behavior, please make sure your changes follow the
-[OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification).
-Otherwise file an issue or submit a PR to the specification repo first.
+## CLA and license
-Make sure to review the projects [license](LICENSE) and sign the
-[CNCF CLA](https://identity.linuxfoundation.org/projects/cncf). A signed CLA will be enforced by an
-automatic check once you submit a PR, but you can also sign it after opening your PR.
+Review the project [license](LICENSE) and sign the
+[CNCF CLA](https://identity.linuxfoundation.org/projects/cncf). A signed CLA will be enforced by
+an automatic check once you submit a PR, but you can also sign it after opening your PR.
-## Requirements
+## Build and coding patterns
-Java 11 or higher is required to build the projects in this repository. The built artifacts can be
-used on Java 8 or higher.
+See [docs/knowledge/README.md](docs/knowledge/README.md) for coding patterns, build conventions,
+testing guidance, and API stability rules. Build requirements and common commands are in
+[docs/knowledge/build.md](docs/knowledge/build.md).
-## Building opentelemetry-java
+## PR review
-Continuous integration builds the project, runs the tests, and runs multiple types of static
-analysis.
-
-1. Note: Currently, to run the full suite of tests, you'll need to be running a docker daemon. The
- tests that require docker are disabled if docker is not present. If you wish to run them, you
- must run a local docker daemon.
-
-2. Clone the repository
+After you submit a PR, it will be reviewed by the project maintainers and approvers. Not all
+maintainers need to review a particular PR, but merging to the base branch is authorized to
+restricted members (administrators).
- `git clone https://github.com/open-telemetry/opentelemetry-java.git`
+Contributors without an official project role are encouraged to review PRs. This is a
+useful signal for maintainers and is a requirement if you are interested in joining the project
+in an official capacity.
-3. Run the following commands to build, run tests and most static analysis, and check formatting:
+This repository sits at the base of a large ecosystem: widely deployed, a target for attackers,
+and sensitive to performance regressions. Expect a high level of scrutiny on API surface,
+security, performance, and maintainability, including on small changes. This reflects the
+project's position, not distrust of contributors. Back-and-forth during review is normal.
- `./gradlew build`
+### Draft PRs
-4. If you are a Windows user, use the alternate command mentioned below to run tests and check
- formatting:
+Draft PRs are welcome, especially when exploring new ideas or experimenting with a hypothesis.
+However, draft PRs may not receive the same degree of attention, feedback, or scrutiny unless
+requested directly. In order to help keep the PR backlog maintainable, drafts older than 6 months
+will be closed by the project maintainers. This should not be interpreted as a rejection. Closed
+PRs may be reopened by the author when time or interest allows.
- `gradlew.bat`
+### Test coverage
-## Checks
+CI reports a code coverage delta on every PR. The threshold is a signal for reviewer attention,
+not a merge gate. Above it, coverage is not something reviewers will dwell on. Below it,
+reviewers will look more closely at what is uncovered, and the outcome may be adding tests,
+agreeing that more coverage is impractical, or restructuring the code for testability. A red
+coverage check alone does not block a PR.
-Before submitting a PR, you should make sure the style checks and unit tests pass. You can run these
-with the `check` task.
+### Build failures
-```bash
-$ ./gradlew check
-```
+Transient CI failures happen on a build matrix of a size this project uses. A red check does not, by itself,
+affect how your PR is reviewed.
-Note: this gradle task will potentially generate changes to files in
-the `docs/apidiffs/current_vs_latest`
-directory. Please make sure to include any changes to these files in your pull request.
+* Failing across all Java versions and operating systems: likely a real issue in the change,
+ worth fixing before requesting review.
+* Only one or a handful of jobs failing: probably transient. Most required jobs cannot be
+ re-run by contributors, so a maintainer will re-run them, and these failures are not held
+ against the contribution.
+* If re-runs are slow, a friendly ping on the PR is welcome.
-## PR Review
+## Project scope
-After you submit a PR, it will be reviewed by the project maintainers and approvers. Not all
-maintainers need to review a particular PR, but merging to the base branch is authorized to
-restricted members (administrators).
+`opentelemetry-java` contains the core components upon which instrumentation and extensions are
+built. Its scope is limited to components which implement concepts defined in the
+[OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification). New
+features or behavior changes should follow the specification β if the specification doesn't cover
+your change, file an issue or submit a PR there first. Exceptions to strict spec alignment include:
-## Style guideline
+* The [API incubator](./api/incubator) and [SDK incubator](./sdk-extensions/incubator) contain
+ prototypes discussed in the specification or
+ [oteps](https://github.com/open-telemetry/oteps) with a reasonable chance of becoming part of
+ the specification, subject to maintainers' discretion.
+* Components like the [Kotlin Extension](./extensions/kotlin) are included when required for the
+ API / SDK to function in key areas of the Java ecosystem, subject to maintainers' discretion.
+* As a general rule, components which implement semantic conventions belong elsewhere.
-We follow the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html). Our
-build will fail if source code is not formatted according to that style. To fix any style failures
-the above [checks](#checks) show, automatically apply the formatting with:
+For an overview of the other repositories in the OpenTelemetry Java ecosystem, see
+[opentelemetry.io/docs/languages/java/intro/#repositories](https://opentelemetry.io/docs/languages/java/intro/#repositories).
-```bash
-$ ./gradlew spotlessApply
-```
+## Benchmarks
-To verify code style manually run the following command, which
-uses [google-java-format](https://github.com/google/google-java-format) library:
+JMH benchmark instructions live in [docs/knowledge/other-tasks.md#benchmarks-jmh](docs/knowledge/other-tasks.md#benchmarks-jmh).
+If you are submitting a performance-sensitive PR, include JMH output (number of threads,
+iterations, scores with error margins) so reviewers can evaluate the change.
-`./gradlew spotlessCheck`
-
-### Best practices that we follow
-
-* This project uses [semantic versioning](https://semver.org/). Except for major versions, a user
- should be able to update their dependency version on this project and have nothing break. This
- means we do not make breaking changes to the API (e.g., remove a public method) or to the ABI (
- e.g., change return type from void to non-void).
-* Avoid exposing publicly any class/method/variable that don't need to be public.
-* By default, all arguments/members are treated as non-null. Every argument/member that can
- be `null` must be annotated with `@Nullable`.
-* The project aims to provide a consistent experience across all the public APIs. It is important to
- ensure consistency (same look and feel) across different public packages.
-* Use `final` for public classes everywhere it is possible, this ensures that these classes cannot
- be extended when the API does not intend to offer that functionality.
-* In general, we use the following ordering of class members:
- * Static fields (final before non-final)
- * Instance fields (final before non-final)
- * Constructors
- * In static utility classes (where all members are static), the private constructor
- (used to prevent construction) should be ordered after methods instead of before methods.
- * Methods
- * If methods call each other, it's nice if the calling method is ordered (somewhere) above the
- method that it calls. So, for one example, a private method would be ordered (somewhere) below
- the non-private methods that use it.
- * Nested classes
-* Adding `toString()` overrides on classes is encouraged, but we only use `toString()` to provide
- debugging assistance. The implementations of all `toString()` methods should be considered to be
- unstable unless explicitly documented otherwise.
-
-If you notice any practice being applied in the project consistently that isn't listed here, please
-consider a pull request to add it.
-
-### Pre-commit hook
-
-To completely delegate code style formatting to the machine, you can
-add [git pre-commit hook](https://git-scm.com/docs/githooks). We provide an example script
-in `buildscripts/pre-commit` file. Just copy or symlink it into `.git/hooks` folder.
-
-### Editorconfig
-
-As additional convenience for IntelliJ Idea users, we provide `.editorconfig` file. Idea will
-automatically use it to adjust its code formatting settings. It does not support all required rules,
-so you still have to run `spotlessApply` from time to time.
-
-### Javadoc
-
-* All public classes and their public and protected methods MUST have javadoc. It MUST be complete (
- all params documented etc.) Everything else
- (package-protected classes, private) MAY have javadoc, at the code writer's whim. It does not have
- to be complete, and reviewers are not allowed to require or disallow it.
-* Each API element should have a `@since` tag specifying the minor version when it was released (or
- the next minor version).
-* There MUST be NO javadoc errors.
-*
-
-See [section 7.3.1](https://google.github.io/styleguide/javaguide.html#s7.3.1-javadoc-exception-self-explanatory)
-in the guide for exceptions to the Javadoc requirement.
-
-* Reviewers may request documentation for any element that doesn't require Javadoc, though the style
- of documentation is up to the author.
-* Try to do the least amount of change when modifying existing documentation. Don't change the style
- unless you have a good reason.
-* We do not use `@author` tags in our javadoc.
-* Our javadoc is available via [
- javadoc.io}(https://javadoc.io/doc/io.opentelemetry/opentelemetry-api)
-
-### AutoValue
-
-* Use [AutoValue](https://github.com/google/auto/tree/master/value), when possible, for any new
- value classes. Remember to add package-private constructors to all AutoValue classes to prevent
- classes in other packages from extending them.
-
-### Unit Tests
-
-* Unit tests target Java 8, so language features such as lambda and streams can be used in tests.
-
-## Specific tasks
-
-### Updating the Snapshot build number
-
-The overall version number for opentelemetry-java is determined from git tags, and not fixed in any
-file.
-
-This means it will not update, even if you `git pull` from the repo tip. It will still produce a set
-of libraries with the old version number.
-
-To update it, you must fetch the tags, via `git fetch --all --tags` - which should work, even if you
-have forked the repo, as long as the trunk repo is set as an upstream remote.
-
-### Composing builds
-
-Beware that this section is only meant for developers of opentelemetry-java, or closely related
-projects. The steps described here could change at any time and what you do for one version (commit)
-may break with the next one already.
-
-Gradle provides a feature
-called ["composite builds"](https://docs.gradle.org/current/userguide/composite_builds.html)
-that allows to replace some normally externally provided dependencies with a project that is built
-(included) in the same Gradle invocation. This can be useful to quickly test a new feature or bug
-fix you are developing in opentelemetry-java with the examples or the app or instrumentation library
-where you need the feature or run into the bug. Unfortunately, opentelemetry-java does not work out
-of the box with this feature because Gradle is unable to map the project names to the customized
-artifact coordinates (see e.g. [gradle/gradle#18291](https://github.com/gradle/gradle/issues/18291)
-and related issues. However, gradle supports manually declaring the mapping between ("substitution
-of")
-artifact coordinates and project names. To ease this tedious task, opentelemetry-java provides a
-gradle task `:generateBuildSubstitutions` that generates a code snippet with these substitutions in
-kts (Kotlin Script) format.
-
-Example usage could be as follows:
-
-1. Run `./gradlew generateBuildSubstitutions`
-2. Two files named `build/substitutions.gradle.kts` are generated in the bom and bom-alpha project's
- directory, containing substitutions for the stable and alpha projects respectively.
-3. Copy & paste the content of these files to a new `settings.gradle.kts` or the one where you want
- to include the opentelemetry build into, so that it contains something like the following:
-
- ```kotlin
- includeBuild("PATH/TO/OPENTELEMETRY-JAVA/ROOT/DIRECTORY") {
- // Copy & paste following block from the generated substitutions.gradle.kts, *not* from here!
- dependencySubstitution {
- substitute(module("io.opentelemetry:opentelemetry-api")).using(project(":api:all"))
- substitute(module("io.opentelemetry:opentelemetry-sdk")).using(project(":sdk:all"))
- // ...
- }
- }
- ```
+## User-facing documentation
- See [the Gradle documentation](https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions)
- for more information.
-
-4. If you now build your project, it will use the included build to supply the opentelemetry-java
- artifacts, ignoring any version declarations. Use the prefix `:DIRECTORY:` to refer to
- tasks/projects within the included build, where DIRECTORY is the name of the directory in the
- included build (only the part after the last `/`).
-
-### Updating the OTLP protobufs
-
-OTLP protobuf Java bindings are published via
-the [opentelemetry-proto-java](https://github.com/open-telemetry/opentelemetry-proto-java)
-repository. This project does not use the java bindings, but does use the `.proto` files that are
-published in the binding jar by that project.
-
-To update the OTLP protobuf version,
-first [release a new version of the java bindings](https://github.com/open-telemetry/opentelemetry-proto-java/blob/main/RELEASING.md)
-then simply update the dependency version that this project has on that jar.
+End-user documentation for the Java SDK lives at
+[opentelemetry.io/docs/languages/java/](https://opentelemetry.io/docs/languages/java/), with
+source in [github.com/open-telemetry/opentelemetry.io](https://github.com/open-telemetry/opentelemetry.io).
+If your change affects user-visible behavior β configuration options, new features, changed
+defaults β please update or open an issue against the documentation there.
diff --git a/README.md b/README.md
index 5784b9619b5..4d1b5c244f3 100644
--- a/README.md
+++ b/README.md
@@ -1,333 +1,321 @@
-# OpenTelemetry for Java
-[![Continuous Build][ci-image]][ci-url]
+# OpenTelemetry Java
+
+[](https://github.com/open-telemetry/opentelemetry-java/releases/)
[![Coverage Status][codecov-image]][codecov-url]
-[![Maven Central][maven-image]][maven-url]
+[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-java?ref=badge_shield&issueType=license)
+[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-java?ref=badge_shield&issueType=security)
+[](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-java)
+[](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/io/opentelemetry/java/README.md)
-## Getting Started
+`opentelemetry-java` is the home of the Java implementation of the OpenTelemetry API for recording
+telemetry, and SDK for managing telemetry recorded by the API.
-If you are looking for an all-in-one, easy-to-install **auto-instrumentation
-javaagent**, see [opentelemetry-java-instrumentation][].
+See [opentelemetry.io Java Documentation](https://opentelemetry.io/docs/languages/java/intro/) for:
-If you are looking for **examples** on how to use the OpenTelemetry API to
-write your own **manual instrumentation**, or how to set up the OpenTelemetry
-Java SDK, see [Manual instrumentation][]. Fully-functional examples
-are available in [opentelemetry-java-docs][].
+* An overview of the OpenTelemetry Java ecosystem and key repositories
+* Detailed documentation on the components published from this repository
+* Review of instrumentation ecosystem, including OpenTelemetry Java agent
+* End-to-end working code examples
+* And more
-For a general overview of OpenTelemetry, visit [opentelemetry.io][].
+> [!IMPORTANT]
+> We are currently seeking additional contributors! See [help wanted](#help-wanted) for details.
-Would you like to get involved with the project? Read our [contributing guide](CONTRIBUTING.md). We welcome
-contributions!
+## Requirements
-## Contacting us
+Unless otherwise noted, all published artifacts support Java 8 or higher.
+See [language version compatibility](VERSIONING.md#language-version-compatibility) for complete
+details.
-We hold regular meetings. See details at [community page](https://github.com/open-telemetry/community#java-sdk).
+**Android Disclaimer:** For compatibility
+reasons, [library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring)
+must be enabled.
-We use [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-java/discussions)
-for support or general questions. Feel free to drop us a line.
+See [contributing](#contributing) for details on building this project locally.
-We are also present in the `#otel-java` channel in the [CNCF slack](https://slack.cncf.io/).
-Please join us for more informal discussions.
+## Releases
-## Overview
+Releases are published to maven central. We
+publish [minor releases monthly](RELEASING.md#release-cadence)
+and [patch releases as needed](RELEASING.md#preparing-a-new-patch-release).
+
+See [releases](https://github.com/open-telemetry/opentelemetry-java/releases) for a listing of
+released versions and notes (see also [changelog](CHANGELOG.md)).
+
+## Artifacts
+
+The artifacts published by this repository are summarized below in tables, organized in collapsible
+sections by topic.
+
+As discussed in [compatibility](#compatibility), artifact versions must be kept in sync, for which
+we strongly recommend [using one of our BOMs][dependencies-and-boms].
+
+
+ Bill of Materials (BOMs)
-OpenTelemetry is the merging of OpenCensus and OpenTracing into a single project.
+A bill of materials (or BOM) helps sync dependency versions of related artifacts.
-This project contains the following top level components:
+| Component | Description | Artifact ID | Version | Javadoc |
+|----------------------------------------------|----------------------------------------|---------------------------|-------------------------------------------------------------|---------|
+| [Bill of Materials (BOM)](./bom) | Bill of materials for stable artifacts | `opentelemetry-bom` | 1.68.0 | N/A |
+| [Alpha Bill of Materials (BOM)](./bom-alpha) | Bill of materials for alpha artifacts | `opentelemetry-bom-alpha` | 1.68.0-alpha | N/A |
+
-* [OpenTelemetry API](api/):
- * [stable apis](api/all/src/main/java/io/opentelemetry/api/) including `Tracer`, `Span`, `SpanContext`, `Meter`, and `Baggage`
- * [semantic conventions](semconv/) Generated code for the OpenTelemetry semantic conventions.
- * [context api](context/src/main/java/io/opentelemetry/context/) The OpenTelemetry Context implementation.
-* [extensions](extensions/) define additional API extensions, which are not part of the core API.
-* [sdk](sdk/) defines the implementation of the OpenTelemetry API.
-* [sdk-extensions](sdk-extensions/) defines additional SDK extensions, which are not part of the core SDK.
-* [OpenTracing shim](opentracing-shim/) defines a bridge layer from OpenTracing to the OpenTelemetry API.
-* [OpenCensus shim](opencensus-shim/) defines a bridge layer from OpenCensus to the OpenTelemetry API.
-* [Micrometer shim](micrometer1-shim/) defines a bridge layer from Micrometer to the OpenTelemetry API.
+
+ API
-This project publishes a lot of artifacts, listed in [releases](#releases).
-[`opentelemetry-bom`](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-bom) (BOM =
-Bill of Materials) is provided to assist with synchronizing versions of
-dependencies. [`opentelemetry-bom-alpha`](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-bom-alpha)
-provides the same function for unstable artifacts. See [published releases](#published-releases) for
-instructions on using the BOMs.
+The OpenTelemetry API for recording telemetry.
-We would love to hear from the larger community: please provide feedback proactively.
+| Component | Description | Artifact ID | Version | Javadoc |
+|-----------------------------------|--------------------------------------------------------------------------------------|-------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [API](./api/all) | OpenTelemetry API, including metrics, traces, baggage, context | `opentelemetry-api` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api) |
+| [API Incubator](./api/incubator) | API incubator, including pass through propagator and extended tracer | `opentelemetry-api-incubator` | 1.68.0-alpha | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api-incubator) |
+| [Context API](./context) | OpenTelemetry context API | `opentelemetry-context` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-context) |
+| [Common](./common) | Common utility methods used across API components | `opentelemetry-common` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-common) |
+
-## Requirements
+
+ API Extensions
-Unless otherwise noted, all published artifacts support Java 8 or higher.
+Extensions to the OpenTelemetry API.
-**Android Disclaimer:** For compatibility reasons, [library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) must be enabled.
+| Component | Description | Artifact ID | Version | Javadoc |
+|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [Kotlin Extension](./extensions/kotlin) | Context extension for coroutines | `opentelemetry-extension-kotlin` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-extension-kotlin) |
+| [Trace Propagators Extension](./extensions/trace-propagators) | Trace propagators, including B3, Jaeger, OT Trace | `opentelemetry-extension-trace-propagators` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-extension-trace-propagators) |
+
-See [CONTRIBUTING.md](./CONTRIBUTING.md) for additional instructions for building this project for development.
+
+ SDK
-### Note about extensions
+The OpenTelemetry SDK for managing telemetry producing by the API.
-Both API and SDK extensions consist of various additional components which are excluded from the core artifacts
-to keep them from growing too large.
+| Component | Description | Artifact ID | Version | Javadoc |
+|------------------------------|--------------------------------------------------------|-----------------------------|---------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [SDK](./sdk/all) | OpenTelemetry SDK, including metrics, traces, and logs | `opentelemetry-sdk` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk) |
+| [Metrics SDK](./sdk/metrics) | OpenTelemetry metrics SDK | `opentelemetry-sdk-metrics` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-metrics) |
+| [Trace SDK](./sdk/trace) | OpenTelemetry trace SDK | `opentelemetry-sdk-trace` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-trace) |
+| [Log SDK](./sdk/logs) | OpenTelemetry log SDK | `opentelemetry-sdk-logs` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-logs) |
+| [Profiles SDK](./sdk/profiles) | OpenTelemetry profiles SDK | `opentelemetry-sdk-profiles` | 1.68.0-alpha | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-profiles) |
+| [SDK Common](./sdk/common) | Shared SDK components | `opentelemetry-sdk-common` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-common) |
+| [SDK Testing](./sdk/testing) | Components for testing OpenTelemetry instrumentation | `opentelemetry-sdk-testing` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-testing) |
+
-We still aim to provide the same level of quality and guarantee for them as for the core components.
-Please don't hesitate to use them if you find them useful.
+
+ SDK Exporters
-## Project setup and contributing
+SDK exporters for shipping traces, metrics, and logs out of process.
-Please refer to the [contribution guide](CONTRIBUTING.md) on how to set up for development and contribute!
+| Component | Description | Artifact ID | Version | Javadoc |
+|-----------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [OTLP Exporters](./exporters/otlp/all) | OTLP gRPC & HTTP exporters, including traces, metrics, and logs | `opentelemetry-exporter-otlp` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp) |
+| [OTLP Profiles Exporter](./exporters/otlp/profiles) | OTLP profiles exporter | `opentelemetry-exporter-otlp-profiles` | 1.68.0-alpha | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp-profiles) |
+| [OTLP Logging Exporters](./exporters/logging-otlp) | Logging exporters in OTLP JSON encoding, including traces, metrics, and logs | `opentelemetry-exporter-logging-otlp` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging-otlp) |
+| [OTLP Common](./exporters/otlp/common) | Shared OTLP components (internal) | `opentelemetry-exporter-otlp-common` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp-common) |
+| [Logging Exporter](./exporters/logging) | Logging exporters, including metrics, traces, and logs | `opentelemetry-exporter-logging` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging) |
+| [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | 1.68.0-alpha | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-prometheus) |
+| [Exporter Common](./exporters/common) | Shared exporter components (internal) | `opentelemetry-exporter-common` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-common) |
+| [OkHttp Sender](./exporters/sender/okhttp) | OkHttp implementation of HttpSender (internal) | `opentelemetry-exporter-sender-okhttp` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-okhttp) |
+| [JDK Sender](./exporters/sender/jdk) | Java 11+ native HttpClient implementation of HttpSender (internal) | `opentelemetry-exporter-sender-jdk` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-jdk) | |
+| [gRPC ManagedChannel Sender](./exporters/sender/grpc-managed-channel) | gRPC ManagedChannel implementation of GrpcSender (internal) | `opentelemetry-exporter-sender-grpc-managed-channel` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-grpc-managed-channel) | |
+
-## Published Releases
+
+ SDK Extensions
-Published releases are available on maven central. We strongly recommend using our published BOM to keep all
-dependency versions in sync.
+Extensions to the OpenTelemetry SDK.
-### Maven
+| Component | Description | Artifact ID | Version | Javadoc |
+|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [SDK Autoconfigure](./sdk-extensions/autoconfigure) | Autoconfigure OpenTelemetry SDK from env vars, system properties, and SPI | `opentelemetry-sdk-extension-autoconfigure` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure) |
+| [SDK Autoconfigure SPI](./sdk-extensions/autoconfigure-spi) | Service Provider Interface (SPI) definitions for autoconfigure | `opentelemetry-sdk-extension-autoconfigure-spi` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi) |
+| [SDK Declarative Config](./sdk-extensions/declarative-config) | Declarative config implementation for YAML-based SDK configuration | `opentelemetry-sdk-extension-declarative-config` | 1.68.0-alpha | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-declarative-config) |
+| [SDK Declarative Config Jackson 2 Mapper](./sdk-extensions/declarative-config-jackson2) | Jackson 2 model mapper for declarative config | `opentelemetry-sdk-extension-declarative-config-jackson2` | TODO | TODO |
+| [SDK Declarative Config SnakeYAML Engine 2 Parser](./sdk-extensions/declarative-config-snakeyaml-engine2) | SnakeYAML Engine 2 YAML parser for declarative config | `opentelemetry-sdk-extension-declarative-config-snakeyaml-engine2` | TODO | TODO |
+| [SDK Jaeger Remote Sampler Extension](./sdk-extensions/jaeger-remote-sampler) | Sampler which obtains sampling configuration from remote Jaeger server | `opentelemetry-sdk-extension-jaeger-remote-sampler` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-jaeger-remote-sampler) |
+| [SDK Incubator](./sdk-extensions/incubator) | SDK incubator, including YAML based view configuration, LeakDetectingSpanProcessor | `opentelemetry-sdk-extension-incubator` | 1.68.0-alpha | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-incubator) |
+
-```xml
-
-
-
-
- io.opentelemetry
- opentelemetry-bom
- 1.14.0
- pom
- import
-
-
-
-
-
- io.opentelemetry
- opentelemetry-api
-
-
-
-```
+
+ Shims
-### Gradle
+Shims for bridging data from one observability library to another.
+
+| Component | Description | Artifact ID | Version | Javadoc |
+|----------------------------------------|--------------------------------------------------------------|----------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [OpenCensus Shim](./opencensus-shim) | **DEPRECATED** Bridge opencensus metrics into the OpenTelemetry metrics SDK | `opentelemetry-opencensus-shim` | 1.68.0-alpha | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-opencensus-shim) |
+| [OpenTracing Shim](./opentracing-shim) | **DEPRECATED** Bridge opentracing spans into the OpenTelemetry trace API | `opentelemetry-opentracing-shim` | 1.68.0 | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-opentracing-shim) |
+
+
+### Verifying Artifacts
+
+All artifacts published to Maven Central are signed with GPG key [`17A27CE7A60FF5F0`](https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x17A27CE7A60FF5F0) (fingerprint: `3F05 DDA9 F317 301E 9271 36D4 17A2 7CE7 A60F F5F0`).
+
+## Dependencies
+
+To take a dependency, [include a BOM][dependencies-and-boms] and specify the dependency as follows,
+replacing `{{artifact-id}}` with the value from the "Artifact ID" column
+from [artifacts](#artifacts):
+
+
+ Gradle
```groovy
-dependencies {
- implementation platform("io.opentelemetry:opentelemetry-bom:1.14.0")
- implementation('io.opentelemetry:opentelemetry-api')
-}
+ implementation('io.opentelemetry:{{artifact-id}}')
```
+
-Note that if you want to use any artifacts that have not fully stabilized yet (such as metrics), then you will need to add an entry for the Alpha BOM as well, e.g.
+
+ Maven
+
+```xml
+
+ io.opentelemetry
+ {{artifact-id}}
+
+```
+
+
+### Snapshots
+
+Snapshots of the `main` branch are available as follows:
+
+
+ Gradle
```groovy
-dependencies {
- implementation platform("io.opentelemetry:opentelemetry-bom:1.14.0")
- implementation platform('io.opentelemetry:opentelemetry-bom-alpha:1.14.0-alpha')
+repositories {
+ maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }
+}
+dependencies {
+ implementation platform("io.opentelemetry:opentelemetry-bom:1.69.0-SNAPSHOT")
implementation('io.opentelemetry:opentelemetry-api')
- implementation('io.opentelemetry:opentelemetry-api-metrics')
}
```
+
-## Snapshots
-
-Snapshots based out the `main` branch are available for `opentelemetry-api`, `opentelemetry-sdk` and the rest of the artifacts.
-We strongly recommend using our published BOM to keep all dependency versions in sync.
-
-### Maven
+
+ Maven
```xml
-
-
-
- oss.sonatype.org-snapshot
- https://oss.sonatype.org/content/repositories/snapshots
-
-
-
+
+
+
+ sonatype-snapshot-repository
+ https://central.sonatype.com/repository/maven-snapshots/
+
+
+
+
+
+ io.opentelemetry
+ opentelemetry-bom
+ 1.69.0-SNAPSHOT
+ pom
+ import
+
+
+ io.opentelemetry
- opentelemetry-bom
- 1.15.0-SNAPSHOT
- pom
- import
+ opentelemetry-api
-
-
-
- io.opentelemetry
- opentelemetry-api
-
-
-
+
```
+
-### Gradle
+## Compatibility
-```groovy
-repositories {
- maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
-}
+Artifacts from this repository follow semantic versioning.
-dependencies {
- implementation platform("io.opentelemetry:opentelemetry-bom:1.15.0-SNAPSHOT")
- implementation('io.opentelemetry:opentelemetry-api')
-}
-```
+Stable artifacts (i.e. artifacts without `-alpha` version suffix) come with strong backwards
+compatibility guarantees for public APIs.
+
+Artifacts may depend on other artifacts from this repository, and may depend on internal APIs (i.e.
+non-public APIs) which are subject to change across minor versions. Therefore, it's critical to keep
+artifact versions in sync in order to avoid possible runtime exceptions. We strongly
+recommend [using one of our BOMs][dependencies-and-boms] to assist in keeping artifacts in sync.
-Libraries will usually only need `opentelemetry-api`, while applications
-will want to use the `opentelemetry-sdk` module which contains our standard implementation
-of the APIs.
+See the [VERSIONING.md](VERSIONING.md) for complete details on compatibility policy.
-## Gradle composite builds
+## Contacting us
-For opentelemetry-java developers that need to test the latest source code with another
-project, composite builds can be used as an alternative to `publishToMavenLocal`. This
-requires some setup which is explained [here](CONTRIBUTING.md#composing-builds).
+We hold regular meetings. See details at [community page](https://github.com/open-telemetry/community#implementation-sigs).
-## Releases
+The meeting is open for all to join. We invite everyone to join our meeting,
+regardless of your experience level. Whether you're a seasoned OpenTelemetry
+developer, just starting your journey, or simply curious about the work we do,
+you're more than welcome to participate!
+
+To report a bug, or request a new feature,
+please [open an issue](https://github.com/open-telemetry/opentelemetry-java/issues/new/choose).
+
+We use [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-java/discussions)
+for support or general questions. Feel free to drop us a line.
-See the [VERSIONING.md](VERSIONING.md) document for our policies for releases and compatibility
-guarantees.
+We are also present in the [`#otel-java`](https://cloud-native.slack.com/archives/C014L2KCTE3) channel in the [CNCF slack](https://slack.cncf.io/).
+Please join us for more informal discussions.
-Check out information about the [latest release](https://github.com/open-telemetry/opentelemetry-java/releases).
+## Contributing
-See the project [milestones](https://github.com/open-telemetry/opentelemetry-java/milestones)
-for details on upcoming releases. The dates and features described in issues
-and milestones are estimates, and subject to change.
+See [CONTRIBUTING.md](CONTRIBUTING.md) for:
-The following tables describe the artifacts published by this project. To take a dependency, follow
-the instructions in [Published Released](#published-releases) to include the BOM, and specify the
-dependency as follows, replacing `{{artifact-id}}` with the value from the "Artifact ID" column:
+* Details on building locally
+* Project scope
+* Keys to successful PRs
+* Guide to using gradle composite builds
-```xml
-
- io.opentelemetry
- {{artifact-id}}
-
-```
+### Maintainers
-```groovy
- implementation('io.opentelemetry:{{artifact-id}}')
-```
+- [Jack Berg](https://github.com/jack-berg), Grafana Labs
+- [John Watson](https://github.com/jkwatson), Sublime Security
-### Bill of Material
-
-| Component | Description | Artifact ID | Version |
-|----------------------------------------------|----------------------------------------|---------------------------|-------------------------------------------------------------|
-| [Bill of Materials (BOM)](./bom) | Bill of materials for stable artifacts | `opentelemetry-bom` | 1.14.0 |
-| [Alpha Bill of Materials (BOM)](./bom-alpha) | Bill of materials for alpha artifacts | `opentelemetry-bom-alpha` | 1.14.0-alpha |
-
-### API
-
-| Component | Description | Artifact ID | Version |
-|-----------------------------------|----------------------------------------------------------------|-------------------------|-------------------------------------------------------------|
-| [API](./api/all) | OpenTelemetry API, including metrics, traces, baggage, context | `opentelemetry-api` | 1.14.0 |
-| [Context API](./context) | OpenTelemetry context API | `opentelemetry-context` | 1.14.0 |
-| [Semantic Conventions](./semconv) | Generated code for OpenTelemetry semantic conventions | `opentelemetry-semconv` | 1.14.0-alpha |
-
-### API Extensions
-
-| Component | Description | Artifact ID | Version |
-|---------------------------------------------------------------|--------------------------------------------------------------------------------|---------------------------------------------|-------------------------------------------------------------|
-| [Annotations Extension](./extensions/annotations) | Instrumentation annotations, used in conjunction with OpenTelemetry java agent | `opentelemetry-extension-annotations` | 1.14.0 |
-| [AWS Extension](./extensions/aws) | AWS Xray propagator | `opentelemetry-extension-aws` | 1.14.0 |
-| [Kotlin Extension](./extensions/kotlin) | Context extension for coroutines | `opentelemetry-extension-kotlin` | 1.14.0 |
-| [Trace Propagators Extension](./extensions/trace-propagators) | Trace propagators, including B3, Jaeger, OT Trace | `opentelemetry-extension-trace-propagators` | 1.14.0 |
-| [Incubator Extension](./extensions/incubator) | API incubator, including pass through propagator, and extended tracer | `opentelemetry-extension-incubator` | 1.14.0-alpha |
-| [Noop API Extension](./extensions/noop-api) | A noop OpenTelemetry implementation which ignores context | `opentelemetry-extension-noop-api` | 1.14.0-alpha |
-
-### SDK
-
-| Component | Description | Artifact ID | Version |
-|----------------------------------------|--------------------------------------------------------|----------------------------------|-------------------------------------------------------------|
-| [SDK](./sdk/all) | OpenTelemetry SDK, including metrics, traces, and logs | `opentelemetry-sdk` | 1.14.0 |
-| [Metrics SDK](./sdk/metrics) | OpenTelemetry metrics SDK | `opentelemetry-sdk-metrics` | 1.14.0 |
-| [Trace SDK](./sdk/trace) | OpenTelemetry trace SDK | `opentelemetry-sdk-trace` | 1.14.0 |
-| [Log SDK](./sdk/logs) | OpenTelemetry log SDK | `opentelemetry-sdk-logs` | 1.14.0-alpha |
-| [SDK Common](./sdk/common) | Shared SDK components | `opentelemetry-sdk-common` | 1.14.0 |
-| [SDK Testing](./sdk/testing) | Components for testing OpenTelemetry instrumentation | `opentelemetry-sdk-testing` | 1.14.0 |
-| [SDK Logs Testing](./sdk/logs-testing) | Components for testing OpenTelemetry logs | `opentelemetry-sdk-logs-testing` | 1.14.0-alpha |
-
-### SDK Exporters
-
-| Component | Description | Artifact ID | Version |
-|-------------------------------------------------------------|-------------------------------------------------------------------------------------|--------------------------------------------|-------------------------------------------------------------|
-| [OTLP gRPC Exporter](./exporters/otlp/all) | OTLP gRPC exporters, including metrics and trace | `opentelemetry-exporter-otlp` | 1.14.0 |
-| [OTLP gRPC Trace Exporter](./exporters/otlp/trace) | OTLP gRPC trace exporter | `opentelemetry-exporter-otlp-trace` | 1.14.0 |
-| [OTLP gRPC Metrics Exporter](./exporters/otlp/metrics) | OTLP gRPC metrics exporter | `opentelemetry-exporter-otlp-metrics` | 1.14.0 |
-| [OTLP gRPC Logs Exporter](./exporters/otlp/logs) | OTLP gRPC log exporter | `opentelemetry-exporter-otlp-logs` | 1.14.0-alpha |
-| [OTLP HTTP Trace Exporter](./exporters/otlp-http/trace) | OTLP http/protobuf trace exporter | `opentelemetry-exporter-otlp-http-trace` | 1.14.0 |
-| [OTLP HTTP Metrics Exporter](./exporters/otlp-http/metrics) | OTLP http/protobuf metrics exporter | `opentelemetry-exporter-otlp-http-metrics` | 1.14.0 |
-| [OTLP HTTP Logs Exporter](./exporters/otlp-http/logs) | OTLP http/protobuf logs exporter | `opentelemetry-exporter-otlp-http-logs` | 1.14.0-alpha |
-| [OTLP Common](./exporters/otlp/common) | Shared OTLP components (internal) | `opentelemetry-exporter-otlp-common` | 1.14.0 |
-| [Jaeger gRPC Exporter](./exporters/jaeger) | Jaeger gRPC trace exporter | `opentelemetry-exporter-jaeger` | 1.14.0 |
-| [Jaeger Thrift Exporter](./exporters/jaeger-thrift) | Jaeger thrift trace exporter | `opentelemetry-exporter-jaeger-thift` | 1.14.0 |
-| [Jaeger Proto](./exporters/jaeger-proto) | Jaeger gRPC protobuf definitions (internal) | `opentelemetry-exporter-jaeger-proto` | 1.14.0 |
-| [Logging Exporter](./exporters/logging) | Logging exporters, includings metrics, traces, and logs | `opentelemetry-exporter-logging` | 1.14.0 |
-| [OTLP Logging Exporter](./exporters/logging-otlp) | Logging exporters in OTLP protobuf JSON format, including metrics, traces, and logs | `opentelemetry-exporter-logging-otlp` | 1.14.0 |
-| [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | 1.14.0 |
-| [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | 1.14.0-alpha |
-
-### SDK Extensions
-
-| Component | Description | Artifact ID | Version |
-|-------------------------------------------------------------------------------|---------------------------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------|
-| [SDK Autoconfigure Extension](./sdk-extensions/autoconfigure) | Autoconfigure OpenTelemetry SDK from env vars, system properties, and SPI | `opentelemetry-sdk-extension-autoconfigure` | 1.14.0-alpha |
-| [SDK Autoconfigure SPI](./sdk-extensions/autoconfigure-spi) | Service Provider Interface (SPI) definitions for autoconfigure | `opentelemetry-sdk-extension-autoconfigure-spi` | 1.14.0 |
-| [SDK Resources Extension](./sdk-extensions/resources) | Resource providers, including container, host, os, and process | `opentelemetry-sdk-extension-resources` | 1.14.0 |
-| [SDK AWS Extension](./sdk-extensions/aws) | AWS resource providers, including beanstalk, ec2, ecs, eks, and lambda | `opentelemetry-sdk-extension-aws` | 1.14.0 |
-| [SDK Jaeger Remote Sampler Extension](./sdk-extensions/jaeger-remote-sampler) | Sampler which obtains sampling configuration from remote Jaeger server | `opentelemetry-sdk-extension-jaeger-remote-sampler` | 1.14.0 |
-| [SDK JFR Events Extension](./sdk-extensions/jfr-events) | SpanProcessor which records spans as JFR events | `opentelemetry-sdk-extension-jfr-events` | 1.14.0-alpha |
-| [SDK Metric Incubator Extension](./sdk-extensions/metric-incubator) | Metrics incubator, including YAML based view configuration | `opentelemetry-sdk-extension-metric-incubator` | 1.14.0-alpha |
-| [SDK Tracing Incubator Extension](./sdk-extensions/tracing-incubator) | Trace incubator, including leak detecting SpanProcessor | `opentelemetry-sdk-extension-tracing-incubator` | 1.14.0-alpha |
-| [SDK zPages Extension](./sdk-extensions/zpages) | SpanProcessor which exposes spans with zPages | `opentelemetry-sdk-extension-zpages` | 1.14.0-alpha |
-
-### Shims
-
-| Component | Description | Artifact ID | Version |
-|----------------------------------------|--------------------------------------------------------------|----------------------------------|-------------------------------------------------------------|
-| [Micrometer Shim](./micrometer1-shim) | Bridge micrometer metrics into the OpenTelemetry metrics API | `opentelemetry-micrometer1-shim` | 1.14.0-alpha |
-| [OpenCensus Shim](./opencensus-shim) | Bridge opencensus metrics into the OpenTelemetry metrics SDK | `opentelemetry-opencensus-shim` | 1.14.0-alpha |
-| [OpenTracing Shim](./opentracing-shim) | Bridge opentracing spans into the OpenTelemetry trace API | `opentelemetry-opentracing-shim` | 1.14.0-alpha |
+For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
-## Contributing
+### Approvers
+
+- [Gregor Zeitlinger](https://github.com/zeitlinger), Grafana Labs
+- [Jason Plumb](https://github.com/breedx-splk), Splunk
+- [Jay DeLuca](https://github.com/jaydeluca), Grafana Labs
+- [Lauri Tulmin](https://github.com/laurit), Splunk
+- [Pranav Sharma](https://github.com/psx95), Google
+- [Trask Stalnaker](https://github.com/trask), Microsoft
-See [CONTRIBUTING.md](CONTRIBUTING.md)
+For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
-Approvers ([@open-telemetry/java-approvers](https://github.com/orgs/open-telemetry/teams/java-approvers)):
+### Triagers
-- [Christian NeumΓΌller](https://github.com/Oberon00), Dynatrace
-- [Jakub Wach](https://github.com/kubawach), Splunk
-- [Josh Suereth](https://github.com/jsuereth), Google
+None.
-*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*
+For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
-Maintainers ([@open-telemetry/java-maintainers](https://github.com/orgs/open-telemetry/teams/java-maintainers)):
+### Emeritus
-- [Anuraag Agrawal](https://github.com/anuraaga), AWS
-- [Jack Berg](https://github.com/jack-berg), New Relic
-- [John Watson](https://github.com/jkwatson), Splunk
+- [Bogdan Drutu](https://github.com/BogdanDrutu), Maintainer
+- [Carlos Alberto](https://github.com/carlosalberto), Maintainer
+- [Josh Suereth](https://github.com/jsuereth), Approver
+- [Mateusz Rzeszutek](https://github.com/mateuszrzeszutek), Approver
-Maintainers Emeritus:
+For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
-- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk
-- [Carlos Alberto](https://github.com/carlosalberto), LightStep
+### Help wanted
-*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*
+We are currently resource constrained and are actively seeking new contributors interested in working towards [approver](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver) / [maintainer](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer) roles. In addition to the documentation for approver / maintainer roles and the [contributing](./CONTRIBUTING.md) guide, here are some additional notes on engaging:
-### Thanks to all the people who have contributed
+- [Pull request](https://github.com/open-telemetry/opentelemetry-java/pulls) reviews are equally or more helpful than code contributions. Comments and approvals are valuable with or without a formal project role. They're also a great forcing function to explore a fairly complex codebase.
+- Attending the [Java: SDK + Automatic Instrumentation](https://github.com/open-telemetry/community?tab=readme-ov-file#implementation-sigs) Special Interest Group (SIG) is a great way to get to know community members and learn about project priorities.
+- Issues labeled [help wanted](https://github.com/open-telemetry/opentelemetry-java/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) are project priorities. Code contributions (or pull request reviews when a PR is linked) for these issues are particularly important.
+- Triaging / responding to new issues and discussions is a great way to engage with the project.
+
+### Thanks to all of our contributors!
-
+
-Made with [contrib.rocks](https://contrib.rocks).
-
-[ci-image]: https://github.com/open-telemetry/opentelemetry-java/workflows/Continuous%20Build/badge.svg
-[ci-url]: https://github.com/open-telemetry/opentelemetry-java/actions?query=workflow%3Aci+branch%3Amain
[codecov-image]: https://codecov.io/gh/open-telemetry/opentelemetry-java/branch/main/graph/badge.svg
-[codecov-url]: https://codecov.io/gh/open-telemetry/opentelemetry-java/branch/main/
-[Manual instrumentation]: https://opentelemetry.io/docs/java/manual_instrumentation/
-[maven-image]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry/opentelemetry-api/badge.svg
-[maven-url]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry/opentelemetry-api
-[opentelemetry-java-instrumentation]: https://github.com/open-telemetry/opentelemetry-java-instrumentation
-[opentelemetry-java-docs]: https://github.com/open-telemetry/opentelemetry-java-docs
-[opentelemetry.io]: https://opentelemetry.io
+[codecov-url]: https://app.codecov.io/gh/open-telemetry/opentelemetry-java/branch/main/
+[dependencies-and-boms]: https://opentelemetry.io/docs/languages/java/intro/#dependencies-and-boms
diff --git a/RELEASING.md b/RELEASING.md
index 6e2e0931dcd..bb93f4a7e46 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -1,29 +1,38 @@
# OpenTelemetry Release Process
-Before releasing, it is a good idea to run `./gradlew japicmp` on the main branch
-and verify that there are no unexpected public API changes seen in the `docs/apidiffs/current_vs_latest`
-directory.
+Before releasing, it is a good idea to run `./gradlew japicmp` on the main branch and verify that
+there are no unexpected public API changes seen in the `docs/apidiffs/current_vs_latest`
+directory. Additionally, ensure that appropriate `@since` annotations are added to any additions to
+the public APIs.
When preparing the change log, you can use
-`git log upstream/v$MAJOR.$((MINOR-1)).x..upstream/v$MAJOR.$MINOR.x --graph --first-parent`
-or the Github [compare tool](https://github.com/open-telemetry/opentelemetry-java/compare/)
-to view a summary of all commits since last release as a reference.
+the [draft-change-log-entries.sh](./.github/scripts/draft-change-log-entries.sh) script to assist
+with drafting. Alternatively,
+use `git log upstream/v$MAJOR.$((MINOR-1)).x..upstream/v$MAJOR.$MINOR.x --graph --first-parent` or
+the Github [compare tool](https://github.com/open-telemetry/opentelemetry-java/compare/) to view a
+summary of all commits since last release as a reference.
+
+## Release cadence
+
+This repository roughly targets monthly minor releases from the `main` branch on the Friday after
+the first Monday of the month.
## Preparing a new major or minor release
* Close the release milestone if there is one.
* Merge a pull request to `main` updating the `CHANGELOG.md`.
- * The heading for the release should include the release version but not the release date, e.g.
- `## Version 1.9.0 (Unreleased)`.
+ * The heading for the unreleased entries should be `## Unreleased`.
* Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/prepare-release-branch.yml).
-* Review and merge the two pull requests that it creates
- (one is targeted to the release branch and one is targeted to the `main` branch).
+ * Press the "Run workflow" button, and leave the default branch `main` selected.
+ * Review and merge the two pull requests that it creates
+ (one is targeted to the release branch and one is targeted to `main`).
## Preparing a new patch release
All patch releases should include only bug-fixes, and must avoid adding/modifying the public APIs.
-In general, patch releases are only made for regressions, memory leaks and deadlocks.
+In general, patch releases are only made for regressions, security vulnerabilities, memory leaks
+and deadlocks.
* Backport pull request(s) to the release branch.
* Run the [Backport workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/backport.yml).
@@ -32,67 +41,57 @@ In general, patch releases are only made for regressions, memory leaks and deadl
then click the "Run workflow" button below that.
* Review and merge the backport pull request that it generates.
* Merge a pull request to the release branch updating the `CHANGELOG.md`.
- * The heading for the release should include the release version but not the release date, e.g.
- `## Version 1.9.1 (Unreleased)`.
+ * The heading for the unreleased entries should be `## Unreleased`.
* Run the [Prepare patch release workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/prepare-patch-release.yml).
* Press the "Run workflow" button, then select the release branch from the dropdown list,
e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
-* Review and merge the pull request that it creates.
+ * Review and merge the pull request that it creates for updating the version.
## Making the release
-Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/release.yml).
-
-* Press the "Run workflow" button, then select the release branch from the dropdown list,
- e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
-* This workflow will publish the artifacts to maven central and will publish a GitHub release
- with release notes based on the change log.
-* Review and merge the pull request that the release workflow creates against the release branch
- which adds the release date to the change log.
-
-## After the release
-
-Run the [Merge change log to main workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/merge-change-log-to-main.yml).
-
-* Press the "Run workflow" button, then select the release branch from the dropdown list,
- e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
-* This will create a pull request that merges the change log updates from the release branch
- back to main.
-* Review and merge the pull request that it creates.
-* This workflow will fail if there have been conflicting change log updates introduced in main,
- in which case you will need to merge the change log updates manually and send your own pull
- request against main.
-
-## Update release versions in documentations
-
-After releasing is done, you need to first update the docs. This needs to happen after artifacts have propagated
-to Maven Central so should probably be done an hour or two after the release workflow finishes.
-
-```
-./gradlew updateVersionInDocs -Prelease.version=x.y.z
-./gradlew japicmp -PapiBaseVersion=a.b.c -PapiNewVersion=x.y.z
-./gradlew --refresh-dependencies japicmp
-```
-
-Where `x.y.z` is the version just released and `a.b.c` is the previous version.
-
-Create a PR to mark the new release in README.md on the main branch.
-
-Finally, update the [website docs][] to refer to the newly released version.
-
-[website docs]: https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/instrumentation/java
+* Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/release.yml).
+ * Press the "Run workflow" button, then select the release branch from the dropdown list,
+ e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
+ * This workflow will publish the artifacts to maven central and will publish a GitHub release
+ with release notes based on the change log.
+ * Review and merge the pull request that it creates for updating the change log in main
+ (note that if this is not a patch release then the change log on main may already be up-to-date,
+ in which case no pull request will be created).
+ * Once the release artifacts become available on Maven Central, the system will automatically
+ generate a new pull request titled `Update apidiff baseline and documentation versions to
+ released version $VERSION`. This pull request will contain updates to both the API diff baseline
+ and version references in the documentation files (README.md). Please review and merge this
+ automated pull request.
+ * The [website](https://github.com/open-telemetry/opentelemetry.io) contains automation to update
+ to the newly released version. Review and approve the pull request when available.
+ * The [website](https://opentelemetry.io/docs/languages/java/configuration/#zero-code-sdk-autoconfigure)
+ contains documentation on autoconfiguration properties. If the release has updated or modified any
+ properties, open and merge a pull request to update the documentation.
## Credentials
-The following credentials are required for publishing (and automatically set in Circle CI):
-
-* `GPG_PRIVATE_KEY` and `GPG_PASSWORD`: GPG private key and password for signing
- - Note, currently only @anuraaga has this and we need to find a way to safely share secrets in the
- OpenTelemetry project, for example with a password manager. In the worst case if you need to
- release manually and cannot get a hold of it, you can generate a new key but don't forget to
- upload the public key to keyservers.
+The following credentials are required for building or publishing (and automatically set in Github Actions):
+* `GPG_PRIVATE_KEY` and `GPG_PASSWORD`: GPG private key and password for signing.
* `SONATYPE_USER` and `SONATYPE_KEY`: Sonatype username and password.
+ * Each maintainer will have their own set of Sonotype credentials with permission to publish to
+ the `io.opentelemetry` group prefix.
+ * [Register to publish](https://central.sonatype.org/register/central-portal/#publishing)
+ and ask an existing maintainer to invite you to the OpenTelemetry organization and grant you
+ access to the `io.opentelemetry` namespace (see
+ [organization management](https://central.sonatype.org/publish/publish-portal-organizations/)).
+ * To obtain `SONATYPE_USER` and `SONATYPE_KEY` for your account, log in
+ to [central.sonatype.com](https://central.sonatype.com/) and navigate to Profile -> View User Tokens
+ (see [detailed instructions](https://central.sonatype.org/publish/generate-portal-token/)).
+
+Additionally, credentials are stored with maintainers via
+the [OpenTelemetry 1Password](https://opentelemetry.1password.com/signin) account. The following
+defines the mapping from Github Action secret keys to 1Password keys:
+
+| Github Actions Key | 1Password Key |
+|--------------------|---------------|
+| `GPG_PASSWORD` | `opentelemetry-java GPG_PASSWORD` |
+| `GPG_PRIVATE_KEY` | `opentelemetry-java GPG_PRIVATE_KEY` |
## Releasing from the local setup
diff --git a/VERSIONING.md b/VERSIONING.md
index 3346bad0d36..39587e32229 100644
--- a/VERSIONING.md
+++ b/VERSIONING.md
@@ -18,7 +18,7 @@ changes are:
reordering parameters, adding a method to an interface or abstract class without adding a default
implementation.
-- ABI changes that could require code using the artifact to be recompiled, but not changed, e.g.,
+- [ABI](https://wikipedia.org/wiki/Application_binary_interface) changes that could require code using the artifact to be recompiled, but not changed, e.g.,
changing the return type of a method from `void` to non-`void`, changing a `class` to an `interface`.
The [JLS](https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html) has more information on
what constitutes compatible changes.
@@ -31,6 +31,17 @@ changes are:
Such changes will be avoided - if they must be made, the `MAJOR` version of the artifact will be
incremented.
+A stable artifact may depend on an `-alpha` artifact, and expose classes, interfaces, enums, etc. of
+the `-alpha` artifact as part of its public API. In these cases, the stable artifact will place
+an [implementation](https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_separation)
+dependency (as opposed to an api dependency) on the `-alpha` artifact. In order to consume the
+portions of the API related to the `-alpha` artifact, a user must place their own implementation
+dependency on it. In adding the implementation dependency, the user has opted into to using
+an `-alpha` artifact, and we reserve the right to change the portions of the API pertaining to
+the `-alpha` artifact. This includes changing the names of methods, return types, argument types, etc.
+We will use this technique sparingly and only when there is some significant reduction in friction
+by including the `-alpha` artifact.
+
Backwards incompatible changes to `internal` packages are expected. Versions of published artifacts
are expected to be aligned by using BOMs we publish. We will always provide BOMs to allow alignment
of versions.
@@ -39,11 +50,31 @@ Changes may be made that require changes to the an app's dependency declarations
incrementing the version on `MINOR` version updates. For example, code may be separated out to a
new artifact which requires adding the new artifact to dependency declarations.
+On rare occasions we may deprecate an entire stable artifact, with the intent of stopping functional
+changes or enhancements. In these situations we may stop publishing additional `MINOR` or `MAJOR`
+versions of the artifact. However, if necessary, we'll publish security fixes via `PATCH` releases.
+The API of the last published version will remain stable.
+
As a user, if you always depend on the latest version of the BOM for a given `MAJOR` version, and
you do not use classes in the `internal` package (which you MUST NOT do), you can be assured that
your app will always function and have access to the latest features of OpenTelemetry without needing
any changes to code.
+## Language Version Compatibility
+
+The artifacts published by this codebase are compatible with certain language levels of tooling in
+the Java ecosystem. For example, all artifacts (except where otherwise noted) support Java language
+level 8 or higher, and the many artifacts intended to be used in Android environments adhere to a
+particular [Android API level](https://developer.android.com/tools/releases/build-tools). The
+following table defines the minimum language levels we adhere to, and how each is considered with
+respect to semantic versioning.
+
+| Language | Minimum Version | Applicability | Semconv Notes |
+|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Java | 8+ | All artifacts, unless otherwise noted | Changing requires major version bump. |
+| Android | 23+ (NOTE: [desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) is required. We stay up to date with the latest version of [desugar_jdk_libs](https://github.com/google/desugar_jdk_libs).) | Artifacts using `otel.animalsniffer-conventions` plugin | Kept in sync with minimum requirements for [Google Play services](https://developers.google.com/android/guides/setup). Subject to change in minor version. |
+| Kotlin | 2.2+ | Only applies to `opentelemetry-extension-kotlin` | Kept in sync with [minimum non-deprecated](https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-compiler-types/src/generated/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinVersion.kt) version. Subject to change in minor versions. |
+
## API vs SDK
This codebase is broadly split into two large pieces, the OpenTelemetry API and the OpenTelemetry SDK,
diff --git a/all/build.gradle.kts b/all/build.gradle.kts
index cbbf93d7eff..609ca565ced 100644
--- a/all/build.gradle.kts
+++ b/all/build.gradle.kts
@@ -1,28 +1,22 @@
+import org.gradle.api.JavaVersion
+
plugins {
id("otel.java-conventions")
}
description = "OpenTelemetry All"
otelJava.moduleName.set("io.opentelemetry.all")
+otelJava.requireSuppressWarningsExplanation.set(false)
+otelJava.osgiEnabled.set(false)
+otelJava.minJavaVersionSupported.set(JavaVersion.VERSION_25)
-tasks {
- // We don't compile much here, just some API boundary tests. This project is mostly for
- // aggregating jacoco reports and it doesn't work if this isn't at least as high as the
- // highest supported Java version in any of our projects. Most of our projects target
- // Java 8, except for jfr-events.
- withType(JavaCompile::class) {
- options.release.set(11)
- }
-
- val testJavaVersion: String? by project
- if (testJavaVersion == "8") {
- test {
- enabled = false
- }
- }
+// Skip ossIndexAudit on test module
+tasks.named("ossIndexAudit") {
+ enabled = false
}
val testTasks = mutableListOf()
+val jarTasks = mutableListOf()
dependencies {
rootProject.subprojects.forEach { subproject ->
@@ -35,16 +29,62 @@ dependencies {
subproject.tasks.withType().configureEach {
testTasks.add(this)
}
+ subproject.tasks.withType().forEach {
+ if (it.archiveClassifier.get().isEmpty() && !it.name.contains("jmh")) {
+ jarTasks.add(it)
+ }
+ }
}
}
}
+
testImplementation("com.tngtech.archunit:archunit-junit5")
}
+// Custom task type for writing artifacts and jars - configuration cache compatible
+abstract class WriteArtifactsAndJars : DefaultTask() {
+ @get:Input
+ abstract val artifactData: MapProperty
+
+ @get:OutputFile
+ abstract val outputFile: RegularFileProperty
+
+ @TaskAction
+ fun writeFile() {
+ val file = outputFile.get().asFile
+ file.parentFile.mkdirs()
+ val content = artifactData.get().entries.joinToString("\n") { (baseName, filePath) ->
+ "$baseName:$filePath"
+ }
+ file.writeText(content)
+ }
+}
+
+val artifactsAndJarsFile = layout.buildDirectory.file("artifacts_and_jars.txt")
+
+val writeArtifactsAndJars = tasks.register("writeArtifactsAndJars") {
+ // Set up task dependencies
+ dependsOn(jarTasks)
+
+ // Configure the task inputs and outputs using providers
+ artifactData.set(provider {
+ jarTasks.associate { jar ->
+ jar.archiveBaseName.get() to jar.archiveFile.get().asFile.absolutePath
+ }
+ })
+ outputFile.set(artifactsAndJarsFile)
+}
+
+tasks {
+ test {
+ dependsOn(writeArtifactsAndJars)
+ environment("ARTIFACTS_AND_JARS", artifactsAndJarsFile.get().asFile.absolutePath)
+ }
+}
+
// https://docs.gradle.org/current/samples/sample_jvm_multi_project_with_code_coverage.html
-val sourcesPath by configurations.creating {
- isVisible = false
+val sourcesPath = configurations.create("sourcesPath") {
isCanBeResolved = true
isCanBeConsumed = false
extendsFrom(configurations.implementation.get())
@@ -55,8 +95,7 @@ val sourcesPath by configurations.creating {
}
}
-val coverageDataPath by configurations.creating {
- isVisible = false
+val coverageDataPath = configurations.create("coverageDataPath") {
isCanBeResolved = true
isCanBeConsumed = false
extendsFrom(configurations.implementation.get())
@@ -78,15 +117,9 @@ tasks.named("jacocoTestReport") {
// Exclude mrjar (jacoco complains), shaded, and generated code
!it.absolutePath.contains("META-INF/versions/") &&
!it.absolutePath.contains("/internal/shaded/") &&
- !it.absolutePath.contains("io/opentelemetry/proto/") &&
- !it.absolutePath.contains("io/opentelemetry/exporter/jaeger/proto/") &&
- !it.absolutePath.contains("io/opentelemetry/exporter/jaeger/internal/protobuf/") &&
!it.absolutePath.contains("io/opentelemetry/sdk/extension/trace/jaeger/proto/") &&
- !it.absolutePath.contains("io/opentelemetry/semconv/trace/attributes/") &&
- !it.absolutePath.contains("AutoValue_") &&
- // TODO(anuraaga): Remove exclusion after enabling coverage for jfr-events
- !it.absolutePath.contains("io/opentelemetry/sdk/extension/jfr")
- }
+ !it.absolutePath.contains("AutoValue_")
+ },
)
}
additionalSourceDirs(sourcesPath.incoming.artifactView { lenient(true) }.files)
diff --git a/all/src/test/java/io/opentelemetry/all/NoGuavaTest.java b/all/src/test/java/io/opentelemetry/all/NoGuavaTest.java
new file mode 100644
index 00000000000..d89b587a5c0
--- /dev/null
+++ b/all/src/test/java/io/opentelemetry/all/NoGuavaTest.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright The OpenTelemetry Authors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package io.opentelemetry.all;
+
+import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
+
+import com.tngtech.archunit.core.importer.ClassFileImporter;
+import io.opentelemetry.exporter.sender.grpc.managedchannel.internal.UpstreamGrpcSender;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.jar.JarFile;
+import java.util.stream.Stream;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+/**
+ * Prevents Guava API usage in published code, even when Guava is available transitively.
+ *
+ *
This replaces the narrower Guava beta-API check, whose annotation inspection fails with javac
+ * 25 and {@code --release 8}. Only published JARs are scanned: tests may use Guava, and transitive
+ * dependencies are not prohibited.
+ */
+class NoGuavaTest {
+
+ @ParameterizedTest
+ @MethodSource("artifactsAndJars")
+ void noGuavaReferences(String artifactId, String absolutePath) throws IOException {
+ try (JarFile jarFile = new JarFile(new File(absolutePath))) {
+ noClasses()
+ .that()
+ // futureUnaryCall exposes ListenableFuture. Retain its existing completion semantics.
+ .doNotBelongToAnyOf(UpstreamGrpcSender.class)
+ .and()
+ // Generated into main alongside the test server API; this unused stub returns
+ // ListenableFuture. Moving generation to test-only sources is a separate cleanup.
+ .doNotHaveFullyQualifiedName(
+ "io.opentelemetry.sdk.extension.trace.jaeger.proto.api_v2."
+ + "SamplingManagerGrpc$SamplingManagerFutureStub")
+ .should()
+ .dependOnClassesThat()
+ .resideInAPackage("com.google.common..")
+ .as(artifactId + " should not reference Guava except in gRPC future adapters")
+ .check(new ClassFileImporter().importJar(jarFile));
+ }
+ }
+
+ private static Stream artifactsAndJars() throws IOException {
+ return Files.readAllLines(Path.of(System.getenv("ARTIFACTS_AND_JARS"))).stream()
+ .map(line -> {
+ String[] parts = line.split(":", 2);
+ return Arguments.argumentSet(parts[0], parts[0], parts[1]);
+ });
+ }
+}
diff --git a/all/src/test/java/io/opentelemetry/all/NoSharedInternalCodeTest.java b/all/src/test/java/io/opentelemetry/all/NoSharedInternalCodeTest.java
new file mode 100644
index 00000000000..07adde611d9
--- /dev/null
+++ b/all/src/test/java/io/opentelemetry/all/NoSharedInternalCodeTest.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright The OpenTelemetry Authors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package io.opentelemetry.all;
+
+import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
+
+import com.tngtech.archunit.base.DescribedPredicate;
+import com.tngtech.archunit.core.domain.JavaClass;
+import com.tngtech.archunit.core.domain.JavaClasses;
+import com.tngtech.archunit.core.importer.ClassFileImporter;
+import com.tngtech.archunit.lang.syntax.elements.ClassesShouldConjunction;
+import io.opentelemetry.internal.testing.slf4j.SuppressLogger;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.List;
+import java.util.Set;
+import java.util.jar.JarFile;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+@SuppressLogger(NoSharedInternalCodeTest.class)
+class NoSharedInternalCodeTest {
+
+ private static final Set exemptions =
+ Set.of(
+ "opentelemetry-exporter-common",
+ "opentelemetry-exporter-logging-otlp",
+ "opentelemetry-exporter-prometheus",
+ "opentelemetry-extension-trace-propagators",
+ "opentelemetry-opencensus-shim",
+ "opentelemetry-sdk",
+ "opentelemetry-sdk-logs",
+ "opentelemetry-sdk-metrics",
+ "opentelemetry-sdk-testing",
+ "opentelemetry-sdk-trace",
+ "opentelemetry-sdk-extension-autoconfigure",
+ "opentelemetry-sdk-extension-declarative-config",
+ "opentelemetry-sdk-extension-declarative-config-jackson2",
+ "opentelemetry-sdk-extension-declarative-config-snakeyaml-engine2",
+ "opentelemetry-sdk-extension-incubator",
+ "opentelemetry-sdk-extension-jaeger-remote-sampler",
+ "opentelemetry-sdk-processcontext",
+ "opentelemetry-exporter-otlp",
+ "opentelemetry-exporter-otlp-common",
+ "opentelemetry-exporter-otlp-profiles",
+ "opentelemetry-exporter-sender-grpc-managed-channel",
+ "opentelemetry-exporter-sender-jdk",
+ "opentelemetry-exporter-sender-okhttp");
+
+ private static final String OTEL_BASE_PACKAGE = "io.opentelemetry";
+ private static final Logger logger = Logger.getLogger(NoSharedInternalCodeTest.class.getName());
+
+ @ParameterizedTest
+ @MethodSource("artifactsAndJars")
+ void noSharedInternalCode(String artifactId, String absolutePath) throws IOException {
+ try (JarFile jarFile = new JarFile(new File(absolutePath))) {
+ JavaClasses artifactClasses = new ClassFileImporter().importJar(jarFile);
+
+ Set artifactOtelPackages =
+ artifactClasses.stream()
+ .map(JavaClass::getPackageName)
+ .filter(packageName -> packageName.startsWith(OTEL_BASE_PACKAGE))
+ .collect(Collectors.toSet());
+
+ ClassesShouldConjunction noSharedInternalCodeRule =
+ noClasses()
+ .that()
+ .resideInAnyPackage(artifactOtelPackages.toArray(new String[0]))
+ .should()
+ .dependOnClassesThat(
+ new DescribedPredicate<>(
+ "are in internal modules of other opentelemetry artifacts") {
+ @Override
+ public boolean test(JavaClass javaClass) {
+ String packageName = javaClass.getPackageName();
+ return packageName.startsWith(OTEL_BASE_PACKAGE)
+ && packageName.contains(".internal")
+ && !artifactOtelPackages.contains(packageName);
+ }
+ });
+
+ try {
+ noSharedInternalCodeRule
+ .as(artifactId + " should not use internal code from other artifacts")
+ .check(artifactClasses);
+ // To view artifacts which do not contain shared internal code, change test log level or
+ // increase log level of this statement to WARNING
+ logger.log(Level.INFO, artifactId + " does not contain shared internal code");
+ } catch (AssertionError e) {
+ if (exemptions.contains(artifactId)) {
+ // To view details, remove from exemptions list
+ logger.log(
+ Level.WARNING,
+ artifactId + " contains shared internal code but is temporarily exempt");
+ } else {
+ throw e;
+ }
+ }
+ }
+ }
+
+ private static Stream artifactsAndJars() throws IOException {
+ List lines = Files.readAllLines(Path.of(System.getenv("ARTIFACTS_AND_JARS")));
+ return lines.stream()
+ .map(line -> {
+ String[] parts = line.split(":", 2);
+ return Arguments.argumentSet(parts[0], parts[0], parts[1]);
+ });
+ }
+}
diff --git a/all/src/test/java/io/opentelemetry/all/NullGuardsTest.java b/all/src/test/java/io/opentelemetry/all/NullGuardsTest.java
new file mode 100644
index 00000000000..01ad07589ef
--- /dev/null
+++ b/all/src/test/java/io/opentelemetry/all/NullGuardsTest.java
@@ -0,0 +1,711 @@
+/*
+ * Copyright The OpenTelemetry Authors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package io.opentelemetry.all;
+
+import io.opentelemetry.api.GlobalOpenTelemetry;
+import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.KeyValue;
+import io.opentelemetry.api.common.Value;
+import io.opentelemetry.common.impl.ApiUsageLogger;
+import io.opentelemetry.context.Context;
+import io.opentelemetry.context.propagation.ContextPropagators;
+import io.opentelemetry.internal.testing.slf4j.SuppressLogger;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.classfile.Annotation;
+import java.lang.classfile.Attributes;
+import java.lang.classfile.ClassFile;
+import java.lang.classfile.ClassModel;
+import java.lang.classfile.CodeElement;
+import java.lang.classfile.Instruction;
+import java.lang.classfile.MethodModel;
+import java.lang.classfile.Opcode;
+import java.lang.classfile.TypeKind;
+import java.lang.classfile.instruction.BranchInstruction;
+import java.lang.classfile.instruction.InvokeInstruction;
+import java.lang.classfile.instruction.LabelTarget;
+import java.lang.classfile.instruction.LoadInstruction;
+import java.lang.constant.ClassDesc;
+import java.lang.constant.MethodTypeDesc;
+import java.lang.reflect.AccessFlag;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.function.BiConsumer;
+import java.util.function.BiFunction;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.function.Supplier;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+/**
+ * Structural test that public API entry points guard non-{@code @Nullable} reference parameters
+ * against {@code null}, per {@code docs/knowledge/api-design.md#null-guards}.
+ *
+ *
Each method is classified as either {@code RUNTIME} (needs {@code ApiUsageLogger}-style
+ * graceful degradation) or {@code FAIL_FAST} (needs {@code Objects.requireNonNull}):
+ *
+ *
+ *
Default per artifact: {@code opentelemetry-api*} and {@code opentelemetry-context} default
+ * to {@code RUNTIME}, everything else to {@code FAIL_FAST}.
+ *
Structural override: any method that overrides or implements a method declared on a
+ * supertype whose package starts with {@code io.opentelemetry.api.} or {@code
+ * io.opentelemetry.context.} is classified {@code RUNTIME}. This picks up SDK implementations
+ * of runtime API types ({@code SdkSpan}, {@code SdkLongCounter}, ...) without an enumeration.
+ *
Explicit per-method overrides in {@link #METHOD_STYLE_OVERRIDES} handle config-time methods
+ * and runtime methods without type-safe fallbacks.
+ *
+ *
+ *
Detection is intentionally lenient: it looks for the guard pattern anywhere in the method
+ * body, not just at the top. This trades a small false-negative rate for far fewer false positives
+ * while a module is being brought into compliance.
+ */
+@SuppressLogger(NullGuardsTest.class)
+class NullGuardsTest {
+
+ private static final Logger logger = Logger.getLogger(NullGuardsTest.class.getName());
+
+ private static final String OTEL_BASE_PACKAGE = "io.opentelemetry";
+ private static final String EQUALS_DESC =
+ MethodTypeDesc.of(ClassDesc.ofDescriptor("Z"), ClassDesc.of("java.lang.Object"))
+ .descriptorString();
+ private static final String OBJECT_INTERNAL_NAME = Object.class.getName().replace('.', '/');
+
+ /**
+ * Runtime API scope: the artifacts and packages that constitute the runtime instrumentation API.
+ * Keys are artifact base names; values are the corresponding base packages. Both are matched as
+ * "equal-to or has-{@code -} / has-{@code .} suffix", so {@code opentelemetry-api} covers {@code
+ * opentelemetry-api-incubator} and {@code io.opentelemetry.api} covers {@code
+ * io.opentelemetry.api.trace} etc.
+ *
+ *
Methods in these artifacts, and methods anywhere that override methods declared in these
+ * packages, default to {@code RUNTIME} null-guard semantics. Everything else defaults to {@code
+ * FAIL_FAST}.
+ */
+ private static final Map RUNTIME_SCOPE =
+ Map.of(
+ "opentelemetry-api", "io.opentelemetry.api",
+ "opentelemetry-context", "io.opentelemetry.context");
+
+ /**
+ * Per-method style overrides for config-time methods and runtime methods without type-safe
+ * fallbacks in runtime-defaulted artifacts.
+ */
+ private static final Map METHOD_STYLE_OVERRIDES =
+ Map.ofEntries(
+ Map.entry(
+ overrideKey(GlobalOpenTelemetry.class, "set", void.class, OpenTelemetry.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(GlobalOpenTelemetry.class, "set", void.class, Supplier.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(
+ OpenTelemetry.class,
+ "propagating",
+ OpenTelemetry.class,
+ ContextPropagators.class),
+ GuardStyle.FAIL_FAST),
+ // Context wrappers are setup-time adapters. Fail fast rather than defer an NPE until use
+ // or substitute a noop that could discard application work or return an invalid result.
+ Map.entry(
+ overrideKey(Context.class, "taskWrapping", Executor.class, Executor.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(
+ Context.class, "taskWrapping", ExecutorService.class, ExecutorService.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(
+ Context.class,
+ "taskWrapping",
+ ScheduledExecutorService.class,
+ ScheduledExecutorService.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrap", Executor.class, Executor.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrap", ExecutorService.class, ExecutorService.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(
+ Context.class,
+ "wrap",
+ ScheduledExecutorService.class,
+ ScheduledExecutorService.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrap", Runnable.class, Runnable.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrap", Callable.class, Callable.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrapFunction", Function.class, Function.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrapFunction", BiFunction.class, BiFunction.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrapConsumer", Consumer.class, Consumer.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrapConsumer", BiConsumer.class, BiConsumer.class),
+ GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Context.class, "wrapSupplier", Supplier.class, Supplier.class),
+ GuardStyle.FAIL_FAST),
+ // Value.empty() cannot preserve these generic return types. We may reevaluate in future.
+ Map.entry(
+ overrideKey(Value.class, "of", Value.class, String.class), GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Value.class, "of", Value.class, byte[].class), GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Value.class, "of", Value.class, Value[].class), GuardStyle.FAIL_FAST),
+ Map.entry(overrideKey(Value.class, "of", Value.class, List.class), GuardStyle.FAIL_FAST),
+ Map.entry(
+ overrideKey(Value.class, "of", Value.class, KeyValue[].class), GuardStyle.FAIL_FAST),
+ Map.entry(overrideKey(Value.class, "of", Value.class, Map.class), GuardStyle.FAIL_FAST));
+
+ private static String overrideKey(
+ Class> owner, String name, Class> returnType, Class>... paramTypes) {
+ ClassDesc[] params =
+ Arrays.stream(paramTypes)
+ .map(type -> ClassDesc.ofDescriptor(type.descriptorString()))
+ .toArray(ClassDesc[]::new);
+ return owner.getName().replace('.', '/')
+ + "#"
+ + name
+ + ":"
+ + MethodTypeDesc.of(ClassDesc.ofDescriptor(returnType.descriptorString()), params)
+ .descriptorString();
+ }
+
+ /**
+ * Artifacts that have not yet been audited for null-guard compliance. Remove an entry once a
+ * per-module PR has landed all guards for it.
+ */
+ private static final Set exemptions =
+ Set.of(
+ "opentelemetry-api",
+ "opentelemetry-api-incubator",
+ "opentelemetry-context",
+ "opentelemetry-common",
+ "opentelemetry-exporter-common",
+ "opentelemetry-exporter-logging",
+ "opentelemetry-exporter-logging-otlp",
+ "opentelemetry-exporter-otlp",
+ "opentelemetry-exporter-otlp-common",
+ "opentelemetry-exporter-otlp-profiles",
+ "opentelemetry-exporter-prometheus",
+ "opentelemetry-exporter-sender-grpc-managed-channel",
+ "opentelemetry-exporter-sender-jdk",
+ "opentelemetry-exporter-sender-okhttp",
+ "opentelemetry-extension-kotlin",
+ "opentelemetry-extension-trace-propagators",
+ "opentelemetry-opencensus-shim",
+ "opentelemetry-opentracing-shim",
+ "opentelemetry-opentelemetry-jfr-profiles-shim",
+ "opentelemetry-sdk",
+ "opentelemetry-sdk-common",
+ "opentelemetry-sdk-logs",
+ "opentelemetry-sdk-metrics",
+ "opentelemetry-sdk-profiles",
+ "opentelemetry-sdk-testing",
+ "opentelemetry-sdk-trace",
+ "opentelemetry-sdk-extension-autoconfigure",
+ "opentelemetry-sdk-extension-autoconfigure-spi",
+ "opentelemetry-sdk-extension-declarative-config",
+ "opentelemetry-sdk-extension-incubator",
+ "opentelemetry-sdk-extension-jaeger-remote-sampler");
+
+ enum GuardStyle {
+ RUNTIME, // ApiUsageLogger + graceful degradation
+ FAIL_FAST // Objects.requireNonNull
+ }
+
+ /** Cross-artifact registry loaded once. Key is internal class name (slashes). */
+ private static Map classRegistry;
+
+ @BeforeAll
+ static void loadClassRegistry() throws IOException {
+ if (classRegistry != null) {
+ return;
+ }
+ Map registry = new HashMap<>();
+ for (String[] entry : readArtifactsAndJars()) {
+ loadJarInto(entry[1], registry);
+ }
+ classRegistry = registry;
+ }
+
+ @ParameterizedTest
+ @MethodSource("artifactsAndJars")
+ void nullGuards(String artifactId, String absolutePath) throws IOException {
+ Map artifactClasses = new LinkedHashMap<>();
+ loadJarInto(absolutePath, artifactClasses);
+ GuardStyle artifactDefault = defaultStyleFor(artifactId);
+
+ List findings = new ArrayList<>();
+ for (ClassModel cls : artifactClasses.values()) {
+ if (!isInAuditablePackage(cls)) {
+ continue;
+ }
+ for (MethodModel method : cls.methods()) {
+ if (!isMethodPubliclyReachable(cls, method)) {
+ continue;
+ }
+ GuardStyle style = guardStyleFor(cls, method, artifactDefault);
+ findGuardViolations(cls, method, style, findings);
+ }
+ }
+
+ try {
+ if (!findings.isEmpty()) {
+ throw new AssertionError(
+ artifactId + " has null-guard findings:\n" + renderReport(artifactId, findings));
+ }
+ logger.log(Level.INFO, artifactId + " is null-guard compliant");
+ } catch (AssertionError e) {
+ if (exemptions.contains(artifactId)) {
+ // To view details, remove from exemptions list.
+ logger.log(
+ Level.WARNING, artifactId + " has null-guard findings but is temporarily exempt");
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ private static void loadJarInto(String jarPath, Map out) throws IOException {
+ try (JarFile jar = new JarFile(new File(jarPath))) {
+ Enumeration entries = jar.entries();
+ while (entries.hasMoreElements()) {
+ JarEntry entry = entries.nextElement();
+ String name = entry.getName();
+ if (!name.endsWith(".class") || name.startsWith("META-INF/")) {
+ continue;
+ }
+ try (InputStream in = jar.getInputStream(entry)) {
+ ClassModel model = ClassFile.of().parse(in.readAllBytes());
+ out.put(model.thisClass().asInternalName(), model);
+ }
+ }
+ }
+ }
+
+ private static GuardStyle defaultStyleFor(String artifactId) {
+ return isRuntimeApiArtifact(artifactId) ? GuardStyle.RUNTIME : GuardStyle.FAIL_FAST;
+ }
+
+ private static boolean isRuntimeApiArtifact(String artifactId) {
+ return RUNTIME_SCOPE.keySet().stream()
+ .anyMatch(base -> artifactId.equals(base) || artifactId.startsWith(base + "-"));
+ }
+
+ private static boolean isRuntimeApiPackage(String internalName) {
+ String pkg = packageOf(internalName);
+ return RUNTIME_SCOPE.values().stream()
+ .anyMatch(base -> pkg.equals(base) || pkg.startsWith(base + "."));
+ }
+
+ private static GuardStyle guardStyleFor(
+ ClassModel cls, MethodModel method, GuardStyle artifactDefault) {
+ String key =
+ cls.thisClass().asInternalName()
+ + "#"
+ + method.methodName().stringValue()
+ + ":"
+ + method.methodType().stringValue();
+ GuardStyle explicit = METHOD_STYLE_OVERRIDES.get(key);
+ if (explicit != null) {
+ return explicit;
+ }
+ if (overridesRuntimeApiMethod(cls, method)) {
+ return GuardStyle.RUNTIME;
+ }
+ return artifactDefault;
+ }
+
+ /**
+ * True iff {@code method} overrides or implements a method with the same name+descriptor declared
+ * on any supertype whose package is under {@code io.opentelemetry.api.} or {@code
+ * io.opentelemetry.context.}. Static and private methods cannot override.
+ */
+ private static boolean overridesRuntimeApiMethod(ClassModel cls, MethodModel method) {
+ if (method.flags().has(AccessFlag.STATIC) || method.flags().has(AccessFlag.PRIVATE)) {
+ return false;
+ }
+ String name = method.methodName().stringValue();
+ if ("".equals(name) || "".equals(name)) {
+ return false;
+ }
+ return anySupertypeMatches(
+ cls,
+ sup ->
+ isRuntimeApiPackage(sup.thisClass().asInternalName())
+ && declaresMethod(sup, name, method.methodType().stringValue()));
+ }
+
+ /**
+ * Walks {@code cls}'s superclass chain and interface graph (not including {@code cls} itself),
+ * returning true if {@code match} accepts any visited supertype. Cycle-safe.
+ */
+ private static boolean anySupertypeMatches(ClassModel cls, Predicate match) {
+ Set visited = new LinkedHashSet<>();
+ visited.add(cls.thisClass().asInternalName());
+ return walkSupertypes(cls, visited, match);
+ }
+
+ private static boolean walkSupertypes(
+ ClassModel cls, Set visited, Predicate match) {
+ if (cls.superclass().isPresent()) {
+ String superName = cls.superclass().get().asInternalName();
+ if (!OBJECT_INTERNAL_NAME.equals(superName)
+ && visitSupertype(classRegistry.get(superName), visited, match)) {
+ return true;
+ }
+ }
+ for (var iface : cls.interfaces()) {
+ if (visitSupertype(classRegistry.get(iface.asInternalName()), visited, match)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static boolean visitSupertype(
+ ClassModel cls, Set visited, Predicate match) {
+ if (cls == null || !visited.add(cls.thisClass().asInternalName())) {
+ return false;
+ }
+ if (match.test(cls)) {
+ return true;
+ }
+ return walkSupertypes(cls, visited, match);
+ }
+
+ private static boolean declaresMethod(ClassModel cls, String name, String desc) {
+ return cls.methods().stream()
+ .filter(m -> !m.flags().has(AccessFlag.STATIC) && !m.flags().has(AccessFlag.PRIVATE))
+ .anyMatch(m ->
+ name.equals(m.methodName().stringValue()) && desc.equals(m.methodType().stringValue()));
+ }
+
+ private static boolean isInAuditablePackage(ClassModel cls) {
+ if (cls.flags().has(AccessFlag.SYNTHETIC)) {
+ return false;
+ }
+ if (isAutoValueGenerated(cls)) {
+ return false;
+ }
+ return isAuditableOtelPackage(cls.thisClass().asInternalName());
+ }
+
+ /** Auto-generated; not editable. */
+ private static boolean isAutoValueGenerated(ClassModel cls) {
+ String name = cls.thisClass().asInternalName();
+ int lastSep = Math.max(name.lastIndexOf('/'), name.lastIndexOf('$'));
+ return name.startsWith("AutoValue_", lastSep + 1);
+ }
+
+ /**
+ * True iff a caller in another package can dispatch to this method via some publicly-visible
+ * reference type. Either (a) the declaring class is itself public, or (b) the method overrides a
+ * method declared on a public supertype in a non-internal {@code io.opentelemetry.*} package
+ * (typical for package-private SDK impls of API interfaces like {@code SdkSpan implements Span}).
+ */
+ private static boolean isMethodPubliclyReachable(ClassModel cls, MethodModel method) {
+ if (!method.flags().has(AccessFlag.PUBLIC) && !method.flags().has(AccessFlag.PROTECTED)) {
+ return false;
+ }
+ if (cls.flags().has(AccessFlag.PUBLIC)) {
+ return true;
+ }
+ if (method.flags().has(AccessFlag.STATIC) || method.flags().has(AccessFlag.PRIVATE)) {
+ return false;
+ }
+ String name = method.methodName().stringValue();
+ if ("".equals(name) || "".equals(name)) {
+ return false;
+ }
+ return anySupertypeMatches(
+ cls,
+ sup ->
+ sup.flags().has(AccessFlag.PUBLIC)
+ && isAuditableOtelPackage(sup.thisClass().asInternalName())
+ && declaresMethod(sup, name, method.methodType().stringValue()));
+ }
+
+ private static boolean isAuditableOtelPackage(String internalName) {
+ String pkg = packageOf(internalName);
+ if (!pkg.startsWith(OTEL_BASE_PACKAGE)) {
+ return false;
+ }
+ return !pkg.contains(".internal") && !pkg.endsWith(".impl") && !pkg.contains(".impl.");
+ }
+
+ private static void findGuardViolations(
+ ClassModel cls, MethodModel method, GuardStyle style, List findings) {
+ if (method.flags().has(AccessFlag.ABSTRACT)
+ || method.flags().has(AccessFlag.SYNTHETIC)
+ || method.flags().has(AccessFlag.BRIDGE)) {
+ return;
+ }
+ if (isKnownNullAcceptingSignature(method)) {
+ return;
+ }
+ List paramTypes = method.methodTypeSymbol().parameterList();
+ if (paramTypes.isEmpty()) {
+ return;
+ }
+
+ boolean isStatic = method.flags().has(AccessFlag.STATIC);
+ int slot = isStatic ? 0 : 1;
+ for (int i = 0; i < paramTypes.size(); i++) {
+ ClassDesc pt = paramTypes.get(i);
+ int paramSlot = slot;
+ int paramIndex = i;
+ slot += TypeKind.from(pt).slotSize();
+ if (pt.isPrimitive()) {
+ continue;
+ }
+ Consumer report =
+ msg ->
+ findings.add(
+ new Finding(
+ cls.thisClass().asInternalName(),
+ method.methodName().stringValue(),
+ method.methodType().stringValue(),
+ paramIndex,
+ msg));
+ boolean nullable = isParamNullable(method, paramIndex);
+ boolean requireNonNullGuard = GuardScanner.hasRequireNonNullGuard(method, paramSlot);
+ boolean apiUsageLoggerGuard = GuardScanner.hasApiUsageLoggerGuard(method, paramSlot);
+
+ if (nullable) {
+ if (requireNonNullGuard) {
+ report.accept("@Nullable but guarded with requireNonNull (contradicts contract)");
+ }
+ continue;
+ }
+
+ boolean hasAnyGuard = requireNonNullGuard || apiUsageLoggerGuard;
+ if (!hasAnyGuard) {
+ report.accept(
+ style == GuardStyle.RUNTIME
+ ? "missing ApiUsageLogger.logNullParam guard"
+ : "missing Objects.requireNonNull guard");
+ continue;
+ }
+ if (style == GuardStyle.RUNTIME && requireNonNullGuard && !apiUsageLoggerGuard) {
+ report.accept("wrong style: uses requireNonNull; expected ApiUsageLogger.logNullParam");
+ } else if (style == GuardStyle.FAIL_FAST && apiUsageLoggerGuard && !requireNonNullGuard) {
+ report.accept("wrong style: uses ApiUsageLogger; expected Objects.requireNonNull");
+ }
+ }
+ }
+
+ private static boolean isKnownNullAcceptingSignature(MethodModel method) {
+ return "equals".equals(method.methodName().stringValue())
+ && EQUALS_DESC.equals(method.methodType().stringValue());
+ }
+
+ private static boolean isParamNullable(MethodModel method, int paramIndex) {
+ return method
+ .findAttribute(Attributes.runtimeVisibleParameterAnnotations())
+ .map(a -> containsNullable(a.parameterAnnotations(), paramIndex))
+ .orElse(false)
+ || method
+ .findAttribute(Attributes.runtimeInvisibleParameterAnnotations())
+ .map(a -> containsNullable(a.parameterAnnotations(), paramIndex))
+ .orElse(false);
+ }
+
+ private static boolean containsNullable(List> paramAnnos, int paramIndex) {
+ return paramIndex < paramAnnos.size()
+ && paramAnnos.get(paramIndex).stream()
+ .anyMatch(a -> a.className().stringValue().endsWith("/Nullable;"));
+ }
+
+ /** Bytecode-level detection of the two null-guard shapes on a given parameter slot. */
+ private static final class GuardScanner {
+
+ private static final ClassDesc OBJECTS = ClassDesc.of(Objects.class.getName());
+ private static final ClassDesc API_USAGE_LOGGER = ClassDesc.of(ApiUsageLogger.class.getName());
+
+ private GuardScanner() {}
+
+ /** True iff {@code paramSlot} is passed as the first arg to {@code Objects.requireNonNull}. */
+ static boolean hasRequireNonNullGuard(MethodModel method, int paramSlot) {
+ List instructions =
+ method.code().stream()
+ .flatMap(code -> code.elementStream())
+ .filter(Instruction.class::isInstance)
+ .map(Instruction.class::cast)
+ .toList();
+ for (int i = 0; i < instructions.size(); i++) {
+ if (!(instructions.get(i) instanceof InvokeInstruction invoke)
+ || invoke.opcode() != Opcode.INVOKESTATIC
+ || !invoke.owner().matches(OBJECTS)
+ || !"requireNonNull".equals(invoke.name().stringValue())) {
+ continue;
+ }
+ // Skip the trailing message argument for two-argument overloads.
+ int argumentIndex = i - invoke.typeSymbol().parameterCount();
+ if (argumentIndex >= 0 && isReferenceLoad(instructions.get(argumentIndex), paramSlot)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * True iff the method contains {@code if (paramSlot == null) { ... ApiUsageLogger.log*(...);
+ * ...; return; }}: an {@code IFNONNULL} on the param whose fall-through branch contains a call
+ * to {@code ApiUsageLogger} before the jump target.
+ */
+ static boolean hasApiUsageLoggerGuard(MethodModel method, int paramSlot) {
+ List elements =
+ method.code().stream().flatMap(code -> code.elementStream()).toList();
+ for (int i = 0; i < elements.size(); i++) {
+ if (!isReferenceLoad(elements.get(i), paramSlot)) {
+ continue;
+ }
+ int next = i + 1;
+ while (next < elements.size() && !(elements.get(next) instanceof Instruction)) {
+ next++;
+ }
+ if (next >= elements.size()
+ || !(elements.get(next) instanceof BranchInstruction jump)
+ || jump.opcode() != Opcode.IFNONNULL) {
+ continue;
+ }
+ for (int cursor = next + 1; cursor < elements.size(); cursor++) {
+ CodeElement element = elements.get(cursor);
+ if (element instanceof LabelTarget target && target.label().equals(jump.target())) {
+ break;
+ }
+ if (element instanceof InvokeInstruction invoke
+ && invoke.owner().matches(API_USAGE_LOGGER)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private static boolean isReferenceLoad(CodeElement element, int paramSlot) {
+ return element instanceof LoadInstruction load
+ && load.typeKind() == TypeKind.REFERENCE
+ && load.slot() == paramSlot;
+ }
+ }
+
+ private static String renderReport(String artifactId, List findings) {
+ Map> byClass =
+ findings.stream()
+ .collect(
+ Collectors.groupingBy(f -> f.className, LinkedHashMap::new, Collectors.toList()));
+ StringBuilder sb = new StringBuilder();
+ sb.append("Artifact: ")
+ .append(artifactId)
+ .append(" (")
+ .append(findings.size())
+ .append(" findings)\n");
+ for (Map.Entry> e : byClass.entrySet()) {
+ sb.append(" ").append(e.getKey().replace('/', '.')).append('\n');
+ for (Finding f : e.getValue()) {
+ sb.append(" ")
+ .append(f.methodName)
+ .append(prettyParams(f.methodDesc))
+ .append(" param #")
+ .append(f.paramIndex)
+ .append(" (")
+ .append(prettyParamType(f.methodDesc, f.paramIndex))
+ .append("): ")
+ .append(f.message)
+ .append('\n');
+ }
+ }
+ return sb.toString();
+ }
+
+ private static String prettyParams(String methodDesc) {
+ return MethodTypeDesc.ofDescriptor(methodDesc).parameterList().stream()
+ .map(ClassDesc::displayName)
+ .collect(Collectors.joining(", ", "(", ")"));
+ }
+
+ private static String prettyParamType(String methodDesc, int paramIndex) {
+ MethodTypeDesc type = MethodTypeDesc.ofDescriptor(methodDesc);
+ if (paramIndex < 0 || paramIndex >= type.parameterCount()) {
+ return "?";
+ }
+ return type.parameterType(paramIndex).displayName();
+ }
+
+ private static String packageOf(String internalName) {
+ int slash = internalName.lastIndexOf('/');
+ return slash < 0 ? "" : internalName.substring(0, slash).replace('/', '.');
+ }
+
+ private static List readArtifactsAndJars() throws IOException {
+ List lines = Files.readAllLines(Path.of(System.getenv("ARTIFACTS_AND_JARS")));
+ List out = new ArrayList<>();
+ for (String line : lines) {
+ out.add(line.split(":", 2));
+ }
+ return out;
+ }
+
+ private static Stream artifactsAndJars() throws IOException {
+ return readArtifactsAndJars().stream()
+ .map(parts -> Arguments.argumentSet(parts[0], parts[0], parts[1]));
+ }
+
+ private static final class Finding {
+ final String className;
+ final String methodName;
+ final String methodDesc;
+ final int paramIndex;
+ final String message;
+
+ Finding(
+ String className, String methodName, String methodDesc, int paramIndex, String message) {
+ this.className = className;
+ this.methodName = methodName;
+ this.methodDesc = methodDesc;
+ this.paramIndex = paramIndex;
+ this.message = message;
+ }
+ }
+}
diff --git a/all/src/test/java/io/opentelemetry/all/OsgiServiceLoaderManifestTest.java b/all/src/test/java/io/opentelemetry/all/OsgiServiceLoaderManifestTest.java
new file mode 100644
index 00000000000..6d67ee67101
--- /dev/null
+++ b/all/src/test/java/io/opentelemetry/all/OsgiServiceLoaderManifestTest.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright The OpenTelemetry Authors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package io.opentelemetry.all;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Verifies that every OSGi bundle whose {@code META-INF/services/} directory registers SPI
+ * implementations also declares the corresponding {@code Provide-Capability:
+ * osgi.serviceloader;osgi.serviceloader=""} in its manifest.
+ */
+class OsgiServiceLoaderManifestTest {
+
+ @Test
+ void allOsgiBundlesAdvertiseTheirServiceLoaderRegistrations() throws IOException {
+ List lines = Files.readAllLines(Path.of(System.getenv("ARTIFACTS_AND_JARS")));
+ // violations: ": META-INF/services/ not in Provide-Capability"
+ List violations = new ArrayList<>();
+
+ for (String line : lines) {
+ String[] parts = line.split(":", 2);
+ String baseName = parts[0];
+ String absolutePath = parts[1];
+
+ try (JarFile jar = new JarFile(new File(absolutePath))) {
+ Manifest manifest = jar.getManifest();
+ if (manifest == null) {
+ continue;
+ }
+ Attributes mainAttrs = manifest.getMainAttributes();
+
+ // Only check OSGi bundles.
+ String bundleManifestVersion = mainAttrs.getValue("Bundle-ManifestVersion");
+ if (bundleManifestVersion == null) {
+ continue;
+ }
+
+ // Collect all SPI interface names from META-INF/services/.
+ List registeredSpis = new ArrayList<>();
+ jar.stream()
+ .map(JarEntry::getName)
+ .filter(name -> name.startsWith("META-INF/services/") && !name.endsWith("/"))
+ .forEach(name -> registeredSpis.add(name.substring("META-INF/services/".length())));
+
+ if (registeredSpis.isEmpty()) {
+ continue;
+ }
+
+ // Parse Provide-Capability for osgi.serviceloader entries.
+ String provideCapability = mainAttrs.getValue("Provide-Capability");
+ List advertisedSpis = parseOsgiServiceLoaderCapabilities(provideCapability);
+
+ for (String spi : registeredSpis) {
+ if (!advertisedSpis.contains(spi)) {
+ violations.add(baseName + ": META-INF/services/" + spi + " not in Provide-Capability");
+ }
+ }
+ }
+ }
+
+ assertThat(violations)
+ .as(
+ "OSGi bundles with META-INF/services registrations missing from Provide-Capability.\n"
+ + "Add the missing SPI to osgiServiceLoaderProvides in the module's build.gradle.kts.")
+ .isEmpty();
+ }
+
+ /**
+ * Parses the {@code Provide-Capability} manifest header and returns all {@code
+ * osgi.serviceloader} service type names.
+ *
+ *
Example: {@code osgi.serviceloader;osgi.serviceloader="com.example.Foo",
+ * osgi.serviceloader;osgi.serviceloader="com.example.Bar"} β {@code ["com.example.Foo",
+ * "com.example.Bar"]}
+ */
+ private static List parseOsgiServiceLoaderCapabilities(String provideCapability) {
+ List result = new ArrayList<>();
+ if (provideCapability == null || provideCapability.isEmpty()) {
+ return result;
+ }
+ // JarFile already unfolds line-folded headers. Split into individual capability clauses
+ // on commas immediately followed by an OSGi namespace (osgi.*).
+ String[] clauses = provideCapability.split(",(?=\\s*osgi\\.)");
+ for (String clause : clauses) {
+ clause = clause.trim();
+ if (!clause.startsWith("osgi.serviceloader")) {
+ continue;
+ }
+ // Extract osgi.serviceloader=""
+ int eq = clause.indexOf("osgi.serviceloader=\"");
+ if (eq < 0) {
+ continue;
+ }
+ int start = eq + "osgi.serviceloader=\"".length();
+ int end = clause.indexOf('"', start);
+ if (end > start) {
+ result.add(clause.substring(start, end));
+ }
+ }
+ return result;
+ }
+}
diff --git a/all/src/test/java/io/opentelemetry/all/SdkDesignTest.java b/all/src/test/java/io/opentelemetry/all/SdkDesignTest.java
index 4fc4d37da2f..fe2fb0045ea 100644
--- a/all/src/test/java/io/opentelemetry/all/SdkDesignTest.java
+++ b/all/src/test/java/io/opentelemetry/all/SdkDesignTest.java
@@ -6,17 +6,17 @@
package io.opentelemetry.all;
import com.tngtech.archunit.base.DescribedPredicate;
-import com.tngtech.archunit.base.Optional;
-import com.tngtech.archunit.base.PackageMatcher;
import com.tngtech.archunit.core.domain.JavaClass;
import com.tngtech.archunit.core.domain.JavaClasses;
import com.tngtech.archunit.core.domain.JavaMethod;
+import com.tngtech.archunit.core.domain.PackageMatcher;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.lang.syntax.ArchRuleDefinition;
import com.tngtech.archunit.lang.syntax.elements.MethodsShouldConjunction;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.Optional;
import org.junit.jupiter.api.Test;
class SdkDesignTest {
@@ -28,7 +28,7 @@ class SdkDesignTest {
* Ensures that all SDK methods that: - are defined in classes that extend or implement API model
* and are public (to exclude protected builders) - are public (avoids issues with protected
* methods returning classes unavailable to test's CL) - override or implement parent method
- * return only API, Context or generic Java type.
+ * return only API, Context, Common, or generic Java type.
*/
@Test
void sdkImplementationOfApiClassesShouldReturnApiTypeOnly() {
@@ -45,7 +45,11 @@ void sdkImplementationOfApiClassesShouldReturnApiTypeOnly() {
.and(implementOrOverride())
.should()
.haveRawReturnType(
- inPackage("io.opentelemetry.api..", "io.opentelemetry.context..", "java.."))
+ inPackage(
+ "io.opentelemetry.api..",
+ "io.opentelemetry.context..",
+ "io.opentelemetry.common..",
+ "java.."))
.orShould()
.haveRawReturnType("void");
@@ -53,9 +57,9 @@ void sdkImplementationOfApiClassesShouldReturnApiTypeOnly() {
}
static DescribedPredicate super JavaMethod> implementOrOverride() {
- return new DescribedPredicate<>("implement or override a method") {
+ return new DescribedPredicate("implement or override a method") {
@Override
- public boolean apply(JavaMethod input) {
+ public boolean test(JavaMethod input) {
List params = input.getRawParameterTypes();
Class>[] paramsType = new Class>[params.size()];
for (int i = 0, n = params.size(); i < n; i++) {
@@ -78,9 +82,9 @@ public boolean apply(JavaMethod input) {
}
static DescribedPredicate super JavaClass> inPackage(String... requiredPackages) {
- return new DescribedPredicate<>("are in " + Arrays.toString(requiredPackages)) {
+ return new DescribedPredicate("are in " + Arrays.toString(requiredPackages)) {
@Override
- public boolean apply(JavaClass member) {
+ public boolean test(JavaClass member) {
for (String requiredPackage : requiredPackages) {
if (PackageMatcher.of(requiredPackage).matches(member.getPackageName())) {
return true;
diff --git a/all/src/test/java/io/opentelemetry/extension/noopapi/NoopOpenTelemetryTest.java b/all/src/test/java/io/opentelemetry/extension/noopapi/NoopOpenTelemetryTest.java
deleted file mode 100644
index 422373a9878..00000000000
--- a/all/src/test/java/io/opentelemetry/extension/noopapi/NoopOpenTelemetryTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright The OpenTelemetry Authors
- * SPDX-License-Identifier: Apache-2.0
- */
-
-package io.opentelemetry.extension.noopapi;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-import io.opentelemetry.api.common.AttributeKey;
-import io.opentelemetry.api.common.Attributes;
-import io.opentelemetry.api.trace.Span;
-import io.opentelemetry.api.trace.SpanBuilder;
-import io.opentelemetry.api.trace.SpanContext;
-import io.opentelemetry.api.trace.SpanKind;
-import io.opentelemetry.api.trace.TraceFlags;
-import io.opentelemetry.api.trace.TraceState;
-import io.opentelemetry.context.Context;
-import io.opentelemetry.context.Scope;
-import java.util.concurrent.TimeUnit;
-import org.junit.jupiter.api.Test;
-
-class NoopOpenTelemetryTest {
-
- private static final SpanContext SPAN_CONTEXT =
- SpanContext.create(
- "00000000000000000000000000000061",
- "0000000000000061",
- TraceFlags.getDefault(),
- TraceState.getDefault());
-
- @Test
- void contextNoOp() {
- // Context.root() is not a no-op Context, so the default context is never root.
- Context context = Context.current();
- assertThat(context).isNotSameAs(Context.root());
- // No allocations
- assertThat(context.with(Span.wrap(SPAN_CONTEXT))).isSameAs(context);
- assertThat(SPAN_CONTEXT.isValid()).isTrue();
- try (Scope ignored = Context.current().with(Span.wrap(SPAN_CONTEXT)).makeCurrent()) {
- // No context mounted, so always an invalid span.
- assertThat(Span.fromContext(Context.current()).getSpanContext().isValid()).isFalse();
- }
- }
-
- @Test
- void tracerNoOp() {
- SpanBuilder span1 = NoopOpenTelemetry.getInstance().getTracer("test").spanBuilder("test");
- SpanBuilder span2 = NoopOpenTelemetry.getInstance().getTracer("test").spanBuilder("test");
- // No allocations
- assertThat(span1).isSameAs(span2);
-
- // No crash
- span1.setParent(Context.current());
- span1.setNoParent();
- span1.addLink(SPAN_CONTEXT);
- span1.addLink(SPAN_CONTEXT, Attributes.empty());
- span1.setAttribute("key", "value");
- span1.setAttribute("key", 1L);
- span1.setAttribute("key", 1.0);
- span1.setAttribute("key", true);
- span1.setAttribute(AttributeKey.stringKey("key"), "value");
- span1.setSpanKind(SpanKind.CLIENT);
- span1.setStartTimestamp(1, TimeUnit.DAYS);
-
- // No allocations
- assertThat(span1.startSpan()).isSameAs(Span.getInvalid());
- }
-}
diff --git a/animal-sniffer-signature/build.gradle.kts b/animal-sniffer-signature/build.gradle.kts
new file mode 100644
index 00000000000..57962a6ca2d
--- /dev/null
+++ b/animal-sniffer-signature/build.gradle.kts
@@ -0,0 +1,51 @@
+import ru.vyarus.gradle.plugin.animalsniffer.info.SignatureInfoTask
+import ru.vyarus.gradle.plugin.animalsniffer.signature.BuildSignatureTask
+
+plugins {
+ id("otel.java-conventions")
+ id("ru.vyarus.animalsniffer")
+}
+
+description = "Build tool to generate the Animal Sniffer Android signature"
+otelJava.moduleName.set("io.opentelemetry.internal.animalsniffer")
+otelJava.requireSuppressWarningsExplanation.set(false)
+otelJava.osgiEnabled.set(false)
+
+val signatureJar = configurations.create("signatureJar") {
+ isCanBeConsumed = false
+ isCanBeResolved = false
+}
+val signatureJarClasspath = configurations.create("signatureJarClasspath") {
+ isCanBeConsumed = false
+ isCanBeResolved = true
+ extendsFrom(signatureJar)
+}
+val generatedSignature = configurations.create("generatedSignature") {
+ isCanBeConsumed = true
+ isCanBeResolved = false
+}
+
+dependencies {
+ signature("com.toasttab.android:gummy-bears-api-23:0.16.0@signature")
+ signatureJar("com.android.tools:desugar_jdk_libs")
+}
+
+val signatureSimpleName = "android.signature"
+val signatureBuilderTask = tasks.register("buildSignature", BuildSignatureTask::class.java) {
+ files(signatureJarClasspath) // All the jar files here will be added to the signature file.
+ signatures(configurations.signature) // We'll extend from the existing signatures added to this config.
+ outputName = signatureSimpleName // Name for the generated signature file.
+}
+
+// Exposing the "generatedSignature" consumable config to be used in other subprojects
+artifacts {
+ add("generatedSignature", project.provider { File(signatureBuilderTask.get().outputs.files.singleFile, signatureSimpleName) }) {
+ builtBy(signatureBuilderTask)
+ }
+}
+
+// Utility task to show what's in the signature file
+tasks.register("printSignature", SignatureInfoTask::class.java) {
+ signature = signatureBuilderTask.get().outputFiles
+ depth = 1
+}
diff --git a/api/all/README.md b/api/all/README.md
index a8093e10002..86c14664fdd 100644
--- a/api/all/README.md
+++ b/api/all/README.md
@@ -1,22 +1,7 @@
# OpenTelemetry API
-[![Javadocs][javadoc-image]][javadoc-url]
+#### API Misuse Logging
-* The code in this module is the implementation of stable OpenTelemetry signals.
-* Semantic Conventions for OpenTelemetry are in the `opentelemetry-semconv` module.
-* The default implementation of the interfaces in this module is in the OpenTelemetry SDK module.
-* The interfaces in this directory can be implemented to create alternative
- implementations of the OpenTelemetry library.
+API misuse information is logged under logger named `io.opentelemetry.ApiUsageLogging`.
-[javadoc-image]: https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api.svg
-[javadoc-url]: https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api
-
----
-#### Running micro-benchmarks
-From the root of the repo run `./gradlew clean :api:jmh` to run all the benchmarks
-or run `./gradlew clean :api:jmh -PjmhIncludeSingleClass=`
-to run a specific benchmark class.
-
----
-#### Logging API mis-use
-Define `logging.level.io.opentelemetry.ApiUsageLogging=TRACE` to enable TRACE logging for invalid API calls.
+To access, enable `FINEST` level logs.
diff --git a/api/all/build.gradle.kts b/api/all/build.gradle.kts
index 4ad64f607d3..8dfd98c3748 100644
--- a/api/all/build.gradle.kts
+++ b/api/all/build.gradle.kts
@@ -8,13 +8,20 @@ plugins {
description = "OpenTelemetry API"
otelJava.moduleName.set("io.opentelemetry.api")
+otelJava.requireSuppressWarningsExplanation.set(false)
base.archivesName.set("opentelemetry-api")
+// These packages cannot be compileOnly dependencies (api:incubator depends on api:all, creating a
+// circular dependency; sdk:autoconfigure is in a different module family). Declare them as optional
+// imports without a version constraint so OSGi wires them if present but does not require them.
+otelJava.osgiUnversionedOptionalPackages.set(listOf("io.opentelemetry.sdk.autoconfigure", "io.opentelemetry.api.incubator", "io.opentelemetry.api.incubator.internal"))
dependencies {
api(project(":context"))
annotationProcessor("com.google.auto.value:auto-value")
+ testImplementation(project(":api:testing-internal"))
+
testImplementation("edu.berkeley.cs.jqf:jqf-fuzz")
testImplementation("com.google.guava:guava-testlib")
}
diff --git a/api/all/src/jmh/java/io/opentelemetry/api/baggage/propagation/W3CBaggagePropagatorBenchmark.java b/api/all/src/jmh/java/io/opentelemetry/api/baggage/propagation/W3CBaggagePropagatorBenchmark.java
index 5f24acee5b5..a348e69e19e 100644
--- a/api/all/src/jmh/java/io/opentelemetry/api/baggage/propagation/W3CBaggagePropagatorBenchmark.java
+++ b/api/all/src/jmh/java/io/opentelemetry/api/baggage/propagation/W3CBaggagePropagatorBenchmark.java
@@ -34,19 +34,18 @@ public class W3CBaggagePropagatorBenchmark {
static {
List baggages =
IntStream.range(0, 100)
- .mapToObj(
- i ->
- "key"
- + i
- + " = value"
- + i
- + ";metaKey"
- + i
- + "=\tmetaVal"
- + i
- + ",broken)key"
- + i
- + "=value")
+ .mapToObj(i ->
+ "key"
+ + i
+ + " = value"
+ + i
+ + ";metaKey"
+ + i
+ + "=\tmetaVal"
+ + i
+ + ",broken)key"
+ + i
+ + "=value")
.collect(Collectors.toList());
SMALL_BAGGAGE = Collections.singletonMap("baggage", String.join(",", baggages.subList(0, 5)));
LARGE_BAGGAGE = Collections.singletonMap("baggage", String.join(",", baggages));
diff --git a/api/all/src/jmh/java/io/opentelemetry/api/common/AttributesBenchmark.java b/api/all/src/jmh/java/io/opentelemetry/api/common/AttributesBenchmark.java
index e0c7de41bf5..8b3d16425fc 100644
--- a/api/all/src/jmh/java/io/opentelemetry/api/common/AttributesBenchmark.java
+++ b/api/all/src/jmh/java/io/opentelemetry/api/common/AttributesBenchmark.java
@@ -25,11 +25,30 @@ public class AttributesBenchmark {
// pre-allocate the keys & values to remove one possible confounding factor
private static final List> keys = new ArrayList<>(10);
private static final List values = new ArrayList<>(10);
+ private static final List attributes = new ArrayList<>();
static {
for (int i = 0; i < 10; i++) {
keys.add(AttributeKey.stringKey("key" + i));
values.add("value" + i);
+ AttributesBuilder builder = Attributes.builder();
+ for (int j = 0; j <= i; j++) {
+ builder.put(keys.get(j), values.get(j));
+ }
+ attributes.add(builder.build());
+ }
+ }
+
+ @Benchmark
+ @BenchmarkMode({Mode.AverageTime})
+ @Fork(1)
+ @Measurement(iterations = 15, time = 1)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ @Warmup(iterations = 5, time = 1)
+ @SuppressWarnings("ReturnValueIgnored")
+ public void computeHashCode() {
+ for (Attributes attributes : attributes) {
+ attributes.hashCode();
}
}
diff --git a/api/all/src/main/java/io/opentelemetry/api/DefaultOpenTelemetry.java b/api/all/src/main/java/io/opentelemetry/api/DefaultOpenTelemetry.java
index 6267a612933..137a805b73e 100644
--- a/api/all/src/main/java/io/opentelemetry/api/DefaultOpenTelemetry.java
+++ b/api/all/src/main/java/io/opentelemetry/api/DefaultOpenTelemetry.java
@@ -46,4 +46,9 @@ public MeterProvider getMeterProvider() {
public ContextPropagators getPropagators() {
return propagators;
}
+
+ @Override
+ public String toString() {
+ return "DefaultOpenTelemetry{" + "propagators=" + propagators + "}";
+ }
}
diff --git a/api/all/src/main/java/io/opentelemetry/api/GlobalOpenTelemetry.java b/api/all/src/main/java/io/opentelemetry/api/GlobalOpenTelemetry.java
index 43f2c7454bd..33e8a3a89df 100644
--- a/api/all/src/main/java/io/opentelemetry/api/GlobalOpenTelemetry.java
+++ b/api/all/src/main/java/io/opentelemetry/api/GlobalOpenTelemetry.java
@@ -6,50 +6,76 @@
package io.opentelemetry.api;
import io.opentelemetry.api.internal.GuardedBy;
+import io.opentelemetry.api.internal.IncubatingUtil;
+import io.opentelemetry.api.logs.LoggerProvider;
import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.api.metrics.MeterBuilder;
import io.opentelemetry.api.metrics.MeterProvider;
import io.opentelemetry.api.trace.Tracer;
import io.opentelemetry.api.trace.TracerBuilder;
import io.opentelemetry.api.trace.TracerProvider;
+import io.opentelemetry.common.impl.ApiUsageLogger;
+import io.opentelemetry.common.impl.ConfigUtil;
import io.opentelemetry.context.propagation.ContextPropagators;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.util.Objects;
+import java.util.function.Supplier;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
/**
- * A global singleton for the entrypoint to telemetry functionality for tracing, metrics and
- * baggage.
+ * Provides access to a global singleton {@link OpenTelemetry} instance.
*
- *
If using the OpenTelemetry SDK, you may want to instantiate the {@link OpenTelemetry} to
- * provide configuration, for example of {@code Resource} or {@code Sampler}. See {@code
- * OpenTelemetrySdk} and {@code OpenTelemetrySdk.builder} for information on how to construct the
- * SDK's {@link OpenTelemetry} implementation.
+ *
WARNING: To avoid inherent complications around initialization ordering, it's best-practice to
+ * pass around instances of {@link OpenTelemetry} rather than using {@link GlobalOpenTelemetry}.
+ * However, the OpenTelemetry javagent makes the {@link OpenTelemetry} instance it installs
+ * available via {@link GlobalOpenTelemetry}. As a result, {@link GlobalOpenTelemetry} plays an
+ * important role in native instrumentation and application custom instrumentation.
*
- *
WARNING: Due to the inherent complications around initialization order involving this class
- * and its single global instance, we strongly recommend *not* using GlobalOpenTelemetry unless you
- * have a use-case that absolutely requires it. Please favor using instances of OpenTelemetry
- * wherever possible.
+ *
Native instrumentation should use {@link #getOrNoop()} as the default {@link OpenTelemetry}
+ * instance, and expose APIs for setting a custom instance. This results in the following behavior:
*
- *
If you are using the OpenTelemetry javaagent, it is generally best to only call
- * GlobalOpenTelemetry.get() once, and then pass the resulting reference where you need to use it.
+ *
+ *
If the OpenTelemetry javaagent is installed, the native instrumentation will default to the
+ * {@link OpenTelemetry} it installs.
+ *
If the OpenTelemetry javaagent is not installed, the native instrumentation will default to
+ * a noop instance.
+ *
If the user explicitly sets a custom instance, it will be used, regardless of whether or
+ * not the OpenTelemetry javaagent is installed.
+ *
Applications with custom instrumentation should call {@link #isSet()} once during
+ * initialization to access the javaagent instance or initialize (e.g. {@code isSet() ?
+ * GlobalOpenTelemetry.get() : initializeSdk()}), and pass the resulting instance around manually
+ * (or with dependency injection) to install custom instrumentation. This results in the following
+ * behavior:
+ *
+ *
+ *
If the OpenTelemetry javaagent is installed, custom instrumentation will use the {@link
+ * OpenTelemetry} it installs.
+ *
If the OpenTelemetry javaagent is not installed, custom instrumentation will use an {@link
+ * OpenTelemetry} instance initialized by the application.
+ *
*/
-// We intentionally assign to be use for error reporting.
+// We intentionally assign for error reporting.
@SuppressWarnings("StaticAssignmentOfThrowable")
public final class GlobalOpenTelemetry {
+ private static final String GLOBAL_AUTOCONFIGURE_ENABLED_PROPERTY =
+ "otel.java.global-autoconfigure.enabled";
+
private static final Logger logger = Logger.getLogger(GlobalOpenTelemetry.class.getName());
private static final Object mutex = new Object();
- @Nullable private static volatile ObfuscatedOpenTelemetry globalOpenTelemetry;
+ @SuppressWarnings("NonFinalStaticField")
+ @Nullable
+ private static volatile OpenTelemetry globalOpenTelemetry;
+ @SuppressWarnings("NonFinalStaticField")
@GuardedBy("mutex")
@Nullable
private static Throwable setGlobalCaller;
@@ -57,10 +83,60 @@ public final class GlobalOpenTelemetry {
private GlobalOpenTelemetry() {}
/**
- * Returns the registered global {@link OpenTelemetry}.
+ * Returns the registered global {@link OpenTelemetry} if set, or else {@link
+ * OpenTelemetry#noop()}.
+ *
+ *
NOTE: if the global instance is set, the response is obfuscated to prevent callers from
+ * casting to SDK implementation instances and inappropriately accessing non-instrumentation APIs.
+ *
+ *
NOTE: This does not result in the {@link #set(OpenTelemetry)} side effects of {@link
+ * #get()}.
+ *
+ *
Native instrumentation should use this method to initialize their default {@link
+ * OpenTelemetry} instance. See class javadoc for more details.
+ *
+ * @since 1.57.0
+ */
+ public static OpenTelemetry getOrNoop() {
+ synchronized (mutex) {
+ return globalOpenTelemetry != null ? globalOpenTelemetry : OpenTelemetry.noop();
+ }
+ }
+
+ /**
+ * Returns {@code true} if {@link GlobalOpenTelemetry} is set, otherwise {@code false}.
+ *
+ *
Application custom instrumentation should use this method during initialization. See class
+ * javadoc for more details.
+ *
+ * @since 1.57.0
+ */
+ public static boolean isSet() {
+ synchronized (mutex) {
+ return globalOpenTelemetry != null;
+ }
+ }
+
+ /**
+ * Returns the registered global {@link OpenTelemetry} if set, else calls {@link
+ * GlobalOpenTelemetry#set(OpenTelemetry)} with a no-op {@link OpenTelemetry} instance and returns
+ * that.
+ *
+ *
NOTE: all returned instanced are obfuscated to prevent callers from casting to SDK
+ * implementation instances and inappropriately accessing non-instrumentation APIs.
+ *
+ *
Native instrumentations should use {@link #getOrNoop()} instead. See class javadoc for more
+ * details.
+ *
+ *
Application custom instrumentation should use {@link #isSet()} and only call this if the
+ * response is {@code true}. See class javadoc for more details.
+ *
+ *
If the global instance has not been set, and {@code
+ * io.opentelemetry:opentelemetry-sdk-extension-autoconfigure} is present, and {@value
+ * GLOBAL_AUTOCONFIGURE_ENABLED_PROPERTY} is {@code true}, the global instance will be set to an
+ * autoconfigured instance instead of {@link OpenTelemetry#noop()}.
*
- * @throws IllegalStateException if a provider has been specified by system property using the
- * interface FQCN but the specified provider cannot be found.
+ * @throws IllegalStateException if autoconfigure initialization is triggered and fails.
*/
public static OpenTelemetry get() {
OpenTelemetry openTelemetry = globalOpenTelemetry;
@@ -75,7 +151,7 @@ public static OpenTelemetry get() {
}
set(OpenTelemetry.noop());
- return OpenTelemetry.noop();
+ openTelemetry = Objects.requireNonNull(globalOpenTelemetry);
}
}
}
@@ -94,6 +170,7 @@ public static OpenTelemetry get() {
* OpenTelemetrySdk.builder().buildAndRegisterGlobal()} instead of calling this method directly.
*/
public static void set(OpenTelemetry openTelemetry) {
+ Objects.requireNonNull(openTelemetry, "openTelemetry");
synchronized (mutex) {
if (globalOpenTelemetry != null) {
throw new IllegalStateException(
@@ -103,11 +180,27 @@ public static void set(OpenTelemetry openTelemetry) {
+ "instead. Previous invocation set to cause of this exception.",
setGlobalCaller);
}
- globalOpenTelemetry = new ObfuscatedOpenTelemetry(openTelemetry);
+ globalOpenTelemetry = obfuscatedOpenTelemetry(openTelemetry);
setGlobalCaller = new Throwable();
}
}
+ /**
+ * Sets the {@link OpenTelemetry} that should be the global instance.
+ *
+ *
This method calls the given {@code supplier} and calls {@link #set(OpenTelemetry)}, all
+ * while holding the {@link GlobalOpenTelemetry} mutex.
+ *
+ * @since 1.52.0
+ */
+ public static void set(Supplier supplier) {
+ Objects.requireNonNull(supplier, "supplier");
+ synchronized (mutex) {
+ OpenTelemetry openTelemetry = supplier.get();
+ set(openTelemetry);
+ }
+ }
+
/** Returns the globally registered {@link TracerProvider}. */
public static TracerProvider getTracerProvider() {
return get().getTracerProvider();
@@ -123,6 +216,10 @@ public static TracerProvider getTracerProvider() {
* @return a tracer instance.
*/
public static Tracer getTracer(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "getTracer", "instrumentationScopeName");
+ return OpenTelemetry.noop().getTracer("otel.global.opentelemetry");
+ }
return get().getTracer(instrumentationScopeName);
}
@@ -140,6 +237,14 @@ public static Tracer getTracer(String instrumentationScopeName) {
*/
public static Tracer getTracer(
String instrumentationScopeName, String instrumentationScopeVersion) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "getTracer", "instrumentationScopeName");
+ return OpenTelemetry.noop().getTracer("otel.global.opentelemetry");
+ }
+ if (instrumentationScopeVersion == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "getTracer", "instrumentationScopeVersion");
+ return OpenTelemetry.noop().getTracer("otel.global.opentelemetry");
+ }
return get().getTracer(instrumentationScopeName, instrumentationScopeVersion);
}
@@ -154,6 +259,10 @@ public static Tracer getTracer(
* @since 1.4.0
*/
public static TracerBuilder tracerBuilder(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "tracerBuilder", "instrumentationScopeName");
+ return TracerProvider.noop().tracerBuilder("otel.global.opentelemetry");
+ }
return get().tracerBuilder(instrumentationScopeName);
}
@@ -177,6 +286,10 @@ public static MeterProvider getMeterProvider() {
* @since 1.10.0
*/
public static Meter getMeter(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "getMeter", "instrumentationScopeName");
+ return MeterProvider.noop().get("otel.global.opentelemetry");
+ }
return get().getMeter(instrumentationScopeName);
}
@@ -191,6 +304,10 @@ public static Meter getMeter(String instrumentationScopeName) {
* @since 1.10.0
*/
public static MeterBuilder meterBuilder(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "meterBuilder", "instrumentationScopeName");
+ return MeterProvider.noop().meterBuilder("otel.global.opentelemetry");
+ }
return get().meterBuilder(instrumentationScopeName);
}
@@ -219,15 +336,28 @@ private static OpenTelemetry maybeAutoConfigureAndSetGlobal() {
return null;
}
+ // If autoconfigure module is present but global autoconfigure disabled log a warning and return
+ boolean globalAutoconfigureEnabled =
+ Boolean.parseBoolean(ConfigUtil.getString(GLOBAL_AUTOCONFIGURE_ENABLED_PROPERTY, "false"));
+ if (!globalAutoconfigureEnabled) {
+ logger.log(
+ Level.INFO,
+ "AutoConfiguredOpenTelemetrySdk found on classpath but automatic configuration is disabled."
+ + " To enable, run your JVM with -D"
+ + GLOBAL_AUTOCONFIGURE_ENABLED_PROPERTY
+ + "=true");
+ return null;
+ }
+
try {
Method initialize = openTelemetrySdkAutoConfiguration.getMethod("initialize");
Object autoConfiguredSdk = initialize.invoke(null);
Method getOpenTelemetrySdk =
openTelemetrySdkAutoConfiguration.getMethod("getOpenTelemetrySdk");
- return (OpenTelemetry) getOpenTelemetrySdk.invoke(autoConfiguredSdk);
+ return obfuscatedOpenTelemetry((OpenTelemetry) getOpenTelemetrySdk.invoke(autoConfiguredSdk));
} catch (NoSuchMethodException | IllegalAccessException e) {
throw new IllegalStateException(
- "OpenTelemetrySdkAutoConfiguration detected on classpath "
+ "AutoConfiguredOpenTelemetrySdk detected on classpath "
+ "but could not invoke initialize method. This is a bug in OpenTelemetry.",
e);
} catch (InvocationTargetException t) {
@@ -239,6 +369,14 @@ private static OpenTelemetry maybeAutoConfigureAndSetGlobal() {
}
}
+ private static OpenTelemetry obfuscatedOpenTelemetry(OpenTelemetry openTelemetry) {
+ OpenTelemetry incubating = IncubatingUtil.obfuscatedOpenTelemetryIfIncubating(openTelemetry);
+ if (incubating != null) {
+ return incubating;
+ }
+ return new ObfuscatedOpenTelemetry(openTelemetry);
+ }
+
/**
* Static global instances are obfuscated when they are returned from the API to prevent users
* from casting them to their SDK-specific implementation. For example, we do not want users to
@@ -263,6 +401,11 @@ public MeterProvider getMeterProvider() {
return delegate.getMeterProvider();
}
+ @Override
+ public LoggerProvider getLogsBridge() {
+ return delegate.getLogsBridge();
+ }
+
@Override
public ContextPropagators getPropagators() {
return delegate.getPropagators();
@@ -270,6 +413,11 @@ public ContextPropagators getPropagators() {
@Override
public TracerBuilder tracerBuilder(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(
+ OpenTelemetry.class, "tracerBuilder", "instrumentationScopeName");
+ return TracerProvider.noop().tracerBuilder("otel.global.opentelemetry");
+ }
return delegate.tracerBuilder(instrumentationScopeName);
}
}
diff --git a/api/all/src/main/java/io/opentelemetry/api/OpenTelemetry.java b/api/all/src/main/java/io/opentelemetry/api/OpenTelemetry.java
index 9dbe5c7da3d..f0a52712474 100644
--- a/api/all/src/main/java/io/opentelemetry/api/OpenTelemetry.java
+++ b/api/all/src/main/java/io/opentelemetry/api/OpenTelemetry.java
@@ -5,13 +5,16 @@
package io.opentelemetry.api;
+import io.opentelemetry.api.logs.LoggerProvider;
import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.api.metrics.MeterBuilder;
import io.opentelemetry.api.metrics.MeterProvider;
import io.opentelemetry.api.trace.Tracer;
import io.opentelemetry.api.trace.TracerBuilder;
import io.opentelemetry.api.trace.TracerProvider;
+import io.opentelemetry.common.impl.ApiUsageLogger;
import io.opentelemetry.context.propagation.ContextPropagators;
+import java.util.Objects;
/**
* The entrypoint to telemetry functionality for tracing, metrics and baggage.
@@ -36,6 +39,7 @@ static OpenTelemetry noop() {
* otherwise.
*/
static OpenTelemetry propagating(ContextPropagators propagators) {
+ Objects.requireNonNull(propagators, "propagators");
return DefaultOpenTelemetry.getPropagating(propagators);
}
@@ -51,6 +55,10 @@ static OpenTelemetry propagating(ContextPropagators propagators) {
* @return a tracer instance.
*/
default Tracer getTracer(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "getTracer", "instrumentationScopeName");
+ return OpenTelemetry.noop().getTracer("otel.global.opentelemetry");
+ }
return getTracerProvider().get(instrumentationScopeName);
}
@@ -64,6 +72,14 @@ default Tracer getTracer(String instrumentationScopeName) {
* @return a tracer instance.
*/
default Tracer getTracer(String instrumentationScopeName, String instrumentationScopeVersion) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "getTracer", "instrumentationScopeName");
+ return OpenTelemetry.noop().getTracer("otel.global.opentelemetry");
+ }
+ if (instrumentationScopeVersion == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "getTracer", "instrumentationScopeVersion");
+ return OpenTelemetry.noop().getTracer("otel.global.opentelemetry");
+ }
return getTracerProvider().get(instrumentationScopeName, instrumentationScopeVersion);
}
@@ -76,6 +92,10 @@ default Tracer getTracer(String instrumentationScopeName, String instrumentation
* @since 1.4.0
*/
default TracerBuilder tracerBuilder(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "tracerBuilder", "instrumentationScopeName");
+ return OpenTelemetry.noop().tracerBuilder("otel.global.opentelemetry");
+ }
return getTracerProvider().tracerBuilder(instrumentationScopeName);
}
@@ -98,11 +118,15 @@ default MeterProvider getMeterProvider() {
* @since 1.10.0
*/
default Meter getMeter(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "getMeter", "instrumentationScopeName");
+ return OpenTelemetry.noop().getMeter("otel.global.opentelemetry");
+ }
return getMeterProvider().get(instrumentationScopeName);
}
/**
- * Creates a {@link MeterBuilder} for a named {@link Tracer} instance.
+ * Creates a {@link MeterBuilder} for a named {@link Meter} instance.
*
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
* the instrumentation library, package, or fully qualified class name. Must not be null.
@@ -110,9 +134,26 @@ default Meter getMeter(String instrumentationScopeName) {
* @since 1.10.0
*/
default MeterBuilder meterBuilder(String instrumentationScopeName) {
+ if (instrumentationScopeName == null) {
+ ApiUsageLogger.logNullParam(OpenTelemetry.class, "meterBuilder", "instrumentationScopeName");
+ return OpenTelemetry.noop().meterBuilder("otel.global.opentelemetry");
+ }
return getMeterProvider().meterBuilder(instrumentationScopeName);
}
+ /**
+ * Returns the {@link LoggerProvider} for bridging logs into OpenTelemetry.
+ *
+ *
The OpenTelemetry logs bridge API exists to enable bridging logs from other log frameworks
+ * (e.g. SLF4J, Log4j, JUL, Logback, etc) into OpenTelemetry and is NOT a replacement log
+ * API.
+ *
+ * @since 1.27.0
+ */
+ default LoggerProvider getLogsBridge() {
+ return LoggerProvider.noop();
+ }
+
/** Returns the {@link ContextPropagators} for this {@link OpenTelemetry}. */
ContextPropagators getPropagators();
}
diff --git a/api/all/src/main/java/io/opentelemetry/api/baggage/Baggage.java b/api/all/src/main/java/io/opentelemetry/api/baggage/Baggage.java
index 5dd2924d432..3b6ae74710f 100644
--- a/api/all/src/main/java/io/opentelemetry/api/baggage/Baggage.java
+++ b/api/all/src/main/java/io/opentelemetry/api/baggage/Baggage.java
@@ -5,6 +5,7 @@
package io.opentelemetry.api.baggage;
+import io.opentelemetry.common.impl.ApiUsageLogger;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.ImplicitContextKeyed;
import java.util.Map;
@@ -52,6 +53,10 @@ static Baggage current() {
* Baggage} if there is no baggage in the context.
*/
static Baggage fromContext(Context context) {
+ if (context == null) {
+ ApiUsageLogger.logNullParam(Baggage.class, "fromContext", "context");
+ return empty();
+ }
Baggage baggage = context.get(BaggageContextKey.KEY);
return baggage != null ? baggage : empty();
}
@@ -62,11 +67,19 @@ static Baggage fromContext(Context context) {
*/
@Nullable
static Baggage fromContextOrNull(Context context) {
+ if (context == null) {
+ ApiUsageLogger.logNullParam(Baggage.class, "fromContextOrNull", "context");
+ return null;
+ }
return context.get(BaggageContextKey.KEY);
}
@Override
default Context storeInContext(Context context) {
+ if (context == null) {
+ ApiUsageLogger.logNullParam(Baggage.class, "storeInContext", "context");
+ return Context.root();
+ }
return context.with(BaggageContextKey.KEY, this);
}
@@ -99,4 +112,26 @@ default boolean isEmpty() {
* be set to not use an implicit parent, so any parent assignment must be done manually.
*/
BaggageBuilder toBuilder();
+
+ /**
+ * Returns the {@code BaggageEntry} associated with the given key.
+ *
+ * @param entryKey entry key to return the {@code BaggageEntry} for, or {@code null} if no {@code
+ * Entry} with the given {@code entryKey} is in this {@code Baggage}.
+ * @since 1.43.0
+ */
+ @Nullable
+ default BaggageEntry getEntry(String entryKey) {
+ if (entryKey == null) {
+ ApiUsageLogger.logNullParam(Baggage.class, "getEntry", "entryKey");
+ return null;
+ }
+ BaggageEntry[] result = new BaggageEntry[] {null};
+ forEach((key, entry) -> {
+ if (entryKey.equals(key)) {
+ result[0] = entry;
+ }
+ });
+ return result[0];
+ }
}
diff --git a/api/all/src/main/java/io/opentelemetry/api/baggage/BaggageBuilder.java b/api/all/src/main/java/io/opentelemetry/api/baggage/BaggageBuilder.java
index 5cf6c7891b3..97268d8db34 100644
--- a/api/all/src/main/java/io/opentelemetry/api/baggage/BaggageBuilder.java
+++ b/api/all/src/main/java/io/opentelemetry/api/baggage/BaggageBuilder.java
@@ -5,6 +5,8 @@
package io.opentelemetry.api.baggage;
+import io.opentelemetry.common.impl.ApiUsageLogger;
+
/**
* A builder of {@link Baggage}.
*
@@ -15,6 +17,10 @@ public interface BaggageBuilder {
/**
* Adds the key/value pair and metadata regardless of whether the key is present.
*
+ *
Per the W3C Baggage spec, a
+ * baggage-name must be a non-empty token. Calls with a {@code null} or empty {@code key}, a
+ * {@code null} {@code value}, or a {@code null} {@code entryMetadata} are silently ignored.
+ *
* @param key the {@code String} key which will be set.
* @param value the {@code String} value to set for the given key.
* @param entryMetadata the {@code BaggageEntryMetadata} metadata to set for the given key.
@@ -30,6 +36,14 @@ public interface BaggageBuilder {
* @return this
*/
default BaggageBuilder put(String key, String value) {
+ if (key == null) {
+ ApiUsageLogger.logNullParam(BaggageBuilder.class, "put", "key");
+ return this;
+ }
+ if (value == null) {
+ ApiUsageLogger.logNullParam(BaggageBuilder.class, "put", "value");
+ return this;
+ }
return put(key, value, BaggageEntryMetadata.empty());
}
diff --git a/api/all/src/main/java/io/opentelemetry/api/baggage/BaggageEntryMetadata.java b/api/all/src/main/java/io/opentelemetry/api/baggage/BaggageEntryMetadata.java
index 56da2b95a06..70867ce11fb 100644
--- a/api/all/src/main/java/io/opentelemetry/api/baggage/BaggageEntryMetadata.java
+++ b/api/all/src/main/java/io/opentelemetry/api/baggage/BaggageEntryMetadata.java
@@ -5,6 +5,7 @@
package io.opentelemetry.api.baggage;
+import io.opentelemetry.common.impl.ApiUsageLogger;
import javax.annotation.concurrent.Immutable;
/**
@@ -19,8 +20,18 @@ static BaggageEntryMetadata empty() {
return ImmutableEntryMetadata.EMPTY;
}
- /** Returns a new {@link BaggageEntryMetadata} with the given value. */
+ /**
+ * Returns a new {@link BaggageEntryMetadata} with the given value.
+ *
+ *
Note that entries are independent of the tracing data that is propagated in the {@link
* io.opentelemetry.context.Context}, such as trace ID.
*/
-// TODO: Add code examples.
@ParametersAreNonnullByDefault
package io.opentelemetry.api.baggage;
diff --git a/api/all/src/main/java/io/opentelemetry/api/baggage/propagation/BaggageCodec.java b/api/all/src/main/java/io/opentelemetry/api/baggage/propagation/BaggageCodec.java
new file mode 100644
index 00000000000..71c8bd875fb
--- /dev/null
+++ b/api/all/src/main/java/io/opentelemetry/api/baggage/propagation/BaggageCodec.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright The OpenTelemetry Authors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package io.opentelemetry.api.baggage.propagation;
+
+import java.io.ByteArrayOutputStream;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Note: This class is based on code from Apache Commons Codec. It is comprised of code from these
+ * classes:
+ *
+ *