├── .clomonitor.yml ├── .editorconfig ├── .fossa.yml ├── .gitattributes ├── .github ├── CODEOWNERS ├── renovate.json5 ├── repository-settings.md ├── scripts │ ├── draft-change-log-entries.sh │ ├── generate-release-contributors.sh │ ├── get-version.sh │ └── use-cla-approved-github-bot.sh └── workflows │ ├── build.yml │ ├── codeql.yml │ ├── fossa.yml │ ├── generate-post-release-pr.yml │ ├── gradle-wrapper-validation.yml │ ├── ossf-scorecard.yml │ ├── prepare-release-branch.yml │ ├── release.yml │ ├── reusable-markdown-link-check.yml │ └── reusable-misspell-check.yml ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── RELEASING.md ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts └── src │ └── main │ └── kotlin │ ├── io │ └── opentelemetry │ │ └── gradle │ │ └── OtelJavaExtension.kt │ ├── otel.animalsniffer-conventions.gradle.kts │ ├── otel.japicmp-conventions.gradle.kts │ ├── otel.java-conventions.gradle.kts │ ├── otel.publish-conventions.gradle.kts │ └── otel.spotless-conventions.gradle.kts ├── buildscripts ├── checkstyle-suppressions.xml ├── checkstyle.xml ├── spotless.license.java └── templates │ └── registry │ ├── incubating_java │ ├── IncubatingSemanticAttributes.java.j2 │ └── weaver.yaml │ └── java │ ├── SemanticAttributes.java.j2 │ └── weaver.yaml ├── dependencyManagement └── build.gradle.kts ├── docs └── apidiffs │ ├── 1.30.0 │ └── opentelemetry-semconv.txt │ ├── 1.31.0_vs_1.30.0 │ └── opentelemetry-semconv.txt │ ├── 1.32.0_vs_1.31.0 │ └── opentelemetry-semconv.txt │ └── current_vs_latest │ └── opentelemetry-semconv.txt ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── semconv-incubating ├── build.gradle.kts ├── gradle.properties └── src │ ├── main │ └── java │ │ └── io │ │ └── opentelemetry │ │ └── semconv │ │ └── incubating │ │ ├── AndroidIncubatingAttributes.java │ │ ├── AppIncubatingAttributes.java │ │ ├── ArtifactIncubatingAttributes.java │ │ ├── AwsIncubatingAttributes.java │ │ ├── AzIncubatingAttributes.java │ │ ├── AzureIncubatingAttributes.java │ │ ├── BrowserIncubatingAttributes.java │ │ ├── CassandraIncubatingAttributes.java │ │ ├── CicdIncubatingAttributes.java │ │ ├── ClientIncubatingAttributes.java │ │ ├── CloudIncubatingAttributes.java │ │ ├── CloudeventsIncubatingAttributes.java │ │ ├── CloudfoundryIncubatingAttributes.java │ │ ├── CodeIncubatingAttributes.java │ │ ├── ContainerIncubatingAttributes.java │ │ ├── CpuIncubatingAttributes.java │ │ ├── CpythonIncubatingAttributes.java │ │ ├── DbIncubatingAttributes.java │ │ ├── DeploymentIncubatingAttributes.java │ │ ├── DestinationIncubatingAttributes.java │ │ ├── DeviceIncubatingAttributes.java │ │ ├── DiskIncubatingAttributes.java │ │ ├── DnsIncubatingAttributes.java │ │ ├── ElasticsearchIncubatingAttributes.java │ │ ├── EnduserIncubatingAttributes.java │ │ ├── ErrorIncubatingAttributes.java │ │ ├── EventIncubatingAttributes.java │ │ ├── ExceptionIncubatingAttributes.java │ │ ├── FaasIncubatingAttributes.java │ │ ├── FeatureFlagIncubatingAttributes.java │ │ ├── FileIncubatingAttributes.java │ │ ├── GcpIncubatingAttributes.java │ │ ├── GenAiIncubatingAttributes.java │ │ ├── GeoIncubatingAttributes.java │ │ ├── GoIncubatingAttributes.java │ │ ├── GraphqlIncubatingAttributes.java │ │ ├── HerokuIncubatingAttributes.java │ │ ├── HostIncubatingAttributes.java │ │ ├── HttpIncubatingAttributes.java │ │ ├── HwIncubatingAttributes.java │ │ ├── JvmIncubatingAttributes.java │ │ ├── K8sIncubatingAttributes.java │ │ ├── LinuxIncubatingAttributes.java │ │ ├── LogIncubatingAttributes.java │ │ ├── MessageIncubatingAttributes.java │ │ ├── MessagingIncubatingAttributes.java │ │ ├── NetIncubatingAttributes.java │ │ ├── NetworkIncubatingAttributes.java │ │ ├── NodejsIncubatingAttributes.java │ │ ├── OciIncubatingAttributes.java │ │ ├── OpentracingIncubatingAttributes.java │ │ ├── OsIncubatingAttributes.java │ │ ├── OtelIncubatingAttributes.java │ │ ├── OtherIncubatingAttributes.java │ │ ├── PeerIncubatingAttributes.java │ │ ├── PoolIncubatingAttributes.java │ │ ├── ProcessIncubatingAttributes.java │ │ ├── ProfileIncubatingAttributes.java │ │ ├── RpcIncubatingAttributes.java │ │ ├── SecurityRuleIncubatingAttributes.java │ │ ├── ServerIncubatingAttributes.java │ │ ├── ServiceIncubatingAttributes.java │ │ ├── SessionIncubatingAttributes.java │ │ ├── SourceIncubatingAttributes.java │ │ ├── SystemIncubatingAttributes.java │ │ ├── TelemetryIncubatingAttributes.java │ │ ├── TestIncubatingAttributes.java │ │ ├── ThreadIncubatingAttributes.java │ │ ├── TlsIncubatingAttributes.java │ │ ├── UrlIncubatingAttributes.java │ │ ├── UserAgentIncubatingAttributes.java │ │ ├── UserIncubatingAttributes.java │ │ ├── V8jsIncubatingAttributes.java │ │ ├── VcsIncubatingAttributes.java │ │ └── WebengineIncubatingAttributes.java │ └── test │ └── java │ └── io │ └── opentelemetry │ └── semconv │ └── incubating │ └── IncubatingAvailabilityTest.java ├── semconv ├── build.gradle.kts └── src │ ├── main │ └── java │ │ └── io │ │ └── opentelemetry │ │ └── semconv │ │ ├── AttributeKeyTemplate.java │ │ ├── ClientAttributes.java │ │ ├── ErrorAttributes.java │ │ ├── ExceptionAttributes.java │ │ ├── HttpAttributes.java │ │ ├── JvmAttributes.java │ │ ├── NetworkAttributes.java │ │ ├── OtelAttributes.java │ │ ├── SchemaUrls.java │ │ ├── ServerAttributes.java │ │ ├── ServiceAttributes.java │ │ ├── TelemetryAttributes.java │ │ ├── UrlAttributes.java │ │ └── UserAgentAttributes.java │ └── test │ └── java │ └── io │ └── opentelemetry │ └── semconv │ ├── AttributeKeyTemplateTest.java │ └── AvailabilityTest.java └── settings.gradle.kts /.clomonitor.yml: -------------------------------------------------------------------------------- 1 | # see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions 2 | exemptions: 3 | - check: artifacthub_badge 4 | reason: "Artifact Hub doesn't support Java packages" 5 | - check: signed_releases 6 | reason: "Maven central releases are signed and there are no GitHub release artifacts" 7 | - check: openssf_badge 8 | reason: "ETOOMANYBADGES, but the work has been done: https://www.bestpractices.dev/projects/10003" 9 | -------------------------------------------------------------------------------- /.fossa.yml: -------------------------------------------------------------------------------- 1 | version: 3 2 | 3 | targets: 4 | only: 5 | - type: gradle 6 | 7 | experimental: 8 | gradle: 9 | configurations-only: 10 | # consumer will only be exposed to these dependencies 11 | - runtimeClasspath 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.bat text eol=crlf 4 | *.cmd text eol=crlf 5 | 6 | *.jar -text 7 | *.png -text 8 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Code owners file. 2 | # This file controls who is tagged for review for any given pull request. 3 | 4 | # For anything not explicitly taken by someone else: 5 | * @open-telemetry/java-approvers @open-telemetry/java-instrumentation-approvers 6 | -------------------------------------------------------------------------------- /.github/renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | $schema: 'https://docs.renovatebot.com/renovate-schema.json', 3 | extends: [ 4 | 'config:best-practices', 5 | 'helpers:pinGitHubActionDigestsToSemver', 6 | ], 7 | packageRules: [ 8 | { 9 | // this is to reduce the number of renovate PRs by consolidating them into a weekly batch 10 | matchManagers: [ 11 | 'github-actions', 12 | ], 13 | extends: [ 14 | 'schedule:weekly', 15 | ], 16 | groupName: 'github actions', 17 | }, 18 | { 19 | // pin opentelemetry-api dependency to: avoid churn, for conservative api version requirement, 20 | // and because opentelemetry-api is a compileOnly dependency 21 | matchPackageNames: [ 22 | 'io.opentelemetry:opentelemetry-api', 23 | ], 24 | matchCurrentVersion: '1.33.0', 25 | enabled: false, 26 | }, 27 | ], 28 | customManagers: [ 29 | { 30 | customType: 'regex', 31 | datasourceTemplate: 'docker', 32 | managerFilePatterns: [ 33 | '/^build.gradle.kts$/', 34 | ], 35 | matchStrings: [ 36 | '"(?otel/weaver):(?[^"]+)"', 37 | ], 38 | }, 39 | ], 40 | } 41 | -------------------------------------------------------------------------------- /.github/repository-settings.md: -------------------------------------------------------------------------------- 1 | # Repository settings 2 | 3 | Same 4 | as [opentelemetry-java-instrumentation repository settings](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/.github/repository-settings.md#repository-settings), 5 | except that the rules for `v0.*`, `v1.*`, `gh-pages`, and `cloudfoundry` branches 6 | are not relevant in this repository. 7 | -------------------------------------------------------------------------------- /.github/scripts/draft-change-log-entries.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | version=$("$(dirname "$0")/get-version.sh") 4 | 5 | if [[ $version =~ ([0-9]+)\.([0-9]+)\.0 ]]; then 6 | major="${BASH_REMATCH[1]}" 7 | minor="${BASH_REMATCH[2]}" 8 | else 9 | echo "unexpected version: $version" 10 | exit 1 11 | fi 12 | 13 | if [[ $minor == 0 ]]; then 14 | prior_major=$((major - 1)) 15 | prior_minor=$(sed -n "s/^## Version $prior_major\.\([0-9]\+\)\..*/\1/p" CHANGELOG.md | head -1) 16 | if [[ -z $prior_minor ]]; then 17 | # assuming this is the first release 18 | range= 19 | else 20 | range="v$prior_major.$prior_minor.0..HEAD" 21 | fi 22 | else 23 | range="v$major.$((minor - 1)).0..HEAD" 24 | fi 25 | 26 | echo "## Unreleased" 27 | echo 28 | 29 | git log --reverse \ 30 | --perl-regexp \ 31 | --author='^(?!renovate\[bot\] )' \ 32 | --pretty=format:"* %s" \ 33 | "$range" \ 34 | | sed -E 's,\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/semantic-conventions-java/pull/\1)),' 35 | -------------------------------------------------------------------------------- /.github/scripts/generate-release-contributors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # shellcheck disable=SC2016 4 | # shellcheck disable=SC2086 5 | 6 | # this should be run on the release branch 7 | 8 | # NOTE if you need to run this script locally, you will need to first: 9 | # git fetch upstream main 10 | # git push origin upstream/main:main 11 | # export GITHUB_REPOSITORY=open-telemetry/semantic-conventions-java 12 | 13 | from_version=$1 14 | 15 | # get the date of the first commit that was not in the from_version 16 | from=$(git log --reverse --pretty=format:"%cI" $from_version..HEAD | head -1) 17 | 18 | # get the last commit on main that was included in the release 19 | to=$(git merge-base origin/main HEAD | xargs git log -1 --pretty=format:"%cI") 20 | 21 | contributors1=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query=' 22 | query($q: String!, $endCursor: String) { 23 | search(query: $q, type: ISSUE, first: 100, after: $endCursor) { 24 | edges { 25 | node { 26 | ... on PullRequest { 27 | author { login } 28 | reviews(first: 100) { 29 | nodes { 30 | author { login } 31 | } 32 | } 33 | comments(first: 100) { 34 | nodes { 35 | author { login } 36 | } 37 | } 38 | closingIssuesReferences(first: 100) { 39 | nodes { 40 | author { login } 41 | } 42 | } 43 | } 44 | } 45 | } 46 | pageInfo { 47 | hasNextPage 48 | endCursor 49 | } 50 | } 51 | }' --jq '.data.search.edges.[].node.author.login, 52 | .data.search.edges.[].node.reviews.nodes.[].author.login, 53 | .data.search.edges.[].node.comments.nodes.[].author.login, 54 | .data.search.edges.[].node.closingIssuesReferences.nodes.[].author.login') 55 | 56 | # this query captures authors of issues which have had PRs in the current range reference the issue 57 | # but not necessarily through closingIssuesReferences (e.g. addressing just a part of an issue) 58 | contributors2=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query=' 59 | query($q: String!, $endCursor: String) { 60 | search(query: $q, type: ISSUE, first: 100, after: $endCursor) { 61 | edges { 62 | node { 63 | ... on PullRequest { 64 | body 65 | } 66 | } 67 | } 68 | pageInfo { 69 | hasNextPage 70 | endCursor 71 | } 72 | } 73 | } 74 | ' --jq '.data.search.edges.[].node.body' \ 75 | | grep -oE "#[0-9]{4,}$|#[0-9]{4,}[^0-9<]|$GITHUB_REPOSITORY/issues/[0-9]{4,}" \ 76 | | grep -oE "[0-9]{4,}" \ 77 | | xargs -I{} gh issue view {} --json 'author,url' --jq '[.author.login,.url]' \ 78 | | grep -v '/pull/' \ 79 | | sed 's/^\["//' \ 80 | | sed 's/".*//') 81 | 82 | echo $contributors1 $contributors2 \ 83 | | sed 's/ /\n/g' \ 84 | | sort -uf \ 85 | | grep -v linux-foundation-easycla \ 86 | | grep -v github-actions \ 87 | | grep -v dependabot \ 88 | | grep -v codecov \ 89 | | grep -v opentelemetrybot \ 90 | | sed 's/^/@/' 91 | -------------------------------------------------------------------------------- /.github/scripts/get-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | grep "var semanticConventionsVersion = " build.gradle.kts | grep -Eo "[0-9]+.[0-9]+.[0-9]+" 4 | -------------------------------------------------------------------------------- /.github/scripts/use-cla-approved-github-bot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | git config user.name opentelemetrybot 4 | git config user.email 107717825+opentelemetrybot@users.noreply.github.com 5 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | workflow_dispatch: 9 | 10 | permissions: 11 | contents: read 12 | 13 | concurrency: 14 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | build: 19 | name: Build 20 | runs-on: ${{ matrix.os }} 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | os: 25 | - macos-latest 26 | - macos-13 27 | - ubuntu-latest 28 | test-java-version: 29 | - 8 30 | - 11 31 | - 17 32 | - 21 33 | # macos-latest drops support for java 8 temurin. Run java 8 on macos-13. Run java 11, 17, 21 on macos-latest. 34 | exclude: 35 | - os: macos-latest 36 | test-java-version: 8 37 | - os: macos-13 38 | test-java-version: 11 39 | - os: macos-13 40 | test-java-version: 17 41 | - os: macos-13 42 | test-java-version: 21 43 | 44 | steps: 45 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 46 | 47 | - id: setup-java-test 48 | name: Set up Java ${{ matrix.test-java-version }} for tests 49 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 50 | with: 51 | distribution: temurin 52 | java-version: ${{ matrix.test-java-version }} 53 | 54 | - id: setup-java 55 | name: Set up Java for build 56 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 57 | with: 58 | distribution: temurin 59 | java-version: 17 60 | 61 | - uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0 62 | 63 | - name: build 64 | run: > 65 | ./gradlew 66 | build 67 | -PtestJavaVersion=${{ matrix.test-java-version }} 68 | -Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }} 69 | 70 | - name: generate 71 | # Skip running on macos-latest which doesn't have docker 72 | if: matrix.os == 'ubuntu-latest' 73 | run: ./gradlew generateSemanticConventions --console=plain 74 | 75 | # Run spotless after generate to format generated code 76 | - name: spotless 77 | run: ./gradlew spotlessApply 78 | 79 | - name: Check for diff 80 | run: | 81 | # need to "git add" in case any generated files did not already exist 82 | # select files from both /semconv and /semconv-incubating 83 | git add semconv** 84 | if git diff --cached --quiet 85 | then 86 | echo "No diff detected." 87 | else 88 | echo "Diff detected - did you run './gradlew generateSemanticConventions spotlessApply'?" 89 | echo $(git diff --cached --name-only) 90 | echo $(git diff --cached) 91 | exit 1 92 | fi 93 | 94 | markdown-link-check: 95 | # release branches are excluded to avoid unnecessary maintenance 96 | if: ${{ !startsWith(github.ref_name, 'release/') }} 97 | uses: ./.github/workflows/reusable-markdown-link-check.yml 98 | 99 | misspell-check: 100 | # release branches are excluded to avoid unnecessary maintenance 101 | if: ${{ !startsWith(github.ref_name, 'release/') }} 102 | uses: ./.github/workflows/reusable-misspell-check.yml 103 | 104 | required-status-check: 105 | # markdown-link-check is not required so pull requests are not blocked if external links break 106 | # misspell-check is not required so pull requests are not blocked if the misspell dictionary is 107 | # updated 108 | needs: 109 | - build 110 | runs-on: ubuntu-latest 111 | if: always() 112 | steps: 113 | - if: | 114 | needs.build.result != 'success' 115 | run: exit 1 116 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: CodeQL 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | - release/* 8 | push: 9 | branches: 10 | - main 11 | - release/* 12 | schedule: 13 | - cron: "29 13 * * 2" # weekly at 13:29 UTC on Tuesday 14 | 15 | permissions: 16 | contents: read 17 | 18 | jobs: 19 | analyze: 20 | permissions: 21 | contents: read 22 | actions: read # for github/codeql-action/init to get workflow details 23 | security-events: write # for github/codeql-action/analyze to upload SARIF results 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 27 | 28 | - name: Set up Java 17 29 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 30 | with: 31 | distribution: temurin 32 | java-version: 17 33 | 34 | - name: Set up gradle 35 | uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0 36 | 37 | - name: Initialize CodeQL 38 | uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 39 | with: 40 | languages: java, actions 41 | # using "latest" helps to keep up with the latest Kotlin support 42 | # see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433 43 | tools: latest 44 | 45 | - name: Assemble 46 | # --no-build-cache is required for codeql to analyze all modules 47 | # --no-daemon is required for codeql to observe the compilation 48 | # (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) 49 | run: ./gradlew assemble --no-build-cache --no-daemon 50 | 51 | - name: Perform CodeQL analysis 52 | uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 53 | -------------------------------------------------------------------------------- /.github/workflows/fossa.yml: -------------------------------------------------------------------------------- 1 | name: FOSSA 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | fossa: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 16 | 17 | - uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0 18 | with: 19 | api-key: ${{secrets.FOSSA_API_KEY}} 20 | team: OpenTelemetry 21 | -------------------------------------------------------------------------------- /.github/workflows/generate-post-release-pr.yml: -------------------------------------------------------------------------------- 1 | name: Generate Post-Release PR 2 | on: 3 | workflow_dispatch: 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | prereqs: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 13 | - name: Verify prerequisites 14 | run: | 15 | if [[ $GITHUB_REF_NAME != main ]]; then 16 | echo this workflow should only be run against main 17 | exit 1 18 | fi 19 | 20 | create-pull-request-against-main: 21 | permissions: 22 | contents: write # for git push to PR branch 23 | runs-on: ubuntu-latest 24 | needs: 25 | - prereqs 26 | steps: 27 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 28 | - id: setup-java 29 | name: Set up Java for build 30 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 31 | with: 32 | distribution: temurin 33 | java-version: 17 34 | 35 | - name: Set environment variables 36 | run: | 37 | version=$(.github/scripts/get-version.sh) 38 | echo "VERSION=$version" >> $GITHUB_ENV 39 | prior_version=$(.github/scripts/get-prior-version.sh) 40 | echo "PRIOR_VERSION=$prior_version" >> $GITHUB_ENV 41 | if [[ $prior_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then 42 | major="${BASH_REMATCH[1]}" 43 | minor="${BASH_REMATCH[2]}" 44 | patch="${BASH_REMATCH[3]}" 45 | 46 | two_releases_ago="$major.$((minor - 1)).$patch" 47 | else 48 | echo "unexpected prior version: $prior_version" 49 | exit 1 50 | fi 51 | echo "TWO_VERSIONS_AGO=$two_releases_ago" >> $GITHUB_ENV 52 | - name: Use CLA approved github bot 53 | run: .github/scripts/use-cla-approved-github-bot.sh 54 | 55 | - name: Create pull request against main 56 | env: 57 | # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows 58 | GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} 59 | run: | 60 | ./gradlew japicmp -PapiBaseVersion=$TWO_VERSIONS_AGO -PapiNewVersion=$PRIOR_VERSION 61 | ./gradlew --refresh-dependencies japicmp 62 | 63 | message="Post release for version $PRIOR_VERSION" 64 | body="Post-release updates for version \`$PRIOR_VERSION\`." 65 | branch="opentelemetrybot/post-release-for-${PRIOR_VERSION}" 66 | 67 | git checkout -b $branch 68 | git add docs/apidiffs 69 | git commit -a -m "$message" 70 | git push --set-upstream origin $branch 71 | gh pr create --title "$message" \ 72 | --body "$body" \ 73 | --base main 74 | -------------------------------------------------------------------------------- /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: Gradle wrapper validation 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | gradle-wrapper-validation: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 15 | 16 | - uses: gradle/actions/wrapper-validation@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0 17 | -------------------------------------------------------------------------------- /.github/workflows/ossf-scorecard.yml: -------------------------------------------------------------------------------- 1 | name: OSSF Scorecard 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | schedule: 8 | - cron: "43 6 * * 5" # weekly at 06:43 (UTC) on Friday 9 | workflow_dispatch: 10 | 11 | permissions: 12 | contents: read 13 | 14 | jobs: 15 | analysis: 16 | runs-on: ubuntu-latest 17 | permissions: 18 | contents: read 19 | # Needed for Code scanning upload 20 | security-events: write 21 | # Needed for GitHub OIDC token if publish_results is true 22 | id-token: write 23 | steps: 24 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 25 | with: 26 | persist-credentials: false 27 | 28 | - uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 29 | with: 30 | results_file: results.sarif 31 | results_format: sarif 32 | publish_results: true 33 | 34 | # Upload the results as artifacts (optional). Commenting out will disable 35 | # uploads of run results in SARIF format to the repository Actions tab. 36 | # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts 37 | - name: "Upload artifact" 38 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 39 | with: 40 | name: SARIF file 41 | path: results.sarif 42 | retention-days: 5 43 | 44 | # Upload the results to GitHub's code scanning dashboard (optional). 45 | # Commenting out will disable upload of results to your repo's Code Scanning dashboard 46 | - name: "Upload to code-scanning" 47 | uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 48 | with: 49 | sarif_file: results.sarif 50 | -------------------------------------------------------------------------------- /.github/workflows/prepare-release-branch.yml: -------------------------------------------------------------------------------- 1 | name: Prepare release branch 2 | on: 3 | workflow_dispatch: 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | prereqs: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 13 | 14 | - name: Verify prerequisites 15 | run: | 16 | if [[ $GITHUB_REF_NAME != main ]]; then 17 | echo this workflow should only be run against main 18 | exit 1 19 | fi 20 | 21 | if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then 22 | echo the change log is missing an \"Unreleased\" section 23 | exit 1 24 | fi 25 | 26 | create-pull-request-against-release-branch: 27 | permissions: 28 | contents: write # for Git to git push 29 | runs-on: ubuntu-latest 30 | needs: 31 | - prereqs 32 | steps: 33 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 34 | 35 | - name: Create release branch 36 | run: | 37 | version=$(.github/scripts/get-version.sh) 38 | if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then 39 | release_branch_name="release/v${version}" 40 | release_branch_exists=$(git ls-remote --heads origin refs/heads/$release_branch_name) 41 | if [[ $release_branch_exists != "" ]] ; then 42 | echo "release branch $release_branch_name already exists" 43 | exit 1 44 | fi 45 | else 46 | echo "unexpected version: $version" 47 | exit 1 48 | fi 49 | 50 | git push origin HEAD:$release_branch_name 51 | 52 | echo "VERSION=$version" >> $GITHUB_ENV 53 | echo "RELEASE_BRANCH_NAME=$release_branch_name" >> $GITHUB_ENV 54 | 55 | - name: Update version 56 | run: sed -Ei "s/val snapshot = true/val snapshot = false/" build.gradle.kts 57 | 58 | - name: Update the change log with the approximate release date 59 | run: | 60 | date=$(date "+%Y-%m-%d") 61 | sed -Ei "s/^## Unreleased$/## Version $VERSION ($date)/" CHANGELOG.md 62 | 63 | - name: Use CLA approved github bot 64 | run: .github/scripts/use-cla-approved-github-bot.sh 65 | 66 | - name: Create pull request against the release branch 67 | env: 68 | # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows 69 | GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} 70 | run: | 71 | message="Prepare release $VERSION" 72 | branch="opentelemetrybot/prepare-release-${VERSION}" 73 | 74 | git checkout -b $branch 75 | git commit -a -m "$message" 76 | git push --set-upstream origin $branch 77 | gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \ 78 | --body "$message." \ 79 | --base $RELEASE_BRANCH_NAME 80 | 81 | create-pull-request-against-main: 82 | permissions: 83 | contents: write # for Git to git push 84 | runs-on: ubuntu-latest 85 | needs: 86 | - prereqs 87 | steps: 88 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 89 | 90 | - name: Set environment variables 91 | run: | 92 | version=$(.github/scripts/get-version.sh) 93 | if [[ ! $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then 94 | echo "unexpected version: $version" 95 | exit 1 96 | fi 97 | echo "VERSION=$version" >> $GITHUB_ENV 98 | 99 | - name: Update the change log on main 100 | run: | 101 | # the actual release date on main will be updated at the end of the release workflow 102 | date=$(date "+%Y-%m-%d") 103 | sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version $VERSION ($date)/" CHANGELOG.md 104 | 105 | - name: Use CLA approved github bot 106 | run: .github/scripts/use-cla-approved-github-bot.sh 107 | 108 | - name: Create pull request against main 109 | env: 110 | # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows 111 | GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} 112 | run: | 113 | message="Update changelog for $VERSION release" 114 | body="Update changelog for \`$VERSION\` release." 115 | branch="opentelemetrybot/update-version-to-${VERSION}" 116 | 117 | git checkout -b $branch 118 | git commit -a -m "$message" 119 | git push --set-upstream origin $branch 120 | gh pr create --title "$message" \ 121 | --body "$body" \ 122 | --base main 123 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | workflow_dispatch: 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | release: 10 | permissions: 11 | contents: write # for creating the release 12 | runs-on: ubuntu-latest 13 | outputs: 14 | version: ${{ steps.create-github-release.outputs.version }} 15 | steps: 16 | - run: | 17 | if [[ $GITHUB_REF_NAME != release/* ]]; then 18 | echo this workflow should only be run against release branches 19 | exit 1 20 | fi 21 | 22 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 23 | 24 | - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 25 | with: 26 | distribution: temurin 27 | java-version: 17 28 | 29 | - uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0 30 | 31 | - name: Build and publish artifacts 32 | run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository 33 | env: 34 | SONATYPE_USER: ${{ secrets.SONATYPE_USER }} 35 | SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} 36 | GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} 37 | GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} 38 | 39 | - name: Set environment variables 40 | run: | 41 | version=$(.github/scripts/get-version.sh) 42 | if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then 43 | major="${BASH_REMATCH[1]}" 44 | minor="${BASH_REMATCH[2]}" 45 | patch="${BASH_REMATCH[3]}" 46 | else 47 | echo "unexpected version: $version" 48 | exit 1 49 | fi 50 | if [[ $patch == 0 ]]; then 51 | if [[ $minor == 0 ]]; then 52 | prior_major=$((major - 1)) 53 | prior_minor=$(grep -Po "^## Version $prior_major.\K[0-9]+" CHANGELOG.md | head -1) 54 | prior_version="$prior_major.$prior_minor" 55 | else 56 | prior_version="$major.$((minor - 1)).0" 57 | fi 58 | else 59 | prior_version="$major.$minor.$((patch - 1))" 60 | fi 61 | echo "VERSION=$version" >> $GITHUB_ENV 62 | echo "PRIOR_VERSION=$prior_version" >> $GITHUB_ENV 63 | 64 | # check out main branch to verify there won't be problems with merging the change log 65 | # at the end of this workflow 66 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 67 | with: 68 | ref: main 69 | 70 | - name: Check that change log update was merged to main 71 | run: | 72 | if ! grep --quiet "^## Version $VERSION " CHANGELOG.md; then 73 | echo the pull request generated by prepare-release-branch.yml needs to be merged first 74 | exit 1 75 | fi 76 | 77 | # back to the release branch 78 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 79 | with: 80 | # tags are needed for the generate-release-contributors.sh script 81 | fetch-depth: 0 82 | 83 | - name: Generate release notes 84 | env: 85 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 86 | run: | 87 | # CHANGELOG_SECTION.md is also used at the end of the release workflow 88 | # for copying the change log updates to main 89 | sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \ 90 | > /tmp/CHANGELOG_SECTION.md 91 | 92 | # the complex perl regex is needed because markdown docs render newlines as soft wraps 93 | # while release notes render them as line breaks 94 | perl -0pe 's/(?> /tmp/release-notes.txt 96 | 97 | # conditional block not indented because of the heredoc 98 | cat >> /tmp/release-notes.txt << EOF 99 | 100 | ### 🙇 Thank you 101 | This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests: 102 | 103 | EOF 104 | 105 | .github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt 106 | 107 | - id: create-github-release 108 | name: Create GitHub release 109 | env: 110 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 111 | run: | 112 | gh release create --target $GITHUB_REF_NAME \ 113 | --title "Version $VERSION" \ 114 | --notes-file /tmp/release-notes.txt \ 115 | v$VERSION 116 | 117 | echo "version=$VERSION" >> $GITHUB_OUTPUT 118 | -------------------------------------------------------------------------------- /.github/workflows/reusable-markdown-link-check.yml: -------------------------------------------------------------------------------- 1 | name: Reusable - Markdown link check 2 | 3 | on: 4 | workflow_call: 5 | 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | markdown-link-check: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 14 | 15 | - uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1 16 | with: 17 | # excluding links to pull requests and issues is done for performance 18 | args: > 19 | --include-fragments 20 | --exclude "^https://github.com/open-telemetry/opentelemetry-java-contrib/(issues|pull)/\\d+$" 21 | --max-retries 6 22 | . 23 | -------------------------------------------------------------------------------- /.github/workflows/reusable-misspell-check.yml: -------------------------------------------------------------------------------- 1 | name: Reusable - Misspell check 2 | 3 | on: 4 | workflow_call: 5 | 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | misspell-check: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 14 | 15 | - name: Install misspell 16 | run: | 17 | curl -L -o install-misspell.sh https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh 18 | sh ./install-misspell.sh 19 | 20 | - name: Run misspell 21 | run: bin/misspell -error . 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle 2 | build 3 | .gradle 4 | local.properties 5 | out/ 6 | 7 | # Maven (proto) 8 | target 9 | 10 | # IntelliJ IDEA 11 | .idea 12 | *.iml 13 | 14 | # Eclipse 15 | .classpath 16 | .project 17 | .settings 18 | bin 19 | 20 | # NetBeans 21 | /.nb-gradle 22 | /.nb-gradle-properties 23 | 24 | # VS Code 25 | .vscode 26 | 27 | # OS X 28 | .DS_Store 29 | 30 | # Emacs 31 | *~ 32 | \#*\# 33 | 34 | # Vim 35 | .swp 36 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Welcome to the OpenTelemetry Semantic Convention Java repository! 4 | 5 | ## Building 6 | 7 | Java 17 or higher is required to build the projects in this repository 8 | (the built artifacts can be used on Java 8 or higher). 9 | To check your Java version, run: 10 | 11 | ```bash 12 | java -version 13 | ``` 14 | 15 | To build the project, run: 16 | 17 | ```bash 18 | ./gradlew assemble 19 | ``` 20 | 21 | ## Style guide 22 | 23 | This repository follows the OpenTelemetry Java 24 | repository's [style guide](https://github.com/open-telemetry/opentelemetry-java/blob/main/CONTRIBUTING.md#style-guideline). 25 | -------------------------------------------------------------------------------- /RELEASING.md: -------------------------------------------------------------------------------- 1 | # Release Process 2 | 3 | Releases are performed in lockstep 4 | with [open-telemetry/semantic-conventions](https://github.com/open-telemetry/semantic-conventions) [releases](https://github.com/open-telemetry/semantic-conventions/releases). 5 | 6 | ## Preparing a new release 7 | 8 | Applies to major, minor and patch releases of `open-telemetry/semantic-conventions`. 9 | 10 | * Merge a PR to `main` with the following changes: 11 | * Update the `CHANGELOG.md` 12 | * The heading for the unreleased entries should be `## Unreleased` 13 | * Bump the `semanticConventionsVersion` variable in `build.gradle.kts` to version 14 | of `semantic-conventions` to be released 15 | * Follow the instructions 16 | to [generate the semantic conventions](README.md#generating-semantic-conventions) 17 | * Run 18 | the [Prepare release branch workflow](https://github.com/open-telemetry/semantic-conventions-java/actions/workflows/prepare-release-branch.yml) 19 | * Press the "Run workflow" button, and leave the default branch `main` selected 20 | * Review and merge the two pull requests it creates (one is targeted to the release branch and one 21 | is targeted to `main`) 22 | 23 | ## Preparing a patch release 24 | 25 | TODO(jack-berg): Define process for releasing a patch, which should add a 4th component to 26 | the `semantic-convention` release version, e.g. `v1.21.0.1` 27 | 28 | ## Making the release 29 | 30 | * Run 31 | the [Release workflow](https://github.com/open-telemetry/semantic-conventions-java/actions/workflows/release.yml) 32 | * Press the "Run workflow" button, then select the release branch from the dropdown list, 33 | e.g. `release/v1.21.0`, and click the "Run workflow" button below that. 34 | * This workflow will publish artifacts to maven central and will publish a GitHub release with 35 | release notes based on the change log. 36 | 37 | ## Making release candidate locally 38 | 39 | * Follow steps to [prepare a new release](#preparing-a-new-release), but DO NOT [make the release](#making-the-release) 40 | * Check out release branch locally 41 | * Set required environment variables 42 | * `export CI=true` - trick tooling to thinking this is the official release process, and sign artifacts 43 | * `export GPG_PRIVATE_KEY=` 44 | * `export GPG_PASSWORD=` 45 | * `export SONATYPE_USER=` 46 | * `export SONATYPE_KEY=` 47 | * Adjust version tag to include `-rc.` suffix (i.e. `-rc.1` for the first release candidate) in [build.gradle.kts](./build.gradle.kts): 48 | 49 | ``` 50 | var ver = semanticConventionsVersion 51 | val release = findProperty("otel.release") 52 | if (release != null) { 53 | ver += "-" + release 54 | } 55 | if (snapshot) { 56 | ver += "-SNAPSHOT" 57 | } 58 | ver += "-rc.1" // <-- ADD THIS LINE 59 | version = ver 60 | ``` 61 | 62 | * Build and publish artifacts to staging repository 63 | * Run `./gradlew assemble publishToSonatype closeSonatypeStagingRepository` 64 | * Notably, this stages the artifacts in sonatype and gives a chance for manual verification before publishing 65 | * Publishing via the sonatype UI 66 | * After publishing, manually create Github release using the contents from the [CHANGELOG.md](./CHANGELOG.md) 67 | 68 | ## Credentials 69 | 70 | See [opentelemetry-java credentials](https://github.com/open-telemetry/opentelemetry-java/blob/main/RELEASING.md#credentials). 71 | -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | repositories { 6 | mavenCentral() 7 | gradlePluginPortal() 8 | mavenLocal() 9 | } 10 | 11 | dependencies { 12 | implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.4") 13 | implementation("ru.vyarus:gradle-animalsniffer-plugin:2.0.1") 14 | implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.6") 15 | // Needed for japicmp but not automatically brought in for some reason. 16 | implementation("com.google.guava:guava:33.4.8-jre") 17 | } 18 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/io/opentelemetry/gradle/OtelJavaExtension.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.gradle 7 | 8 | import org.gradle.api.provider.Property 9 | 10 | abstract class OtelJavaExtension { 11 | abstract val moduleName: Property 12 | } 13 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/otel.animalsniffer-conventions.gradle.kts: -------------------------------------------------------------------------------- 1 | import ru.vyarus.gradle.plugin.animalsniffer.AnimalSniffer 2 | 3 | plugins { 4 | `java-library` 5 | 6 | id("ru.vyarus.animalsniffer") 7 | } 8 | 9 | dependencies { 10 | add("signature", "com.toasttab.android:gummy-bears-api-21:0.12.0:coreLib@signature") 11 | } 12 | 13 | animalsniffer { 14 | sourceSets = listOf(java.sourceSets.main.get()) 15 | } 16 | 17 | tasks.withType { 18 | // always having declared output makes this task properly participate in tasks up-to-date checks 19 | reports.text.required.set(true) 20 | } 21 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts: -------------------------------------------------------------------------------- 1 | import io.opentelemetry.gradle.OtelJavaExtension 2 | import org.gradle.api.tasks.testing.logging.TestExceptionFormat 3 | 4 | plugins { 5 | `java-library` 6 | 7 | checkstyle 8 | eclipse 9 | idea 10 | 11 | id("otel.spotless-conventions") 12 | } 13 | 14 | val otelJava = extensions.create("otelJava") 15 | 16 | java { 17 | toolchain { 18 | languageVersion.set(JavaLanguageVersion.of(17)) 19 | } 20 | 21 | withJavadocJar() 22 | withSourcesJar() 23 | } 24 | 25 | checkstyle { 26 | configDirectory.set(file("$rootDir/buildscripts/")) 27 | toolVersion = "10.25.0" 28 | isIgnoreFailures = false 29 | configProperties["rootDir"] = rootDir 30 | } 31 | 32 | val testJavaVersion = gradle.startParameter.projectProperties.get("testJavaVersion")?.let(JavaVersion::toVersion) 33 | 34 | tasks { 35 | withType().configureEach { 36 | with(options) { 37 | release.set(8) 38 | 39 | compilerArgs.addAll( 40 | listOf( 41 | // Fail build on any warning 42 | "-Werror" 43 | ) 44 | ) 45 | 46 | encoding = "UTF-8" 47 | } 48 | } 49 | 50 | withType().configureEach { 51 | useJUnitPlatform() 52 | 53 | if (testJavaVersion != null) { 54 | javaLauncher.set( 55 | javaToolchains.launcherFor { 56 | languageVersion.set(JavaLanguageVersion.of(testJavaVersion.majorVersion)) 57 | }, 58 | ) 59 | } 60 | 61 | testLogging { 62 | exceptionFormat = TestExceptionFormat.FULL 63 | showExceptions = true 64 | showCauses = true 65 | showStackTraces = true 66 | } 67 | } 68 | 69 | withType().configureEach { 70 | exclude("io/opentelemetry/semconv/**/internal/**") 71 | 72 | with(options as StandardJavadocDocletOptions) { 73 | source = "8" 74 | encoding = "UTF-8" 75 | docEncoding = "UTF-8" 76 | breakIterator(true) 77 | 78 | addBooleanOption("html5", true) 79 | addBooleanOption("Xdoclint:all,-missing", true) 80 | // non-standard option to fail on warnings, see https://bugs.openjdk.java.net/browse/JDK-8200363 81 | addStringOption("Xwerror", "-quiet") 82 | } 83 | } 84 | 85 | withType().configureEach { 86 | inputs.property("moduleName", otelJava.moduleName) 87 | 88 | manifest { 89 | attributes( 90 | "Automatic-Module-Name" to otelJava.moduleName, 91 | "Built-By" to System.getProperty("user.name"), 92 | "Built-JDK" to System.getProperty("java.version"), 93 | "Implementation-Title" to project.base.archivesName, 94 | "Implementation-Version" to project.version) 95 | } 96 | } 97 | 98 | afterEvaluate { 99 | withType().configureEach { 100 | with(options as StandardJavadocDocletOptions) { 101 | val title = "${project.description}" 102 | docTitle = title 103 | windowTitle = title 104 | } 105 | } 106 | } 107 | } 108 | 109 | configurations.configureEach { 110 | resolutionStrategy { 111 | failOnVersionConflict() 112 | preferProjectModules() 113 | } 114 | } 115 | 116 | val dependencyManagement by configurations.creating { 117 | isCanBeConsumed = false 118 | isCanBeResolved = false 119 | isVisible = false 120 | } 121 | 122 | dependencies { 123 | dependencyManagement(platform(project(":dependencyManagement"))) 124 | afterEvaluate { 125 | configurations.configureEach { 126 | if (isCanBeResolved && !isCanBeConsumed) { 127 | extendsFrom(dependencyManagement) 128 | } 129 | } 130 | } 131 | } 132 | 133 | testing { 134 | suites.withType(JvmTestSuite::class).configureEach { 135 | dependencies { 136 | implementation(project(project.path)) 137 | implementation(enforcedPlatform("org.junit:junit-bom:5.13.1")) 138 | implementation(enforcedPlatform("org.assertj:assertj-bom:3.27.3")) 139 | 140 | implementation("org.junit.jupiter:junit-jupiter-api") 141 | implementation("org.junit.jupiter:junit-jupiter-params") 142 | runtimeOnly("org.junit.jupiter:junit-jupiter-engine") 143 | runtimeOnly("org.junit.platform:junit-platform-launcher") 144 | 145 | implementation("org.assertj:assertj-core") 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/otel.publish-conventions.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `maven-publish` 3 | signing 4 | 5 | id("otel.japicmp-conventions") 6 | } 7 | 8 | publishing { 9 | publications { 10 | register("mavenPublication") { 11 | groupId = "io.opentelemetry.semconv" 12 | afterEvaluate { 13 | // not available until evaluated. 14 | artifactId = base.archivesName.get() 15 | pom.description.set(project.description) 16 | } 17 | 18 | plugins.withId("java-library") { 19 | from(components["java"]) 20 | } 21 | 22 | versionMapping { 23 | allVariants { 24 | fromResolutionResult() 25 | } 26 | } 27 | 28 | pom { 29 | name.set("OpenTelemetry Semantic Conventions Java") 30 | url.set("https://github.com/open-telemetry/semantic-conventions-java") 31 | 32 | licenses { 33 | license { 34 | name.set("The Apache License, Version 2.0") 35 | url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") 36 | } 37 | } 38 | 39 | developers { 40 | developer { 41 | id.set("opentelemetry") 42 | name.set("OpenTelemetry") 43 | url.set("https://github.com/open-telemetry/community") 44 | } 45 | } 46 | 47 | scm { 48 | connection.set("scm:git:git@github.com:open-telemetry/semantic-conventions-java.git") 49 | developerConnection.set("scm:git:git@github.com:open-telemetry/semantic-conventions-java.git") 50 | url.set("git@github.com:open-telemetry/semantic-conventions-java.git") 51 | } 52 | } 53 | } 54 | } 55 | } 56 | 57 | if (System.getenv("CI") != null) { 58 | signing { 59 | useInMemoryPgpKeys(System.getenv("GPG_PRIVATE_KEY"), System.getenv("GPG_PASSWORD")) 60 | sign(publishing.publications["mavenPublication"]) 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/otel.spotless-conventions.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.diffplug.spotless") 3 | } 4 | 5 | spotless { 6 | java { 7 | googleJavaFormat() 8 | licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public|// Includes work from:)") 9 | target("src/**/*.java") 10 | } 11 | plugins.withId("groovy") { 12 | groovy { 13 | licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class)") 14 | } 15 | } 16 | plugins.withId("scala") { 17 | scala { 18 | scalafmt() 19 | licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public)") 20 | target("src/**/*.scala") 21 | } 22 | } 23 | plugins.withId("org.jetbrains.kotlin.jvm") { 24 | kotlin { 25 | ktlint().editorConfigOverride(mapOf( 26 | "indent_size" to "2", 27 | "continuation_indent_size" to "2", 28 | "max_line_length" to "160", 29 | "insert_final_newline" to "true", 30 | "ktlint_standard_no-wildcard-imports" to "disabled", 31 | // ktlint does not break up long lines, it just fails on them 32 | "ktlint_standard_max-line-length" to "disabled", 33 | // ktlint makes it *very* hard to locate where this actually happened 34 | "ktlint_standard_trailing-comma-on-call-site" to "disabled", 35 | // depends on ktlint_standard_wrapping 36 | "ktlint_standard_trailing-comma-on-declaration-site" to "disabled", 37 | // also very hard to find out where this happens 38 | "ktlint_standard_wrapping" to "disabled" 39 | )) 40 | licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class|// Includes work from:)") 41 | } 42 | } 43 | kotlinGradle { 44 | ktlint().editorConfigOverride(mapOf( 45 | "indent_size" to "2", 46 | "continuation_indent_size" to "2", 47 | "max_line_length" to "160", 48 | "insert_final_newline" to "true", 49 | "ktlint_standard_no-wildcard-imports" to "disabled", 50 | // ktlint does not break up long lines, it just fails on them 51 | "ktlint_standard_max-line-length" to "disabled", 52 | // ktlint makes it *very* hard to locate where this actually happened 53 | "ktlint_standard_trailing-comma-on-call-site" to "disabled", 54 | // depends on ktlint_standard_wrapping 55 | "ktlint_standard_trailing-comma-on-declaration-site" to "disabled", 56 | // also very hard to find out where this happens 57 | "ktlint_standard_wrapping" to "disabled" 58 | )) 59 | } 60 | format("misc") { 61 | // not using "**/..." to help keep spotless fast 62 | target( 63 | ".gitignore", 64 | ".gitattributes", 65 | ".gitconfig", 66 | ".editorconfig", 67 | "*.md", 68 | "src/**/*.md", 69 | "docs/**/*.md", 70 | "*.sh", 71 | "src/**/*.properties", 72 | ) 73 | leadingTabsToSpaces() 74 | trimTrailingWhitespace() 75 | endWithNewline() 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /buildscripts/checkstyle-suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /buildscripts/spotless.license.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2: -------------------------------------------------------------------------------- 1 | {%- macro to_java_key_type(attribute) -%} 2 | {%- if attribute.type is template_type -%} 3 | {{ attribute.type | instantiated_type | map_text("java_template_key_type") }} 4 | {%- else -%} 5 | {{ attribute.type | instantiated_type | map_text("java_key_type") }} 6 | {%- endif %} 7 | {%- endmacro %} 8 | {%- macro to_java_key_factory(attribute) -%} 9 | {%- if attribute.type is template_type -%} 10 | {{ attribute.type | instantiated_type | map_text("java_template_key_factory") }} 11 | {%- else -%} 12 | {{ attribute.type | instantiated_type | map_text("java_key_factory") }} 13 | {%- endif %} 14 | {%- endmacro %} 15 | {%- set my_class_name = ctx.root_namespace | pascal_case ~ "IncubatingAttributes" -%} 16 | {%- set stable_class_name = ctx.root_namespace | pascal_case ~ "Attributes" -%} 17 | /* 18 | * Copyright The OpenTelemetry Authors 19 | * SPDX-License-Identifier: Apache-2.0 20 | */ 21 | package io.opentelemetry.semconv.incubating; 22 | 23 | import static io.opentelemetry.api.common.AttributeKey.booleanKey; 24 | import static io.opentelemetry.api.common.AttributeKey.doubleKey; 25 | import static io.opentelemetry.api.common.AttributeKey.longKey; 26 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 27 | import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; 28 | 29 | import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; 30 | import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; 31 | 32 | import io.opentelemetry.api.common.AttributeKey; 33 | import io.opentelemetry.semconv.AttributeKeyTemplate; 34 | import java.util.List; 35 | 36 | // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 37 | @SuppressWarnings("unused") 38 | public final class {{ my_class_name }} { 39 | {% for attribute in ctx.attributes | rejectattr("name", "in", ctx.excluded_attributes) %}{% if attribute is experimental %} 40 | {%- if attribute is deprecated %}{%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%} 41 | {%- else -%}{%- set deprecated_javadoc = "" -%} 42 | {%- endif -%} 43 | {{ [attribute.brief, concat_if("\n\nNotes:\n\n", attribute.note), deprecated_javadoc] | comment(indent=4) }} 44 | {% if attribute is deprecated %}@Deprecated{% endif %} public static final {{ to_java_key_type(attribute) | trim }} {{ attribute.name | screaming_snake_case }} = {{ to_java_key_factory(attribute) | trim }}("{{ attribute.name }}"); 45 | {% elif attribute is stable %} 46 | {%- set stable_class_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "#" ~ (attribute.name | screaming_snake_case) -%} 47 | {{ [attribute.brief, concat_if("\n\nNotes:\n\n", attribute.note), "@deprecated deprecated in favor of stable {@link " ~ stable_class_link ~ "} attribute."] | comment(indent=4) }} 48 | @Deprecated public static final {{ to_java_key_type(attribute) | trim }} {{ attribute.name | screaming_snake_case }} = {{ to_java_key_factory(attribute) | trim }}("{{ attribute.name }}"); 49 | {% endif %} 50 | {% endfor %} 51 | // Enum definitions 52 | {% for attribute in ctx.attributes | select("enum") | rejectattr("name", "in", ctx.excluded_attributes) %} 53 | {%- if attribute is stable -%} 54 | {%- set stable_class_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "." ~ (attribute.name | pascal_case) ~ "Values" -%} 55 | /** 56 | * Values for {@link #{{ attribute.name | screaming_snake_case }}}. 57 | * 58 | * @deprecated deprecated in favor of stable {@link {{stable_class_link}}}. 59 | */ 60 | {%- elif attribute is deprecated -%} 61 | {{ ["Values for {@link #" ~ attribute.name | screaming_snake_case ~ "}", "@deprecated " ~ attribute.deprecated.note ] | comment }} 62 | {%- else -%} 63 | /** Values for {@link #{{ attribute.name | screaming_snake_case }}}. */ 64 | {%- endif -%} 65 | {% if attribute is stable or attribute is deprecated %}@Deprecated{% endif %} 66 | public static final class {{ attribute.name | pascal_case }}IncubatingValues { 67 | {%- for member in attribute.type.members %} 68 | {{ [member.brief or (member.id ~ '.')] | comment(indent=4) }} 69 | public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }}; 70 | {%- endfor %} 71 | private {{ attribute.name | pascal_case }}IncubatingValues() {} 72 | } 73 | {% endfor %} 74 | 75 | private {{ my_class_name }}() {} 76 | } 77 | -------------------------------------------------------------------------------- /buildscripts/templates/registry/incubating_java/weaver.yaml: -------------------------------------------------------------------------------- 1 | params: 2 | excluded_namespaces: ["dotnet", "ios", "aspnetcore", "signalr"] 3 | excluded_attributes: ["messaging.client_id", "exception.escaped"] 4 | comment_formats: 5 | javadoc: 6 | format: html 7 | header: "/**" 8 | prefix: " * " 9 | footer: " */" 10 | old_style_paragraph: true 11 | omit_closing_li: true 12 | inline_code_snippet: "{@code {{code}}}" 13 | block_code_snippet: "
{@code {{code}}}
" 14 | trim: true 15 | remove_trailing_dots: false 16 | default_comment_format: javadoc 17 | templates: 18 | - pattern: IncubatingSemanticAttributes.java.j2 19 | filter: > 20 | semconv_grouped_attributes({ 21 | "exclude_root_namespace": $excluded_namespaces, 22 | "exclude_stability": [] 23 | }) | map({ 24 | root_namespace: .root_namespace, 25 | attributes: .attributes, 26 | excluded_attributes: $excluded_attributes 27 | }) 28 | application_mode: each 29 | file_name: "{{ctx.root_namespace | pascal_case}}IncubatingAttributes.java" 30 | text_maps: 31 | java_enum_type: 32 | int: long 33 | double: double 34 | boolean: boolean 35 | string: String 36 | string[]: String[] 37 | int[]: long[] 38 | double[]: double[] 39 | boolean[]: boolean[] 40 | java_key_type: 41 | int: AttributeKey 42 | double: AttributeKey 43 | boolean: AttributeKey 44 | string: AttributeKey 45 | string[]: AttributeKey> 46 | int[]: AttributeKey> 47 | double[]: AttributeKey> 48 | boolean[]: AttributeKey> 49 | java_template_key_type: 50 | int: AttributeKeyTemplate 51 | double: AttributeKeyTemplate 52 | boolean: AttributeKeyTemplate 53 | string: AttributeKeyTemplate 54 | string[]: AttributeKeyTemplate> 55 | int[]: AttributeKeyTemplate> 56 | double[]: AttributeKeyTemplate> 57 | boolean[]: AttributeKeyTemplate> 58 | java_key_factory: 59 | int: longKey 60 | double: doubleKey 61 | boolean: booleanKey 62 | string: stringKey 63 | string[]: stringArrayKey 64 | int[]: longArrayKey 65 | double[]: doubleArrayKey 66 | boolean[]: booleanArrayKey 67 | java_template_key_factory: 68 | int: longKeyTemplate 69 | double: doubleKeyTemplate 70 | boolean: booleanKeyTemplate 71 | string: stringKeyTemplate 72 | string[]: stringArrayKeyTemplate 73 | int[]: longArrayKeyTemplate 74 | double[]: doubleArrayKeyTemplate 75 | boolean[]: booleanArrayKeyTemplate 76 | 77 | -------------------------------------------------------------------------------- /buildscripts/templates/registry/java/SemanticAttributes.java.j2: -------------------------------------------------------------------------------- 1 | {%- macro to_java_key_type(attribute) -%} 2 | {%- if attribute.type is template_type -%} 3 | {{ attribute.type | instantiated_type | map_text("java_template_key_type") }} 4 | {%- else -%} 5 | {{ attribute.type | instantiated_type | map_text("java_key_type") }} 6 | {%- endif %} 7 | {%- endmacro %} 8 | {%- macro to_java_key_factory(attribute) -%} 9 | {%- if attribute.type is template_type -%} 10 | {{ attribute.type | instantiated_type | map_text("java_template_key_factory") }} 11 | {%- else -%} 12 | {{ attribute.type | instantiated_type | map_text("java_key_factory") }} 13 | {%- endif %} 14 | {%- endmacro %} 15 | {%- set my_class_name = ctx.root_namespace | pascal_case ~ "Attributes" -%} 16 | 17 | /* 18 | * Copyright The OpenTelemetry Authors 19 | * SPDX-License-Identifier: Apache-2.0 20 | */ 21 | package io.opentelemetry.semconv; 22 | 23 | import static io.opentelemetry.api.common.AttributeKey.booleanKey; 24 | import static io.opentelemetry.api.common.AttributeKey.doubleKey; 25 | import static io.opentelemetry.api.common.AttributeKey.longKey; 26 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 27 | import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; 28 | 29 | import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; 30 | import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; 31 | 32 | import io.opentelemetry.api.common.AttributeKey; 33 | import io.opentelemetry.semconv.AttributeKeyTemplate; 34 | import java.util.List; 35 | 36 | // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/java/SemanticAttributes.java.j2 37 | @SuppressWarnings("unused") 38 | public final class {{ my_class_name }} { 39 | {% for attribute in ctx.attributes | rejectattr("name", "in", ctx.excluded_attributes) %}{% if attribute is stable %} 40 | {%- if attribute is deprecated %} 41 | {%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%} 42 | {%- endif -%} 43 | {{ [attribute.brief, concat_if("\n\nNotes:\n\n", attribute.note), deprecated_javadoc] | comment(indent=4) }} 44 | {% if attribute is deprecated %}@Deprecated{% endif %} public static final {{ to_java_key_type(attribute) | trim }} {{ attribute.name | screaming_snake_case }} = {{ to_java_key_factory(attribute) | trim }}("{{ attribute.name }}"); 45 | {% endif %}{% endfor %} 46 | {% for attribute in ctx.attributes %}{% if attribute is enum and attribute is stable %} 47 | // Enum definition 48 | /** Values for {@link #{{ attribute.name | screaming_snake_case }}}. */ 49 | public static final class {{ attribute.name | pascal_case }}Values { 50 | {%- for member in attribute.type.members %} 51 | {{ [member.brief or (member.id ~ '.')] | comment(indent=4) }} 52 | public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }}; 53 | {%- endfor %} 54 | private {{ attribute.name | pascal_case }}Values() {} 55 | } 56 | {% endif %}{% endfor %} 57 | 58 | private {{ my_class_name }}() {} 59 | } 60 | -------------------------------------------------------------------------------- /buildscripts/templates/registry/java/weaver.yaml: -------------------------------------------------------------------------------- 1 | params: 2 | excluded_namespaces: ["dotnet", "ios", "aspnetcore", "signalr"] 3 | # excluding "exception.escaped" from stable attributes 4 | # because we are anticipating it being deprecated soon 5 | excluded_attributes: ["messaging.client_id", "exception.escaped"] 6 | comment_formats: 7 | javadoc: 8 | format: html 9 | header: "/**" 10 | prefix: " * " 11 | footer: " */" 12 | old_style_paragraph: true 13 | omit_closing_li: true 14 | inline_code_snippet: "{@code {{code}}}" 15 | block_code_snippet: "
{@code {{code}}}
" 16 | trim: true 17 | remove_trailing_dots: false 18 | default_comment_format: javadoc 19 | templates: 20 | - pattern: SemanticAttributes.java.j2 21 | filter: > 22 | semconv_grouped_attributes({ 23 | "exclude_root_namespace": $excluded_namespaces, 24 | "exclude_stability": ["experimental", "deprecated"] 25 | }) | map({ 26 | root_namespace: .root_namespace, 27 | attributes: .attributes, 28 | excluded_attributes: $excluded_attributes 29 | }) 30 | application_mode: each 31 | file_name: "{{ctx.root_namespace | pascal_case}}Attributes.java" 32 | text_maps: 33 | java_enum_type: 34 | int: long 35 | double: double 36 | boolean: boolean 37 | string: String 38 | string[]: String[] 39 | int[]: long[] 40 | double[]: double[] 41 | boolean[]: boolean[] 42 | java_key_type: 43 | int: AttributeKey 44 | double: AttributeKey 45 | boolean: AttributeKey 46 | string: AttributeKey 47 | string[]: AttributeKey> 48 | int[]: AttributeKey> 49 | double[]: AttributeKey> 50 | boolean[]: AttributeKey> 51 | java_template_key_type: 52 | int: AttributeKeyTemplate 53 | double: AttributeKeyTemplate 54 | boolean: AttributeKeyTemplate 55 | string: AttributeKeyTemplate 56 | string[]: AttributeKeyTemplate> 57 | int[]: AttributeKeyTemplate> 58 | double[]: AttributeKeyTemplate> 59 | boolean[]: AttributeKeyTemplate> 60 | java_key_factory: 61 | int: longKey 62 | double: doubleKey 63 | boolean: booleanKey 64 | string: stringKey 65 | string[]: stringArrayKey 66 | int[]: longArrayKey 67 | double[]: doubleArrayKey 68 | boolean[]: booleanArrayKey 69 | java_template_key_factory: 70 | int: longKeyTemplate 71 | double: doubleKeyTemplate 72 | boolean: booleanKeyTemplate 73 | string: stringKeyTemplate 74 | string[]: stringArrayKeyTemplate 75 | int[]: longArrayKeyTemplate 76 | double[]: doubleArrayKeyTemplate 77 | boolean[]: booleanArrayKeyTemplate 78 | -------------------------------------------------------------------------------- /dependencyManagement/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `java-platform` 3 | } 4 | 5 | javaPlatform { 6 | allowDependencies() 7 | } 8 | 9 | dependencies { 10 | // boms that are only used by tests should be added in otel.java-conventions.gradle.kts 11 | // under JvmTestSuite so they don't show up as runtime dependencies in license and vulnerability scans 12 | // (the constraints section below doesn't have this issue, and will only show up 13 | // as runtime dependencies if they are actually used as runtime dependencies) 14 | 15 | constraints { 16 | // pinned to: avoid churn, for conservative api version requirement, 17 | // and because opentelemetry-api is a compileOnly dependency 18 | api("io.opentelemetry:opentelemetry-api:1.33.0") 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docs/apidiffs/1.31.0_vs_1.30.0/opentelemetry-semconv.txt: -------------------------------------------------------------------------------- 1 | Comparing source compatibility of opentelemetry-semconv-1.31.0.jar against opentelemetry-semconv-1.30.0.jar 2 | *** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.SchemaUrls (not serializable) 3 | === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 4 | +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_31_0 5 | -------------------------------------------------------------------------------- /docs/apidiffs/1.32.0_vs_1.31.0/opentelemetry-semconv.txt: -------------------------------------------------------------------------------- 1 | Comparing source compatibility of opentelemetry-semconv-1.32.0.jar against opentelemetry-semconv-1.31.0.jar 2 | *** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.SchemaUrls (not serializable) 3 | === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 4 | +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_32_0 5 | -------------------------------------------------------------------------------- /docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt: -------------------------------------------------------------------------------- 1 | Comparing source compatibility of opentelemetry-semconv-1.32.0-SNAPSHOT.jar against opentelemetry-semconv-1.32.0.jar 2 | No changes. -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-telemetry/semantic-conventions-java/f9ff9005fdd4886cc82704c73780bcc88cbeab22/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionSha256Sum=7197a12f450794931532469d4ff21a59ea2c1cd59a3ec3f89c035c3c420a6999 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip 5 | networkTimeout=10000 6 | validateDistributionUrl=true 7 | zipStoreBase=GRADLE_USER_HOME 8 | zipStorePath=wrapper/dists 9 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH= 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /semconv-incubating/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("otel.java-conventions") 3 | id("otel.publish-conventions") 4 | 5 | id("otel.animalsniffer-conventions") 6 | } 7 | 8 | base { 9 | description = "OpenTelemetry Incubating Semantic Conventions generated classes for Java" 10 | archivesName.set("opentelemetry-semconv-incubating") 11 | } 12 | otelJava.moduleName.set("io.opentelemetry.semconv.incubating") 13 | 14 | dependencies { 15 | api(project(":semconv")) 16 | 17 | compileOnly("io.opentelemetry:opentelemetry-api") 18 | 19 | testImplementation("io.opentelemetry:opentelemetry-api") 20 | } 21 | -------------------------------------------------------------------------------- /semconv-incubating/gradle.properties: -------------------------------------------------------------------------------- 1 | otel.release=alpha 2 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class AndroidIncubatingAttributes { 16 | /** 17 | * This attribute represents the state of the application. 18 | * 19 | *

Notes: 20 | * 21 | *

The Android lifecycle states are defined in Activity 23 | * lifecycle callbacks, and from which the {@code OS identifiers} are derived. 24 | */ 25 | public static final AttributeKey ANDROID_APP_STATE = stringKey("android.app.state"); 26 | 27 | /** 28 | * Uniquely identifies the framework API revision offered by a version ({@code os.version}) of the 29 | * android operating system. More information can be found here. 31 | */ 32 | public static final AttributeKey ANDROID_OS_API_LEVEL = stringKey("android.os.api_level"); 33 | 34 | /** 35 | * Deprecated. Use {@code android.app.state} instead. 36 | * 37 | *

Notes: 38 | * 39 | *

The Android lifecycle states are defined in Activity 41 | * lifecycle callbacks, and from which the {@code OS identifiers} are derived. 42 | * 43 | * @deprecated Renamed to {@code android.app.state} 44 | */ 45 | @Deprecated public static final AttributeKey ANDROID_STATE = stringKey("android.state"); 46 | 47 | // Enum definitions 48 | /** Values for {@link #ANDROID_APP_STATE}. */ 49 | public static final class AndroidAppStateIncubatingValues { 50 | /** 51 | * Any time before Activity.onResume() or, if the app has no Activity, Context.startService() 52 | * has been called in the app for the first time. 53 | */ 54 | public static final String CREATED = "created"; 55 | 56 | /** 57 | * Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has 58 | * been called when the app was in the foreground state. 59 | */ 60 | public static final String BACKGROUND = "background"; 61 | 62 | /** 63 | * Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has 64 | * been called when the app was in either the created or background states. 65 | */ 66 | public static final String FOREGROUND = "foreground"; 67 | 68 | private AndroidAppStateIncubatingValues() {} 69 | } 70 | 71 | /** 72 | * Values for {@link #ANDROID_STATE} 73 | * 74 | * @deprecated Renamed to {@code android.app.state} 75 | */ 76 | @Deprecated 77 | public static final class AndroidStateIncubatingValues { 78 | /** 79 | * Any time before Activity.onResume() or, if the app has no Activity, Context.startService() 80 | * has been called in the app for the first time. 81 | */ 82 | public static final String CREATED = "created"; 83 | 84 | /** 85 | * Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has 86 | * been called when the app was in the foreground state. 87 | */ 88 | public static final String BACKGROUND = "background"; 89 | 90 | /** 91 | * Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has 92 | * been called when the app was in either the created or background states. 93 | */ 94 | public static final String FOREGROUND = "foreground"; 95 | 96 | private AndroidStateIncubatingValues() {} 97 | } 98 | 99 | private AndroidIncubatingAttributes() {} 100 | } 101 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class AppIncubatingAttributes { 16 | /** 17 | * A unique identifier representing the installation of an application on a specific device 18 | * 19 | *

Notes: 20 | * 21 | *

Its value SHOULD persist across launches of the same application installation, including 22 | * through application upgrades. It SHOULD change if the application is uninstalled or if all 23 | * applications of the vendor are uninstalled. Additionally, users might be able to reset this 24 | * value (e.g. by clearing application data). If an app is installed multiple times on the same 25 | * device (e.g. in different accounts on Android), each {@code app.installation.id} SHOULD have a 26 | * different value. If multiple OpenTelemetry SDKs are used within the same application, they 27 | * SHOULD use the same value for {@code app.installation.id}. Hardware IDs (e.g. serial number, 28 | * IMEI, MAC address) MUST NOT be used as the {@code app.installation.id}. 29 | * 30 | *

For iOS, this value SHOULD be equal to the vendor 32 | * identifier. 33 | * 34 | *

For Android, examples of {@code app.installation.id} implementations include: 35 | * 36 | *

45 | * 46 | *

More information about Android identifier best practices can be found here. 48 | */ 49 | public static final AttributeKey APP_INSTALLATION_ID = stringKey("app.installation.id"); 50 | 51 | // Enum definitions 52 | 53 | private AppIncubatingAttributes() {} 54 | } 55 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ArtifactIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ArtifactIncubatingAttributes { 16 | /** 17 | * The provenance filename of the built attestation which directly relates to the build artifact 18 | * filename. This filename SHOULD accompany the artifact at publish time. See the SLSA 20 | * Relationship specification for more information. 21 | */ 22 | public static final AttributeKey ARTIFACT_ATTESTATION_FILENAME = 23 | stringKey("artifact.attestation.filename"); 24 | 25 | /** 26 | * The full hash value (see 27 | * glossary), of the built attestation. Some envelopes in the software attestation space 29 | * also refer to this as the digest. 30 | */ 31 | public static final AttributeKey ARTIFACT_ATTESTATION_HASH = 32 | stringKey("artifact.attestation.hash"); 33 | 34 | /** The id of the build software attestation. */ 35 | public static final AttributeKey ARTIFACT_ATTESTATION_ID = 36 | stringKey("artifact.attestation.id"); 37 | 38 | /** 39 | * The human readable file name of the artifact, typically generated during build and release 40 | * processes. Often includes the package name and version in the file name. 41 | * 42 | *

Notes: 43 | * 44 | *

This file name can also act as the Package Name in cases where the 46 | * package ecosystem maps accordingly. Additionally, the artifact can be published for 48 | * others, but that is not a guarantee. 49 | */ 50 | public static final AttributeKey ARTIFACT_FILENAME = stringKey("artifact.filename"); 51 | 52 | /** 53 | * The full hash value (see 54 | * glossary), often found in checksum.txt on a release of the artifact and used to verify 55 | * package integrity. 56 | * 57 | *

Notes: 58 | * 59 | *

The specific algorithm used to create the cryptographic hash value is not defined. In 60 | * situations where an artifact has multiple cryptographic hashes, it is up to the implementer to 61 | * choose which hash value to set here; this should be the most secure hash algorithm that is 62 | * suitable for the situation and consistent with the corresponding attestation. The implementer 63 | * can then provide the other hash values through an additional set of attribute extensions as 64 | * they deem necessary. 65 | */ 66 | public static final AttributeKey ARTIFACT_HASH = stringKey("artifact.hash"); 67 | 68 | /** 69 | * The Package URL of the package artifact provides a 71 | * standard way to identify and locate the packaged artifact. 72 | */ 73 | public static final AttributeKey ARTIFACT_PURL = stringKey("artifact.purl"); 74 | 75 | /** The version of the artifact. */ 76 | public static final AttributeKey ARTIFACT_VERSION = stringKey("artifact.version"); 77 | 78 | // Enum definitions 79 | 80 | private ArtifactIncubatingAttributes() {} 81 | } 82 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class AzIncubatingAttributes { 16 | /** 17 | * Azure 19 | * Resource Provider Namespace as recognized by the client. 20 | */ 21 | public static final AttributeKey AZ_NAMESPACE = stringKey("az.namespace"); 22 | 23 | /** 24 | * The unique identifier of the service request. It's generated by the Azure service and returned 25 | * with the response. 26 | */ 27 | public static final AttributeKey AZ_SERVICE_REQUEST_ID = 28 | stringKey("az.service_request_id"); 29 | 30 | // Enum definitions 31 | 32 | private AzIncubatingAttributes() {} 33 | } 34 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.doubleKey; 9 | import static io.opentelemetry.api.common.AttributeKey.longKey; 10 | import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; 11 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 12 | 13 | import io.opentelemetry.api.common.AttributeKey; 14 | import java.util.List; 15 | 16 | // DO NOT EDIT, this is an Auto-generated file from 17 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 18 | @SuppressWarnings("unused") 19 | public final class AzureIncubatingAttributes { 20 | /** The unique identifier of the client instance. */ 21 | public static final AttributeKey AZURE_CLIENT_ID = stringKey("azure.client.id"); 22 | 23 | /** Cosmos client connection mode. */ 24 | public static final AttributeKey AZURE_COSMOSDB_CONNECTION_MODE = 25 | stringKey("azure.cosmosdb.connection.mode"); 26 | 27 | /** 28 | * Account or request consistency level. 30 | */ 31 | public static final AttributeKey AZURE_COSMOSDB_CONSISTENCY_LEVEL = 32 | stringKey("azure.cosmosdb.consistency.level"); 33 | 34 | /** 35 | * List of regions contacted during operation in the order that they were contacted. If there is 36 | * more than one region listed, it indicates that the operation was performed on multiple regions 37 | * i.e. cross-regional call. 38 | * 39 | *

Notes: 40 | * 41 | *

Region name matches the format of {@code displayName} in Azure 43 | * Location API 44 | */ 45 | public static final AttributeKey> AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS = 46 | stringArrayKey("azure.cosmosdb.operation.contacted_regions"); 47 | 48 | /** The number of request units consumed by the operation. */ 49 | public static final AttributeKey AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE = 50 | doubleKey("azure.cosmosdb.operation.request_charge"); 51 | 52 | /** Request payload size in bytes. */ 53 | public static final AttributeKey AZURE_COSMOSDB_REQUEST_BODY_SIZE = 54 | longKey("azure.cosmosdb.request.body.size"); 55 | 56 | /** Cosmos DB sub status code. */ 57 | public static final AttributeKey AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE = 58 | longKey("azure.cosmosdb.response.sub_status_code"); 59 | 60 | // Enum definitions 61 | /** Values for {@link #AZURE_COSMOSDB_CONNECTION_MODE}. */ 62 | public static final class AzureCosmosdbConnectionModeIncubatingValues { 63 | /** Gateway (HTTP) connection. */ 64 | public static final String GATEWAY = "gateway"; 65 | 66 | /** Direct connection. */ 67 | public static final String DIRECT = "direct"; 68 | 69 | private AzureCosmosdbConnectionModeIncubatingValues() {} 70 | } 71 | 72 | /** Values for {@link #AZURE_COSMOSDB_CONSISTENCY_LEVEL}. */ 73 | public static final class AzureCosmosdbConsistencyLevelIncubatingValues { 74 | /** strong. */ 75 | public static final String STRONG = "Strong"; 76 | 77 | /** bounded_staleness. */ 78 | public static final String BOUNDED_STALENESS = "BoundedStaleness"; 79 | 80 | /** session. */ 81 | public static final String SESSION = "Session"; 82 | 83 | /** eventual. */ 84 | public static final String EVENTUAL = "Eventual"; 85 | 86 | /** consistent_prefix. */ 87 | public static final String CONSISTENT_PREFIX = "ConsistentPrefix"; 88 | 89 | private AzureCosmosdbConsistencyLevelIncubatingValues() {} 90 | } 91 | 92 | private AzureIncubatingAttributes() {} 93 | } 94 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.booleanKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; 10 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 11 | 12 | import io.opentelemetry.api.common.AttributeKey; 13 | import java.util.List; 14 | 15 | // DO NOT EDIT, this is an Auto-generated file from 16 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 17 | @SuppressWarnings("unused") 18 | public final class BrowserIncubatingAttributes { 19 | /** 20 | * Array of brand name and version separated by a space 21 | * 22 | *

Notes: 23 | * 24 | *

This value is intended to be taken from the UA client hints API ({@code 26 | * navigator.userAgentData.brands}). 27 | */ 28 | public static final AttributeKey> BROWSER_BRANDS = stringArrayKey("browser.brands"); 29 | 30 | /** 31 | * Preferred language of the user using the browser 32 | * 33 | *

Notes: 34 | * 35 | *

This value is intended to be taken from the Navigator API {@code navigator.language}. 36 | */ 37 | public static final AttributeKey BROWSER_LANGUAGE = stringKey("browser.language"); 38 | 39 | /** 40 | * A boolean that is true if the browser is running on a mobile device 41 | * 42 | *

Notes: 43 | * 44 | *

This value is intended to be taken from the UA client hints API ({@code 46 | * navigator.userAgentData.mobile}). If unavailable, this attribute SHOULD be left unset. 47 | */ 48 | public static final AttributeKey BROWSER_MOBILE = booleanKey("browser.mobile"); 49 | 50 | /** 51 | * The platform on which the browser is running 52 | * 53 | *

Notes: 54 | * 55 | *

This value is intended to be taken from the UA client hints API ({@code 57 | * navigator.userAgentData.platform}). If unavailable, the legacy {@code navigator.platform} API 58 | * SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to 59 | * be consistent. The list of possible values is defined in the W3C User-Agent Client Hints 61 | * specification. Note that some (but not all) of these values can overlap with values in the 62 | * {@code os.type} and {@code os.name} attributes. However, for consistency, 63 | * the values in the {@code browser.platform} attribute should capture the exact value that the 64 | * user agent provides. 65 | */ 66 | public static final AttributeKey BROWSER_PLATFORM = stringKey("browser.platform"); 67 | 68 | // Enum definitions 69 | 70 | private BrowserIncubatingAttributes() {} 71 | } 72 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CassandraIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.booleanKey; 9 | import static io.opentelemetry.api.common.AttributeKey.longKey; 10 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 11 | 12 | import io.opentelemetry.api.common.AttributeKey; 13 | 14 | // DO NOT EDIT, this is an Auto-generated file from 15 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 16 | @SuppressWarnings("unused") 17 | public final class CassandraIncubatingAttributes { 18 | /** 19 | * The consistency level of the query. Based on consistency values from CQL. 21 | */ 22 | public static final AttributeKey CASSANDRA_CONSISTENCY_LEVEL = 23 | stringKey("cassandra.consistency.level"); 24 | 25 | /** The data center of the coordinating node for a query. */ 26 | public static final AttributeKey CASSANDRA_COORDINATOR_DC = 27 | stringKey("cassandra.coordinator.dc"); 28 | 29 | /** The ID of the coordinating node for a query. */ 30 | public static final AttributeKey CASSANDRA_COORDINATOR_ID = 31 | stringKey("cassandra.coordinator.id"); 32 | 33 | /** The fetch size used for paging, i.e. how many rows will be returned at once. */ 34 | public static final AttributeKey CASSANDRA_PAGE_SIZE = longKey("cassandra.page.size"); 35 | 36 | /** Whether or not the query is idempotent. */ 37 | public static final AttributeKey CASSANDRA_QUERY_IDEMPOTENT = 38 | booleanKey("cassandra.query.idempotent"); 39 | 40 | /** 41 | * The number of times a query was speculatively executed. Not set or {@code 0} if the query was 42 | * not executed speculatively. 43 | */ 44 | public static final AttributeKey CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 45 | longKey("cassandra.speculative_execution.count"); 46 | 47 | // Enum definitions 48 | /** Values for {@link #CASSANDRA_CONSISTENCY_LEVEL}. */ 49 | public static final class CassandraConsistencyLevelIncubatingValues { 50 | /** all. */ 51 | public static final String ALL = "all"; 52 | 53 | /** each_quorum. */ 54 | public static final String EACH_QUORUM = "each_quorum"; 55 | 56 | /** quorum. */ 57 | public static final String QUORUM = "quorum"; 58 | 59 | /** local_quorum. */ 60 | public static final String LOCAL_QUORUM = "local_quorum"; 61 | 62 | /** one. */ 63 | public static final String ONE = "one"; 64 | 65 | /** two. */ 66 | public static final String TWO = "two"; 67 | 68 | /** three. */ 69 | public static final String THREE = "three"; 70 | 71 | /** local_one. */ 72 | public static final String LOCAL_ONE = "local_one"; 73 | 74 | /** any. */ 75 | public static final String ANY = "any"; 76 | 77 | /** serial. */ 78 | public static final String SERIAL = "serial"; 79 | 80 | /** local_serial. */ 81 | public static final String LOCAL_SERIAL = "local_serial"; 82 | 83 | private CassandraConsistencyLevelIncubatingValues() {} 84 | } 85 | 86 | private CassandraIncubatingAttributes() {} 87 | } 88 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ClientIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class ClientIncubatingAttributes { 17 | /** 18 | * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or 19 | * Unix domain socket name. 20 | * 21 | *

Notes: 22 | * 23 | *

When observed from the server side, and when communicating through an intermediary, {@code 24 | * client.address} SHOULD represent the client address behind any intermediaries, for example 25 | * proxies, if it's available. 26 | * 27 | * @deprecated deprecated in favor of stable {@link 28 | * io.opentelemetry.semconv.ClientAttributes#CLIENT_ADDRESS} attribute. 29 | */ 30 | @Deprecated public static final AttributeKey CLIENT_ADDRESS = stringKey("client.address"); 31 | 32 | /** 33 | * Client port number. 34 | * 35 | *

Notes: 36 | * 37 | *

When observed from the server side, and when communicating through an intermediary, {@code 38 | * client.port} SHOULD represent the client port behind any intermediaries, for example proxies, 39 | * if it's available. 40 | * 41 | * @deprecated deprecated in favor of stable {@link 42 | * io.opentelemetry.semconv.ClientAttributes#CLIENT_PORT} attribute. 43 | */ 44 | @Deprecated public static final AttributeKey CLIENT_PORT = longKey("client.port"); 45 | 46 | // Enum definitions 47 | 48 | private ClientIncubatingAttributes() {} 49 | } 50 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudeventsIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class CloudeventsIncubatingAttributes { 16 | /** 17 | * The event_id 19 | * uniquely identifies the event. 20 | */ 21 | public static final AttributeKey CLOUDEVENTS_EVENT_ID = stringKey("cloudevents.event_id"); 22 | 23 | /** 24 | * The source 26 | * identifies the context in which an event happened. 27 | */ 28 | public static final AttributeKey CLOUDEVENTS_EVENT_SOURCE = 29 | stringKey("cloudevents.event_source"); 30 | 31 | /** 32 | * The version 34 | * of the CloudEvents specification which the event uses. 35 | */ 36 | public static final AttributeKey CLOUDEVENTS_EVENT_SPEC_VERSION = 37 | stringKey("cloudevents.event_spec_version"); 38 | 39 | /** 40 | * The subject 42 | * of the event in the context of the event producer (identified by source). 43 | */ 44 | public static final AttributeKey CLOUDEVENTS_EVENT_SUBJECT = 45 | stringKey("cloudevents.event_subject"); 46 | 47 | /** 48 | * The event_type 50 | * contains a value describing the type of event related to the originating occurrence. 51 | */ 52 | public static final AttributeKey CLOUDEVENTS_EVENT_TYPE = 53 | stringKey("cloudevents.event_type"); 54 | 55 | // Enum definitions 56 | 57 | private CloudeventsIncubatingAttributes() {} 58 | } 59 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class CodeIncubatingAttributes { 17 | /** 18 | * Deprecated, use {@code code.column.number} 19 | * 20 | * @deprecated Replaced by {@code code.column.number} 21 | */ 22 | @Deprecated public static final AttributeKey CODE_COLUMN = longKey("code.column"); 23 | 24 | /** 25 | * The column number in {@code code.file.path} best representing the operation. It SHOULD point 26 | * within the code unit named in {@code code.function.name}. 27 | */ 28 | public static final AttributeKey CODE_COLUMN_NUMBER = longKey("code.column.number"); 29 | 30 | /** 31 | * The source code file name that identifies the code unit as uniquely as possible (preferably an 32 | * absolute file path). 33 | */ 34 | public static final AttributeKey CODE_FILE_PATH = stringKey("code.file.path"); 35 | 36 | /** 37 | * Deprecated, use {@code code.file.path} instead 38 | * 39 | * @deprecated Replaced by {@code code.file.path} 40 | */ 41 | @Deprecated public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); 42 | 43 | /** 44 | * Deprecated, use {@code code.function.name} instead 45 | * 46 | * @deprecated Replaced by {@code code.function.name} 47 | */ 48 | @Deprecated public static final AttributeKey CODE_FUNCTION = stringKey("code.function"); 49 | 50 | /** 51 | * The method or function fully-qualified name without arguments. The value should fit the natural 52 | * representation of the language runtime, which is also likely the same used within {@code 53 | * code.stacktrace} attribute value. 54 | * 55 | *

Notes: 56 | * 57 | *

Values and format depends on each language runtime, thus it is impossible to provide an 58 | * exhaustive list of examples. The values are usually the same (or prefixes of) the ones found in 59 | * native stack trace representation stored in {@code code.stacktrace} without information on 60 | * arguments. 61 | * 62 | *

Examples: 63 | * 64 | *

    65 | *
  • Java method: {@code com.example.MyHttpService.serveRequest} 66 | *
  • Java anonymous class method: {@code com.mycompany.Main$1.myMethod} 67 | *
  • Java lambda method: {@code com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod} 68 | *
  • PHP function: {@code GuzzleHttp\Client::transfer} 69 | *
  • Go function: {@code github.com/my/repo/pkg.foo.func5} 70 | *
  • Elixir: {@code OpenTelemetry.Ctx.new} 71 | *
  • Erlang: {@code opentelemetry_ctx:new} 72 | *
  • Rust: {@code playground::my_module::my_cool_func} 73 | *
  • C function: {@code fopen} 74 | *
75 | */ 76 | public static final AttributeKey CODE_FUNCTION_NAME = stringKey("code.function.name"); 77 | 78 | /** 79 | * The line number in {@code code.file.path} best representing the operation. It SHOULD point 80 | * within the code unit named in {@code code.function.name}. 81 | */ 82 | public static final AttributeKey CODE_LINE_NUMBER = longKey("code.line.number"); 83 | 84 | /** 85 | * Deprecated, use {@code code.line.number} instead 86 | * 87 | * @deprecated Replaced by {@code code.line.number} 88 | */ 89 | @Deprecated public static final AttributeKey CODE_LINENO = longKey("code.lineno"); 90 | 91 | /** 92 | * Deprecated, namespace is now included into {@code code.function.name} 93 | * 94 | * @deprecated Value should be included in {@code code.function.name} which is expected to be a 95 | * fully-qualified name. 96 | */ 97 | @Deprecated public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); 98 | 99 | /** 100 | * A stacktrace as a string in the natural representation for the language runtime. The 101 | * representation is identical to {@code 103 | * exception.stacktrace}. 104 | */ 105 | public static final AttributeKey CODE_STACKTRACE = stringKey("code.stacktrace"); 106 | 107 | // Enum definitions 108 | 109 | private CodeIncubatingAttributes() {} 110 | } 111 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class CpuIncubatingAttributes { 17 | /** The logical CPU number [0..n-1] */ 18 | public static final AttributeKey CPU_LOGICAL_NUMBER = longKey("cpu.logical_number"); 19 | 20 | /** The mode of the CPU */ 21 | public static final AttributeKey CPU_MODE = stringKey("cpu.mode"); 22 | 23 | // Enum definitions 24 | /** Values for {@link #CPU_MODE}. */ 25 | public static final class CpuModeIncubatingValues { 26 | /** user. */ 27 | public static final String USER = "user"; 28 | 29 | /** system. */ 30 | public static final String SYSTEM = "system"; 31 | 32 | /** nice. */ 33 | public static final String NICE = "nice"; 34 | 35 | /** idle. */ 36 | public static final String IDLE = "idle"; 37 | 38 | /** iowait. */ 39 | public static final String IOWAIT = "iowait"; 40 | 41 | /** interrupt. */ 42 | public static final String INTERRUPT = "interrupt"; 43 | 44 | /** steal. */ 45 | public static final String STEAL = "steal"; 46 | 47 | /** kernel. */ 48 | public static final String KERNEL = "kernel"; 49 | 50 | private CpuModeIncubatingValues() {} 51 | } 52 | 53 | private CpuIncubatingAttributes() {} 54 | } 55 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpythonIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class CpythonIncubatingAttributes { 16 | /** Value of the garbage collector collection generation. */ 17 | public static final AttributeKey CPYTHON_GC_GENERATION = longKey("cpython.gc.generation"); 18 | 19 | // Enum definitions 20 | /** Values for {@link #CPYTHON_GC_GENERATION}. */ 21 | public static final class CpythonGcGenerationIncubatingValues { 22 | /** Generation 0 */ 23 | public static final long GENERATION_0 = 0; 24 | 25 | /** Generation 1 */ 26 | public static final long GENERATION_1 = 1; 27 | 28 | /** Generation 2 */ 29 | public static final long GENERATION_2 = 2; 30 | 31 | private CpythonGcGenerationIncubatingValues() {} 32 | } 33 | 34 | private CpythonIncubatingAttributes() {} 35 | } 36 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeploymentIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class DeploymentIncubatingAttributes { 16 | /** 17 | * 'Deprecated, use {@code deployment.environment.name} instead.' 18 | * 19 | * @deprecated Deprecated, use {@code deployment.environment.name} instead. 20 | */ 21 | @Deprecated 22 | public static final AttributeKey DEPLOYMENT_ENVIRONMENT = 23 | stringKey("deployment.environment"); 24 | 25 | /** 26 | * Name of the deployment 27 | * environment (aka deployment tier). 28 | * 29 | *

Notes: 30 | * 31 | *

{@code deployment.environment.name} does not affect the uniqueness constraints defined 32 | * through the {@code service.namespace}, {@code service.name} and {@code service.instance.id} 33 | * resource attributes. This implies that resources carrying the following attribute combinations 34 | * MUST be considered to be identifying the same service: 35 | * 36 | *

    37 | *
  • {@code service.name=frontend}, {@code deployment.environment.name=production} 38 | *
  • {@code service.name=frontend}, {@code deployment.environment.name=staging}. 39 | *
40 | */ 41 | public static final AttributeKey DEPLOYMENT_ENVIRONMENT_NAME = 42 | stringKey("deployment.environment.name"); 43 | 44 | /** The id of the deployment. */ 45 | public static final AttributeKey DEPLOYMENT_ID = stringKey("deployment.id"); 46 | 47 | /** The name of the deployment. */ 48 | public static final AttributeKey DEPLOYMENT_NAME = stringKey("deployment.name"); 49 | 50 | /** The status of the deployment. */ 51 | public static final AttributeKey DEPLOYMENT_STATUS = stringKey("deployment.status"); 52 | 53 | // Enum definitions 54 | /** Values for {@link #DEPLOYMENT_STATUS}. */ 55 | public static final class DeploymentStatusIncubatingValues { 56 | /** failed */ 57 | public static final String FAILED = "failed"; 58 | 59 | /** succeeded */ 60 | public static final String SUCCEEDED = "succeeded"; 61 | 62 | private DeploymentStatusIncubatingValues() {} 63 | } 64 | 65 | private DeploymentIncubatingAttributes() {} 66 | } 67 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DestinationIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class DestinationIncubatingAttributes { 17 | /** 18 | * Destination address - domain name if available without reverse DNS lookup; otherwise, IP 19 | * address or Unix domain socket name. 20 | * 21 | *

Notes: 22 | * 23 | *

When observed from the source side, and when communicating through an intermediary, {@code 24 | * destination.address} SHOULD represent the destination address behind any intermediaries, for 25 | * example proxies, if it's available. 26 | */ 27 | public static final AttributeKey DESTINATION_ADDRESS = stringKey("destination.address"); 28 | 29 | /** Destination port number */ 30 | public static final AttributeKey DESTINATION_PORT = longKey("destination.port"); 31 | 32 | // Enum definitions 33 | 34 | private DestinationIncubatingAttributes() {} 35 | } 36 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class DeviceIncubatingAttributes { 16 | /** 17 | * A unique identifier representing the device 18 | * 19 | *

Notes: 20 | * 21 | *

Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is 22 | * uninstalled and re-installed. However, it might be resettable by the user for all apps on a 23 | * device. Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as 24 | * values. 25 | * 26 | *

More information about Android identifier best practices can be found here. 28 | * 29 | *

30 | * 31 | * [!WARNING] 32 | * 33 | *

This attribute may contain sensitive (PII) information. Caution should be taken when storing 34 | * personal data or anything which can identify a user. GDPR and data protection laws may apply, 35 | * ensure you do your own due diligence. 36 | * 37 | *

Due to these reasons, this identifier is not recommended for consumer applications and will 38 | * likely result in rejection from both Google Play and App Store. However, it may be appropriate 39 | * for specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with 40 | * appropriate compliance clearance. Any instrumentation providing this identifier MUST implement 41 | * it as an opt-in feature. 42 | * 43 | *

See {@code 44 | * app.installation.id} for a more privacy-preserving alternative. 45 | * 46 | *

47 | */ 48 | public static final AttributeKey DEVICE_ID = stringKey("device.id"); 49 | 50 | /** 51 | * The name of the device manufacturer 52 | * 53 | *

Notes: 54 | * 55 | *

The Android OS provides this field via Build. iOS 57 | * apps SHOULD hardcode the value {@code Apple}. 58 | */ 59 | public static final AttributeKey DEVICE_MANUFACTURER = stringKey("device.manufacturer"); 60 | 61 | /** 62 | * The model identifier for the device 63 | * 64 | *

Notes: 65 | * 66 | *

It's recommended this value represents a machine-readable version of the model identifier 67 | * rather than the market or consumer-friendly name of the device. 68 | */ 69 | public static final AttributeKey DEVICE_MODEL_IDENTIFIER = 70 | stringKey("device.model.identifier"); 71 | 72 | /** 73 | * The marketing name for the device model 74 | * 75 | *

Notes: 76 | * 77 | *

It's recommended this value represents a human-readable version of the device model rather 78 | * than a machine-readable alternative. 79 | */ 80 | public static final AttributeKey DEVICE_MODEL_NAME = stringKey("device.model.name"); 81 | 82 | // Enum definitions 83 | 84 | private DeviceIncubatingAttributes() {} 85 | } 86 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DiskIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class DiskIncubatingAttributes { 16 | /** The disk IO operation direction. */ 17 | public static final AttributeKey DISK_IO_DIRECTION = stringKey("disk.io.direction"); 18 | 19 | // Enum definitions 20 | /** Values for {@link #DISK_IO_DIRECTION}. */ 21 | public static final class DiskIoDirectionIncubatingValues { 22 | /** read. */ 23 | public static final String READ = "read"; 24 | 25 | /** write. */ 26 | public static final String WRITE = "write"; 27 | 28 | private DiskIoDirectionIncubatingValues() {} 29 | } 30 | 31 | private DiskIncubatingAttributes() {} 32 | } 33 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DnsIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class DnsIncubatingAttributes { 16 | /** 17 | * The name being queried. 18 | * 19 | *

Notes: 20 | * 21 | *

If the name field contains non-printable characters (below 32 or above 126), those 22 | * characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes 23 | * should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n 24 | * respectively. 25 | */ 26 | public static final AttributeKey DNS_QUESTION_NAME = stringKey("dns.question.name"); 27 | 28 | // Enum definitions 29 | 30 | private DnsIncubatingAttributes() {} 31 | } 32 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ElasticsearchIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ElasticsearchIncubatingAttributes { 16 | /** 17 | * Represents the human-readable identifier of the node/instance to which a request was routed. 18 | */ 19 | public static final AttributeKey ELASTICSEARCH_NODE_NAME = 20 | stringKey("elasticsearch.node.name"); 21 | 22 | // Enum definitions 23 | 24 | private ElasticsearchIncubatingAttributes() {} 25 | } 26 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class EnduserIncubatingAttributes { 16 | /** 17 | * Unique identifier of an end user in the system. It maybe a username, email address, or other 18 | * identifier. 19 | * 20 | *

Notes: 21 | * 22 | *

Unique identifier of an end user in the system. 23 | * 24 | *

25 | * 26 | * [!Warning] This field contains sensitive (PII) information. 27 | * 28 | *
29 | */ 30 | public static final AttributeKey ENDUSER_ID = stringKey("enduser.id"); 31 | 32 | /** 33 | * Pseudonymous identifier of an end user. This identifier should be a random value that is not 34 | * directly linked or associated with the end user's actual identity. 35 | * 36 | *

Notes: 37 | * 38 | *

Pseudonymous identifier of an end user. 39 | * 40 | *

41 | * 42 | * [!Warning] This field contains sensitive (linkable PII) information. 43 | * 44 | *
45 | */ 46 | public static final AttributeKey ENDUSER_PSEUDO_ID = stringKey("enduser.pseudo.id"); 47 | 48 | /** 49 | * Deprecated, use {@code user.roles} instead. 50 | * 51 | * @deprecated Replaced by {@code user.roles} attribute. 52 | */ 53 | @Deprecated public static final AttributeKey ENDUSER_ROLE = stringKey("enduser.role"); 54 | 55 | /** 56 | * Deprecated, no replacement at this time. 57 | * 58 | * @deprecated Removed. 59 | */ 60 | @Deprecated public static final AttributeKey ENDUSER_SCOPE = stringKey("enduser.scope"); 61 | 62 | // Enum definitions 63 | 64 | private EnduserIncubatingAttributes() {} 65 | } 66 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ErrorIncubatingAttributes { 16 | /** 17 | * A message providing more detail about an error in human-readable form. 18 | * 19 | *

Notes: 20 | * 21 | *

{@code error.message} should provide additional context and detail about an error. It is NOT 22 | * RECOMMENDED to duplicate the value of {@code error.type} in {@code error.message}. It is also 23 | * NOT RECOMMENDED to duplicate the value of {@code exception.message} in {@code error.message}. 24 | * 25 | *

{@code error.message} is NOT RECOMMENDED for metrics or spans due to its unbounded 26 | * cardinality and overlap with span status. 27 | */ 28 | public static final AttributeKey ERROR_MESSAGE = stringKey("error.message"); 29 | 30 | /** 31 | * Describes a class of error the operation ended with. 32 | * 33 | *

Notes: 34 | * 35 | *

The {@code error.type} SHOULD be predictable, and SHOULD have low cardinality. 36 | * 37 | *

When {@code error.type} is set to a type (e.g., an exception type), its canonical class name 38 | * identifying the type within the artifact SHOULD be used. 39 | * 40 | *

Instrumentations SHOULD document the list of errors they report. 41 | * 42 | *

The cardinality of {@code error.type} within one instrumentation library SHOULD be low. 43 | * Telemetry consumers that aggregate data from multiple instrumentation libraries and 44 | * applications should be prepared for {@code error.type} to have high cardinality at query time 45 | * when no additional filters are applied. 46 | * 47 | *

If the operation has completed successfully, instrumentations SHOULD NOT set {@code 48 | * error.type}. 49 | * 50 | *

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status 51 | * codes), it's RECOMMENDED to: 52 | * 53 | *

    54 | *
  • Use a domain-specific attribute 55 | *
  • Set {@code error.type} to capture all errors, regardless of whether they are defined 56 | * within the domain-specific set or not. 57 | *
58 | * 59 | * @deprecated deprecated in favor of stable {@link 60 | * io.opentelemetry.semconv.ErrorAttributes#ERROR_TYPE} attribute. 61 | */ 62 | @Deprecated public static final AttributeKey ERROR_TYPE = stringKey("error.type"); 63 | 64 | // Enum definitions 65 | /** 66 | * Values for {@link #ERROR_TYPE}. 67 | * 68 | * @deprecated deprecated in favor of stable {@link 69 | * io.opentelemetry.semconv.ErrorAttributes.ErrorTypeValues}. 70 | */ 71 | @Deprecated 72 | public static final class ErrorTypeIncubatingValues { 73 | /** A fallback error value to be used when the instrumentation doesn't define a custom value. */ 74 | public static final String OTHER = "_OTHER"; 75 | 76 | private ErrorTypeIncubatingValues() {} 77 | } 78 | 79 | private ErrorIncubatingAttributes() {} 80 | } 81 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EventIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class EventIncubatingAttributes { 16 | /** 17 | * Identifies the class / type of event. 18 | * 19 | * @deprecated Replaced by EventName top-level field on the LogRecord 20 | */ 21 | @Deprecated public static final AttributeKey EVENT_NAME = stringKey("event.name"); 22 | 23 | // Enum definitions 24 | 25 | private EventIncubatingAttributes() {} 26 | } 27 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ExceptionIncubatingAttributes { 16 | /** 17 | * The exception message. 18 | * 19 | * @deprecated deprecated in favor of stable {@link 20 | * io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_MESSAGE} attribute. 21 | */ 22 | @Deprecated 23 | public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); 24 | 25 | /** 26 | * A stacktrace as a string in the natural representation for the language runtime. The 27 | * representation is to be determined and documented by each language SIG. 28 | * 29 | * @deprecated deprecated in favor of stable {@link 30 | * io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_STACKTRACE} attribute. 31 | */ 32 | @Deprecated 33 | public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); 34 | 35 | /** 36 | * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of 37 | * the exception should be preferred over the static type in languages that support it. 38 | * 39 | * @deprecated deprecated in favor of stable {@link 40 | * io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_TYPE} attribute. 41 | */ 42 | @Deprecated public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); 43 | 44 | // Enum definitions 45 | 46 | private ExceptionIncubatingAttributes() {} 47 | } 48 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GeoIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.doubleKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class GeoIncubatingAttributes { 17 | /** Two-letter code representing continent’s name. */ 18 | public static final AttributeKey GEO_CONTINENT_CODE = stringKey("geo.continent.code"); 19 | 20 | /** 21 | * Two-letter ISO Country Code (ISO 3166-1 22 | * alpha2). 23 | */ 24 | public static final AttributeKey GEO_COUNTRY_ISO_CODE = stringKey("geo.country.iso_code"); 25 | 26 | /** Locality name. Represents the name of a city, town, village, or similar populated place. */ 27 | public static final AttributeKey GEO_LOCALITY_NAME = stringKey("geo.locality.name"); 28 | 29 | /** 30 | * Latitude of the geo location in WGS84. 32 | */ 33 | public static final AttributeKey GEO_LOCATION_LAT = doubleKey("geo.location.lat"); 34 | 35 | /** 36 | * Longitude of the geo location in WGS84. 38 | */ 39 | public static final AttributeKey GEO_LOCATION_LON = doubleKey("geo.location.lon"); 40 | 41 | /** 42 | * Postal code associated with the location. Values appropriate for this field may also be known 43 | * as a postcode or ZIP code and will vary widely from country to country. 44 | */ 45 | public static final AttributeKey GEO_POSTAL_CODE = stringKey("geo.postal_code"); 46 | 47 | /** Region ISO code (ISO 3166-2). */ 48 | public static final AttributeKey GEO_REGION_ISO_CODE = stringKey("geo.region.iso_code"); 49 | 50 | // Enum definitions 51 | /** Values for {@link #GEO_CONTINENT_CODE}. */ 52 | public static final class GeoContinentCodeIncubatingValues { 53 | /** Africa */ 54 | public static final String AF = "AF"; 55 | 56 | /** Antarctica */ 57 | public static final String AN = "AN"; 58 | 59 | /** Asia */ 60 | public static final String AS = "AS"; 61 | 62 | /** Europe */ 63 | public static final String EU = "EU"; 64 | 65 | /** North America */ 66 | public static final String NA = "NA"; 67 | 68 | /** Oceania */ 69 | public static final String OC = "OC"; 70 | 71 | /** South America */ 72 | public static final String SA = "SA"; 73 | 74 | private GeoContinentCodeIncubatingValues() {} 75 | } 76 | 77 | private GeoIncubatingAttributes() {} 78 | } 79 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GoIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class GoIncubatingAttributes { 16 | /** The type of memory. */ 17 | public static final AttributeKey GO_MEMORY_TYPE = stringKey("go.memory.type"); 18 | 19 | // Enum definitions 20 | /** Values for {@link #GO_MEMORY_TYPE}. */ 21 | public static final class GoMemoryTypeIncubatingValues { 22 | /** 23 | * Memory allocated from the heap that is reserved for stack space, whether or not it is 24 | * currently in-use. 25 | */ 26 | public static final String STACK = "stack"; 27 | 28 | /** 29 | * Memory used by the Go runtime, excluding other categories of memory usage described in this 30 | * enumeration. 31 | */ 32 | public static final String OTHER = "other"; 33 | 34 | private GoMemoryTypeIncubatingValues() {} 35 | } 36 | 37 | private GoIncubatingAttributes() {} 38 | } 39 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GraphqlIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class GraphqlIncubatingAttributes { 16 | /** 17 | * The GraphQL document being executed. 18 | * 19 | *

Notes: 20 | * 21 | *

The value may be sanitized to exclude sensitive information. 22 | */ 23 | public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); 24 | 25 | /** The name of the operation being executed. */ 26 | public static final AttributeKey GRAPHQL_OPERATION_NAME = 27 | stringKey("graphql.operation.name"); 28 | 29 | /** The type of the operation being executed. */ 30 | public static final AttributeKey GRAPHQL_OPERATION_TYPE = 31 | stringKey("graphql.operation.type"); 32 | 33 | // Enum definitions 34 | /** Values for {@link #GRAPHQL_OPERATION_TYPE}. */ 35 | public static final class GraphqlOperationTypeIncubatingValues { 36 | /** GraphQL query */ 37 | public static final String QUERY = "query"; 38 | 39 | /** GraphQL mutation */ 40 | public static final String MUTATION = "mutation"; 41 | 42 | /** GraphQL subscription */ 43 | public static final String SUBSCRIPTION = "subscription"; 44 | 45 | private GraphqlOperationTypeIncubatingValues() {} 46 | } 47 | 48 | private GraphqlIncubatingAttributes() {} 49 | } 50 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HerokuIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class HerokuIncubatingAttributes { 16 | /** Unique identifier for the application */ 17 | public static final AttributeKey HEROKU_APP_ID = stringKey("heroku.app.id"); 18 | 19 | /** Commit hash for the current release */ 20 | public static final AttributeKey HEROKU_RELEASE_COMMIT = 21 | stringKey("heroku.release.commit"); 22 | 23 | /** Time and date the release was created */ 24 | public static final AttributeKey HEROKU_RELEASE_CREATION_TIMESTAMP = 25 | stringKey("heroku.release.creation_timestamp"); 26 | 27 | // Enum definitions 28 | 29 | private HerokuIncubatingAttributes() {} 30 | } 31 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HwIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class HwIncubatingAttributes { 16 | /** An identifier for the hardware component, unique within the monitored host */ 17 | public static final AttributeKey HW_ID = stringKey("hw.id"); 18 | 19 | /** An easily-recognizable name for the hardware component */ 20 | public static final AttributeKey HW_NAME = stringKey("hw.name"); 21 | 22 | /** 23 | * Unique identifier of the parent component (typically the {@code hw.id} attribute of the 24 | * enclosure, or disk controller) 25 | */ 26 | public static final AttributeKey HW_PARENT = stringKey("hw.parent"); 27 | 28 | /** The current state of the component */ 29 | public static final AttributeKey HW_STATE = stringKey("hw.state"); 30 | 31 | /** 32 | * Type of the component 33 | * 34 | *

Notes: 35 | * 36 | *

Describes the category of the hardware component for which {@code hw.state} is being 37 | * reported. For example, {@code hw.type=temperature} along with {@code hw.state=degraded} would 38 | * indicate that the temperature of the hardware component has been reported as {@code degraded}. 39 | */ 40 | public static final AttributeKey HW_TYPE = stringKey("hw.type"); 41 | 42 | // Enum definitions 43 | /** Values for {@link #HW_STATE}. */ 44 | public static final class HwStateIncubatingValues { 45 | /** Ok */ 46 | public static final String OK = "ok"; 47 | 48 | /** Degraded */ 49 | public static final String DEGRADED = "degraded"; 50 | 51 | /** Failed */ 52 | public static final String FAILED = "failed"; 53 | 54 | private HwStateIncubatingValues() {} 55 | } 56 | 57 | /** Values for {@link #HW_TYPE}. */ 58 | public static final class HwTypeIncubatingValues { 59 | /** Battery */ 60 | public static final String BATTERY = "battery"; 61 | 62 | /** CPU */ 63 | public static final String CPU = "cpu"; 64 | 65 | /** Disk controller */ 66 | public static final String DISK_CONTROLLER = "disk_controller"; 67 | 68 | /** Enclosure */ 69 | public static final String ENCLOSURE = "enclosure"; 70 | 71 | /** Fan */ 72 | public static final String FAN = "fan"; 73 | 74 | /** GPU */ 75 | public static final String GPU = "gpu"; 76 | 77 | /** Logical disk */ 78 | public static final String LOGICAL_DISK = "logical_disk"; 79 | 80 | /** Memory */ 81 | public static final String MEMORY = "memory"; 82 | 83 | /** Network */ 84 | public static final String NETWORK = "network"; 85 | 86 | /** Physical disk */ 87 | public static final String PHYSICAL_DISK = "physical_disk"; 88 | 89 | /** Power supply */ 90 | public static final String POWER_SUPPLY = "power_supply"; 91 | 92 | /** Tape drive */ 93 | public static final String TAPE_DRIVE = "tape_drive"; 94 | 95 | /** Temperature */ 96 | public static final String TEMPERATURE = "temperature"; 97 | 98 | /** Voltage */ 99 | public static final String VOLTAGE = "voltage"; 100 | 101 | private HwTypeIncubatingValues() {} 102 | } 103 | 104 | private HwIncubatingAttributes() {} 105 | } 106 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LinuxIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class LinuxIncubatingAttributes { 16 | /** The Linux Slab memory state */ 17 | public static final AttributeKey LINUX_MEMORY_SLAB_STATE = 18 | stringKey("linux.memory.slab.state"); 19 | 20 | // Enum definitions 21 | /** Values for {@link #LINUX_MEMORY_SLAB_STATE}. */ 22 | public static final class LinuxMemorySlabStateIncubatingValues { 23 | /** reclaimable. */ 24 | public static final String RECLAIMABLE = "reclaimable"; 25 | 26 | /** unreclaimable. */ 27 | public static final String UNRECLAIMABLE = "unreclaimable"; 28 | 29 | private LinuxMemorySlabStateIncubatingValues() {} 30 | } 31 | 32 | private LinuxIncubatingAttributes() {} 33 | } 34 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LogIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class LogIncubatingAttributes { 16 | /** The basename of the file. */ 17 | public static final AttributeKey LOG_FILE_NAME = stringKey("log.file.name"); 18 | 19 | /** The basename of the file, with symlinks resolved. */ 20 | public static final AttributeKey LOG_FILE_NAME_RESOLVED = 21 | stringKey("log.file.name_resolved"); 22 | 23 | /** The full path to the file. */ 24 | public static final AttributeKey LOG_FILE_PATH = stringKey("log.file.path"); 25 | 26 | /** The full path to the file, with symlinks resolved. */ 27 | public static final AttributeKey LOG_FILE_PATH_RESOLVED = 28 | stringKey("log.file.path_resolved"); 29 | 30 | /** The stream associated with the log. See below for a list of well-known values. */ 31 | public static final AttributeKey LOG_IOSTREAM = stringKey("log.iostream"); 32 | 33 | /** 34 | * The complete original Log Record. 35 | * 36 | *

Notes: 37 | * 38 | *

This value MAY be added when processing a Log Record which was originally transmitted as a 39 | * string or equivalent data type AND the Body field of the Log Record does not contain the same 40 | * value. (e.g. a syslog or a log record read from a file.) 41 | */ 42 | public static final AttributeKey LOG_RECORD_ORIGINAL = stringKey("log.record.original"); 43 | 44 | /** 45 | * A unique identifier for the Log Record. 46 | * 47 | *

Notes: 48 | * 49 | *

If an id is provided, other log records with the same id will be considered duplicates and 50 | * can be removed safely. This means, that two distinguishable log records MUST have different 51 | * values. The id MAY be an Universally Unique 52 | * Lexicographically Sortable Identifier (ULID), but other identifiers (e.g. UUID) may be used 53 | * as needed. 54 | */ 55 | public static final AttributeKey LOG_RECORD_UID = stringKey("log.record.uid"); 56 | 57 | // Enum definitions 58 | /** Values for {@link #LOG_IOSTREAM}. */ 59 | public static final class LogIostreamIncubatingValues { 60 | /** Logs from stdout stream */ 61 | public static final String STDOUT = "stdout"; 62 | 63 | /** Events from stderr stream */ 64 | public static final String STDERR = "stderr"; 65 | 66 | private LogIostreamIncubatingValues() {} 67 | } 68 | 69 | private LogIncubatingAttributes() {} 70 | } 71 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class MessageIncubatingAttributes { 17 | /** 18 | * Deprecated, use {@code rpc.message.compressed_size} instead. 19 | * 20 | * @deprecated Replaced by {@code rpc.message.compressed_size}. 21 | */ 22 | @Deprecated 23 | public static final AttributeKey MESSAGE_COMPRESSED_SIZE = 24 | longKey("message.compressed_size"); 25 | 26 | /** 27 | * Deprecated, use {@code rpc.message.id} instead. 28 | * 29 | * @deprecated Replaced by {@code rpc.message.id}. 30 | */ 31 | @Deprecated public static final AttributeKey MESSAGE_ID = longKey("message.id"); 32 | 33 | /** 34 | * Deprecated, use {@code rpc.message.type} instead. 35 | * 36 | * @deprecated Replaced by {@code rpc.message.type}. 37 | */ 38 | @Deprecated public static final AttributeKey MESSAGE_TYPE = stringKey("message.type"); 39 | 40 | /** 41 | * Deprecated, use {@code rpc.message.uncompressed_size} instead. 42 | * 43 | * @deprecated Replaced by {@code rpc.message.uncompressed_size}. 44 | */ 45 | @Deprecated 46 | public static final AttributeKey MESSAGE_UNCOMPRESSED_SIZE = 47 | longKey("message.uncompressed_size"); 48 | 49 | // Enum definitions 50 | /** 51 | * Values for {@link #MESSAGE_TYPE} 52 | * 53 | * @deprecated Replaced by {@code rpc.message.type}. 54 | */ 55 | @Deprecated 56 | public static final class MessageTypeIncubatingValues { 57 | /** sent. */ 58 | public static final String SENT = "SENT"; 59 | 60 | /** received. */ 61 | public static final String RECEIVED = "RECEIVED"; 62 | 63 | private MessageTypeIncubatingValues() {} 64 | } 65 | 66 | private MessageIncubatingAttributes() {} 67 | } 68 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NodejsIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class NodejsIncubatingAttributes { 16 | /** The state of event loop time. */ 17 | public static final AttributeKey NODEJS_EVENTLOOP_STATE = 18 | stringKey("nodejs.eventloop.state"); 19 | 20 | // Enum definitions 21 | /** Values for {@link #NODEJS_EVENTLOOP_STATE}. */ 22 | public static final class NodejsEventloopStateIncubatingValues { 23 | /** Active time. */ 24 | public static final String ACTIVE = "active"; 25 | 26 | /** Idle time. */ 27 | public static final String IDLE = "idle"; 28 | 29 | private NodejsEventloopStateIncubatingValues() {} 30 | } 31 | 32 | private NodejsIncubatingAttributes() {} 33 | } 34 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OciIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class OciIncubatingAttributes { 16 | /** 17 | * The digest of the OCI image manifest. For container images specifically is the digest by which 18 | * the container image is known. 19 | * 20 | *

Notes: 21 | * 22 | *

Follows OCI 23 | * Image Manifest Specification, and specifically the Digest 25 | * property. An example can be found in Example 27 | * Image Manifest. 28 | */ 29 | public static final AttributeKey OCI_MANIFEST_DIGEST = stringKey("oci.manifest.digest"); 30 | 31 | // Enum definitions 32 | 33 | private OciIncubatingAttributes() {} 34 | } 35 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpentracingIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class OpentracingIncubatingAttributes { 16 | /** 17 | * Parent-child Reference type 18 | * 19 | *

Notes: 20 | * 21 | *

The causal relationship between a child Span and a parent Span. 22 | */ 23 | public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); 24 | 25 | // Enum definitions 26 | /** Values for {@link #OPENTRACING_REF_TYPE}. */ 27 | public static final class OpentracingRefTypeIncubatingValues { 28 | /** The parent Span depends on the child Span in some capacity */ 29 | public static final String CHILD_OF = "child_of"; 30 | 31 | /** The parent Span doesn't depend in any way on the result of the child Span */ 32 | public static final String FOLLOWS_FROM = "follows_from"; 33 | 34 | private OpentracingRefTypeIncubatingValues() {} 35 | } 36 | 37 | private OpentracingIncubatingAttributes() {} 38 | } 39 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OsIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class OsIncubatingAttributes { 16 | /** Unique identifier for a particular build or compilation of the operating system. */ 17 | public static final AttributeKey OS_BUILD_ID = stringKey("os.build_id"); 18 | 19 | /** 20 | * Human readable (not intended to be parsed) OS version information, like e.g. reported by {@code 21 | * ver} or {@code lsb_release -a} commands. 22 | */ 23 | public static final AttributeKey OS_DESCRIPTION = stringKey("os.description"); 24 | 25 | /** Human readable operating system name. */ 26 | public static final AttributeKey OS_NAME = stringKey("os.name"); 27 | 28 | /** The operating system type. */ 29 | public static final AttributeKey OS_TYPE = stringKey("os.type"); 30 | 31 | /** 32 | * The version string of the operating system as defined in Version Attributes. 34 | */ 35 | public static final AttributeKey OS_VERSION = stringKey("os.version"); 36 | 37 | // Enum definitions 38 | /** Values for {@link #OS_TYPE}. */ 39 | public static final class OsTypeIncubatingValues { 40 | /** Microsoft Windows */ 41 | public static final String WINDOWS = "windows"; 42 | 43 | /** Linux */ 44 | public static final String LINUX = "linux"; 45 | 46 | /** Apple Darwin */ 47 | public static final String DARWIN = "darwin"; 48 | 49 | /** FreeBSD */ 50 | public static final String FREEBSD = "freebsd"; 51 | 52 | /** NetBSD */ 53 | public static final String NETBSD = "netbsd"; 54 | 55 | /** OpenBSD */ 56 | public static final String OPENBSD = "openbsd"; 57 | 58 | /** DragonFly BSD */ 59 | public static final String DRAGONFLYBSD = "dragonflybsd"; 60 | 61 | /** HP-UX (Hewlett Packard Unix) */ 62 | public static final String HPUX = "hpux"; 63 | 64 | /** AIX (Advanced Interactive eXecutive) */ 65 | public static final String AIX = "aix"; 66 | 67 | /** SunOS, Oracle Solaris */ 68 | public static final String SOLARIS = "solaris"; 69 | 70 | /** IBM z/OS */ 71 | public static final String Z_OS = "z_os"; 72 | 73 | private OsTypeIncubatingValues() {} 74 | } 75 | 76 | private OsIncubatingAttributes() {} 77 | } 78 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtherIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class OtherIncubatingAttributes { 16 | /** 17 | * Deprecated, use {@code db.client.connection.state} instead. 18 | * 19 | * @deprecated Replaced by {@code db.client.connection.state}. 20 | */ 21 | @Deprecated public static final AttributeKey STATE = stringKey("state"); 22 | 23 | // Enum definitions 24 | /** 25 | * Values for {@link #STATE} 26 | * 27 | * @deprecated Replaced by {@code db.client.connection.state}. 28 | */ 29 | @Deprecated 30 | public static final class StateIncubatingValues { 31 | /** idle. */ 32 | public static final String IDLE = "idle"; 33 | 34 | /** used. */ 35 | public static final String USED = "used"; 36 | 37 | private StateIncubatingValues() {} 38 | } 39 | 40 | private OtherIncubatingAttributes() {} 41 | } 42 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PeerIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class PeerIncubatingAttributes { 16 | /** 17 | * The {@code service.name} of the remote service. 18 | * SHOULD be equal to the actual {@code service.name} resource attribute of the remote service if 19 | * any. 20 | */ 21 | public static final AttributeKey PEER_SERVICE = stringKey("peer.service"); 22 | 23 | // Enum definitions 24 | 25 | private PeerIncubatingAttributes() {} 26 | } 27 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PoolIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class PoolIncubatingAttributes { 16 | /** 17 | * Deprecated, use {@code db.client.connection.pool.name} instead. 18 | * 19 | * @deprecated Replaced by {@code db.client.connection.pool.name}. 20 | */ 21 | @Deprecated public static final AttributeKey POOL_NAME = stringKey("pool.name"); 22 | 23 | // Enum definitions 24 | 25 | private PoolIncubatingAttributes() {} 26 | } 27 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ProfileIncubatingAttributes { 16 | /** Describes the interpreter or compiler of a single frame. */ 17 | public static final AttributeKey PROFILE_FRAME_TYPE = stringKey("profile.frame.type"); 18 | 19 | // Enum definitions 20 | /** Values for {@link #PROFILE_FRAME_TYPE}. */ 21 | public static final class ProfileFrameTypeIncubatingValues { 22 | /** .NET */ 23 | public static final String DOTNET = "dotnet"; 24 | 25 | /** JVM */ 26 | public static final String JVM = "jvm"; 27 | 28 | /** Kernel */ 29 | public static final String KERNEL = "kernel"; 30 | 31 | /** 32 | * Can be one of but not limited to C, C++, Go or Rust. If possible, a more 37 | * precise value MUST be used. 38 | */ 39 | public static final String NATIVE = "native"; 40 | 41 | /** Perl */ 42 | public static final String PERL = "perl"; 43 | 44 | /** PHP */ 45 | public static final String PHP = "php"; 46 | 47 | /** Python */ 48 | public static final String CPYTHON = "cpython"; 49 | 50 | /** Ruby */ 51 | public static final String RUBY = "ruby"; 52 | 53 | /** V8JS */ 54 | public static final String V8JS = "v8js"; 55 | 56 | /** Erlang */ 57 | public static final String BEAM = "beam"; 58 | 59 | /** Go, */ 60 | public static final String GO = "go"; 61 | 62 | /** Rust */ 63 | public static final String RUST = "rust"; 64 | 65 | private ProfileFrameTypeIncubatingValues() {} 66 | } 67 | 68 | private ProfileIncubatingAttributes() {} 69 | } 70 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SecurityRuleIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class SecurityRuleIncubatingAttributes { 16 | /** 17 | * A categorization value keyword used by the entity using the rule for detection of this event 18 | */ 19 | public static final AttributeKey SECURITY_RULE_CATEGORY = 20 | stringKey("security_rule.category"); 21 | 22 | /** The description of the rule generating the event. */ 23 | public static final AttributeKey SECURITY_RULE_DESCRIPTION = 24 | stringKey("security_rule.description"); 25 | 26 | /** Name of the license under which the rule used to generate this event is made available. */ 27 | public static final AttributeKey SECURITY_RULE_LICENSE = 28 | stringKey("security_rule.license"); 29 | 30 | /** The name of the rule or signature generating the event. */ 31 | public static final AttributeKey SECURITY_RULE_NAME = stringKey("security_rule.name"); 32 | 33 | /** 34 | * Reference URL to additional information about the rule used to generate this event. 35 | * 36 | *

Notes: 37 | * 38 | *

The URL can point to the vendor’s documentation about the rule. If that’s not available, it 39 | * can also be a link to a more general page describing this type of alert. 40 | */ 41 | public static final AttributeKey SECURITY_RULE_REFERENCE = 42 | stringKey("security_rule.reference"); 43 | 44 | /** 45 | * Name of the ruleset, policy, group, or parent category in which the rule used to generate this 46 | * event is a member. 47 | */ 48 | public static final AttributeKey SECURITY_RULE_RULESET_NAME = 49 | stringKey("security_rule.ruleset.name"); 50 | 51 | /** 52 | * A rule ID that is unique within the scope of a set or group of agents, observers, or other 53 | * entities using the rule for detection of this event. 54 | */ 55 | public static final AttributeKey SECURITY_RULE_UUID = stringKey("security_rule.uuid"); 56 | 57 | /** The version / revision of the rule being used for analysis. */ 58 | public static final AttributeKey SECURITY_RULE_VERSION = 59 | stringKey("security_rule.version"); 60 | 61 | // Enum definitions 62 | 63 | private SecurityRuleIncubatingAttributes() {} 64 | } 65 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServerIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class ServerIncubatingAttributes { 17 | /** 18 | * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix 19 | * domain socket name. 20 | * 21 | *

Notes: 22 | * 23 | *

When observed from the client side, and when communicating through an intermediary, {@code 24 | * server.address} SHOULD represent the server address behind any intermediaries, for example 25 | * proxies, if it's available. 26 | * 27 | * @deprecated deprecated in favor of stable {@link 28 | * io.opentelemetry.semconv.ServerAttributes#SERVER_ADDRESS} attribute. 29 | */ 30 | @Deprecated public static final AttributeKey SERVER_ADDRESS = stringKey("server.address"); 31 | 32 | /** 33 | * Server port number. 34 | * 35 | *

Notes: 36 | * 37 | *

When observed from the client side, and when communicating through an intermediary, {@code 38 | * server.port} SHOULD represent the server port behind any intermediaries, for example proxies, 39 | * if it's available. 40 | * 41 | * @deprecated deprecated in favor of stable {@link 42 | * io.opentelemetry.semconv.ServerAttributes#SERVER_PORT} attribute. 43 | */ 44 | @Deprecated public static final AttributeKey SERVER_PORT = longKey("server.port"); 45 | 46 | // Enum definitions 47 | 48 | private ServerIncubatingAttributes() {} 49 | } 50 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ServiceIncubatingAttributes { 16 | /** 17 | * The string ID of the service instance. 18 | * 19 | *

Notes: 20 | * 21 | *

MUST be unique for each instance of the same {@code service.namespace,service.name} pair (in 22 | * other words {@code service.namespace,service.name,service.instance.id} triplet MUST be globally 23 | * unique). The ID helps to distinguish instances of the same service that exist at the same time 24 | * (e.g. instances of a horizontally scaled service). 25 | * 26 | *

Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 27 | * RFC 4122 UUID, but are free to use an 28 | * inherent unique ID as the source of this value if stability is desirable. In that case, the ID 29 | * SHOULD be used as source of a UUID Version 5 and SHOULD use the following UUID as the 30 | * namespace: {@code 4d63009a-8d0f-11ee-aad7-4c796ed8e320}. 31 | * 32 | *

UUIDs are typically recommended, as only an opaque value for the purposes of identifying a 33 | * service instance is needed. Similar to what can be seen in the man page for the {@code 35 | * /etc/machine-id} file, the underlying data, such as pod name and namespace should be 36 | * treated as confidential, being the user's choice to expose it or not via another resource 37 | * attribute. 38 | * 39 | *

For applications running behind an application server (like unicorn), we do not recommend 40 | * using one identifier for all processes participating in the application. Instead, it's 41 | * recommended each division (e.g. a worker thread in unicorn) to have its own instance.id. 42 | * 43 | *

It's not recommended for a Collector to set {@code service.instance.id} if it can't 44 | * unambiguously determine the service instance that is generating that telemetry. For instance, 45 | * creating an UUID based on {@code pod.name} will likely be wrong, as the Collector might not 46 | * know from which container within that pod the telemetry originated. However, Collectors can set 47 | * the {@code service.instance.id} if they can unambiguously determine the service instance for 48 | * that telemetry. This is typically the case for scraping receivers, as they know the target 49 | * address and port. 50 | */ 51 | public static final AttributeKey SERVICE_INSTANCE_ID = stringKey("service.instance.id"); 52 | 53 | /** 54 | * Logical name of the service. 55 | * 56 | *

Notes: 57 | * 58 | *

MUST be the same for all instances of horizontally scaled services. If the value was not 59 | * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with {@code process.executable.name}, e.g. {@code unknown_service:bash}. If 61 | * {@code process.executable.name} is not available, the value MUST be set to {@code 62 | * unknown_service}. 63 | * 64 | * @deprecated deprecated in favor of stable {@link 65 | * io.opentelemetry.semconv.ServiceAttributes#SERVICE_NAME} attribute. 66 | */ 67 | @Deprecated public static final AttributeKey SERVICE_NAME = stringKey("service.name"); 68 | 69 | /** 70 | * A namespace for {@code service.name}. 71 | * 72 | *

Notes: 73 | * 74 | *

A string value having a meaning that helps to distinguish a group of services, for example 75 | * the team name that owns a group of services. {@code service.name} is expected to be unique 76 | * within the same namespace. If {@code service.namespace} is not specified in the Resource then 77 | * {@code service.name} is expected to be unique for all services that have no explicit namespace 78 | * defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length 79 | * namespace string is assumed equal to unspecified namespace. 80 | */ 81 | public static final AttributeKey SERVICE_NAMESPACE = stringKey("service.namespace"); 82 | 83 | /** 84 | * The version string of the service API or implementation. The format is not defined by these 85 | * conventions. 86 | * 87 | * @deprecated deprecated in favor of stable {@link 88 | * io.opentelemetry.semconv.ServiceAttributes#SERVICE_VERSION} attribute. 89 | */ 90 | @Deprecated 91 | public static final AttributeKey SERVICE_VERSION = stringKey("service.version"); 92 | 93 | // Enum definitions 94 | 95 | private ServiceIncubatingAttributes() {} 96 | } 97 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SessionIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class SessionIncubatingAttributes { 16 | /** A unique id to identify a session. */ 17 | public static final AttributeKey SESSION_ID = stringKey("session.id"); 18 | 19 | /** The previous {@code session.id} for this user, when known. */ 20 | public static final AttributeKey SESSION_PREVIOUS_ID = stringKey("session.previous_id"); 21 | 22 | // Enum definitions 23 | 24 | private SessionIncubatingAttributes() {} 25 | } 26 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SourceIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class SourceIncubatingAttributes { 17 | /** 18 | * Source address - domain name if available without reverse DNS lookup; otherwise, IP address or 19 | * Unix domain socket name. 20 | * 21 | *

Notes: 22 | * 23 | *

When observed from the destination side, and when communicating through an intermediary, 24 | * {@code source.address} SHOULD represent the source address behind any intermediaries, for 25 | * example proxies, if it's available. 26 | */ 27 | public static final AttributeKey SOURCE_ADDRESS = stringKey("source.address"); 28 | 29 | /** Source port number */ 30 | public static final AttributeKey SOURCE_PORT = longKey("source.port"); 31 | 32 | // Enum definitions 33 | 34 | private SourceIncubatingAttributes() {} 35 | } 36 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TelemetryIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class TelemetryIncubatingAttributes { 16 | /** 17 | * The name of the auto instrumentation agent or distribution, if used. 18 | * 19 | *

Notes: 20 | * 21 | *

Official auto instrumentation agents and distributions SHOULD set the {@code 22 | * telemetry.distro.name} attribute to a string starting with {@code opentelemetry-}, e.g. {@code 23 | * opentelemetry-java-instrumentation}. 24 | */ 25 | public static final AttributeKey TELEMETRY_DISTRO_NAME = 26 | stringKey("telemetry.distro.name"); 27 | 28 | /** The version string of the auto instrumentation agent or distribution, if used. */ 29 | public static final AttributeKey TELEMETRY_DISTRO_VERSION = 30 | stringKey("telemetry.distro.version"); 31 | 32 | /** 33 | * The language of the telemetry SDK. 34 | * 35 | * @deprecated deprecated in favor of stable {@link 36 | * io.opentelemetry.semconv.TelemetryAttributes#TELEMETRY_SDK_LANGUAGE} attribute. 37 | */ 38 | @Deprecated 39 | public static final AttributeKey TELEMETRY_SDK_LANGUAGE = 40 | stringKey("telemetry.sdk.language"); 41 | 42 | /** 43 | * The name of the telemetry SDK as defined above. 44 | * 45 | *

Notes: 46 | * 47 | *

The OpenTelemetry SDK MUST set the {@code telemetry.sdk.name} attribute to {@code 48 | * opentelemetry}. If another SDK, like a fork or a vendor-provided implementation, is used, this 49 | * SDK MUST set the {@code telemetry.sdk.name} attribute to the fully-qualified class or module 50 | * name of this SDK's main entry point or another suitable identifier depending on the language. 51 | * The identifier {@code opentelemetry} is reserved and MUST NOT be used in this case. All custom 52 | * identifiers SHOULD be stable across different versions of an implementation. 53 | * 54 | * @deprecated deprecated in favor of stable {@link 55 | * io.opentelemetry.semconv.TelemetryAttributes#TELEMETRY_SDK_NAME} attribute. 56 | */ 57 | @Deprecated 58 | public static final AttributeKey TELEMETRY_SDK_NAME = stringKey("telemetry.sdk.name"); 59 | 60 | /** 61 | * The version string of the telemetry SDK. 62 | * 63 | * @deprecated deprecated in favor of stable {@link 64 | * io.opentelemetry.semconv.TelemetryAttributes#TELEMETRY_SDK_VERSION} attribute. 65 | */ 66 | @Deprecated 67 | public static final AttributeKey TELEMETRY_SDK_VERSION = 68 | stringKey("telemetry.sdk.version"); 69 | 70 | // Enum definitions 71 | /** 72 | * Values for {@link #TELEMETRY_SDK_LANGUAGE}. 73 | * 74 | * @deprecated deprecated in favor of stable {@link 75 | * io.opentelemetry.semconv.TelemetryAttributes.TelemetrySdkLanguageValues}. 76 | */ 77 | @Deprecated 78 | public static final class TelemetrySdkLanguageIncubatingValues { 79 | /** cpp. */ 80 | public static final String CPP = "cpp"; 81 | 82 | /** dotnet. */ 83 | public static final String DOTNET = "dotnet"; 84 | 85 | /** erlang. */ 86 | public static final String ERLANG = "erlang"; 87 | 88 | /** go. */ 89 | public static final String GO = "go"; 90 | 91 | /** java. */ 92 | public static final String JAVA = "java"; 93 | 94 | /** nodejs. */ 95 | public static final String NODEJS = "nodejs"; 96 | 97 | /** php. */ 98 | public static final String PHP = "php"; 99 | 100 | /** python. */ 101 | public static final String PYTHON = "python"; 102 | 103 | /** ruby. */ 104 | public static final String RUBY = "ruby"; 105 | 106 | /** rust. */ 107 | public static final String RUST = "rust"; 108 | 109 | /** swift. */ 110 | public static final String SWIFT = "swift"; 111 | 112 | /** webjs. */ 113 | public static final String WEBJS = "webjs"; 114 | 115 | private TelemetrySdkLanguageIncubatingValues() {} 116 | } 117 | 118 | private TelemetryIncubatingAttributes() {} 119 | } 120 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TestIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class TestIncubatingAttributes { 16 | /** 17 | * The fully qualified human readable name of the test case. 19 | */ 20 | public static final AttributeKey TEST_CASE_NAME = stringKey("test.case.name"); 21 | 22 | /** The status of the actual test case result from test execution. */ 23 | public static final AttributeKey TEST_CASE_RESULT_STATUS = 24 | stringKey("test.case.result.status"); 25 | 26 | /** 27 | * The human readable name of a test suite. 28 | */ 29 | public static final AttributeKey TEST_SUITE_NAME = stringKey("test.suite.name"); 30 | 31 | /** The status of the test suite run. */ 32 | public static final AttributeKey TEST_SUITE_RUN_STATUS = 33 | stringKey("test.suite.run.status"); 34 | 35 | // Enum definitions 36 | /** Values for {@link #TEST_CASE_RESULT_STATUS}. */ 37 | public static final class TestCaseResultStatusIncubatingValues { 38 | /** pass */ 39 | public static final String PASS = "pass"; 40 | 41 | /** fail */ 42 | public static final String FAIL = "fail"; 43 | 44 | private TestCaseResultStatusIncubatingValues() {} 45 | } 46 | 47 | /** Values for {@link #TEST_SUITE_RUN_STATUS}. */ 48 | public static final class TestSuiteRunStatusIncubatingValues { 49 | /** success */ 50 | public static final String SUCCESS = "success"; 51 | 52 | /** failure */ 53 | public static final String FAILURE = "failure"; 54 | 55 | /** skipped */ 56 | public static final String SKIPPED = "skipped"; 57 | 58 | /** aborted */ 59 | public static final String ABORTED = "aborted"; 60 | 61 | /** timed_out */ 62 | public static final String TIMED_OUT = "timed_out"; 63 | 64 | /** in_progress */ 65 | public static final String IN_PROGRESS = "in_progress"; 66 | 67 | private TestSuiteRunStatusIncubatingValues() {} 68 | } 69 | 70 | private TestIncubatingAttributes() {} 71 | } 72 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ThreadIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class ThreadIncubatingAttributes { 17 | /** Current "managed" thread ID (as opposed to OS thread ID). */ 18 | public static final AttributeKey THREAD_ID = longKey("thread.id"); 19 | 20 | /** Current thread name. */ 21 | public static final AttributeKey THREAD_NAME = stringKey("thread.name"); 22 | 23 | // Enum definitions 24 | 25 | private ThreadIncubatingAttributes() {} 26 | } 27 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class UserAgentIncubatingAttributes { 16 | /** 17 | * Name of the user-agent extracted from original. Usually refers to the browser's name. 18 | * 19 | *

Notes: 20 | * 21 | *

Example of extracting browser's name from original 22 | * string. In the case of using a user-agent for non-browser products, such as microservices with 23 | * multiple names/versions inside the {@code user_agent.original}, the most significant name 24 | * SHOULD be selected. In such a scenario it should align with {@code user_agent.version} 25 | */ 26 | public static final AttributeKey USER_AGENT_NAME = stringKey("user_agent.name"); 27 | 28 | /** 29 | * Value of the HTTP 30 | * User-Agent header sent by the client. 31 | * 32 | * @deprecated deprecated in favor of stable {@link 33 | * io.opentelemetry.semconv.UserAgentAttributes#USER_AGENT_ORIGINAL} attribute. 34 | */ 35 | @Deprecated 36 | public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); 37 | 38 | /** 39 | * Human readable operating system name. 40 | * 41 | *

Notes: 42 | * 43 | *

For mapping user agent strings to OS names, libraries such as ua-parser can be utilized. 45 | */ 46 | public static final AttributeKey USER_AGENT_OS_NAME = stringKey("user_agent.os.name"); 47 | 48 | /** 49 | * The version string of the operating system as defined in Version Attributes. 51 | * 52 | *

Notes: 53 | * 54 | *

For mapping user agent strings to OS versions, libraries such as ua-parser can be utilized. 56 | */ 57 | public static final AttributeKey USER_AGENT_OS_VERSION = 58 | stringKey("user_agent.os.version"); 59 | 60 | /** 61 | * Specifies the category of synthetic traffic, such as tests or bots. 62 | * 63 | *

Notes: 64 | * 65 | *

This attribute MAY be derived from the contents of the {@code user_agent.original} 66 | * attribute. Components that populate the attribute are responsible for determining what they 67 | * consider to be synthetic bot or test traffic. This attribute can either be set for 68 | * self-identification purposes, or on telemetry detected to be generated as a result of a 69 | * synthetic request. This attribute is useful for distinguishing between genuine client traffic 70 | * and synthetic traffic generated by bots or tests. 71 | */ 72 | public static final AttributeKey USER_AGENT_SYNTHETIC_TYPE = 73 | stringKey("user_agent.synthetic.type"); 74 | 75 | /** 76 | * Version of the user-agent extracted from original. Usually refers to the browser's version 77 | * 78 | *

Notes: 79 | * 80 | *

Example of extracting browser's version from 81 | * original string. In the case of using a user-agent for non-browser products, such as 82 | * microservices with multiple names/versions inside the {@code user_agent.original}, the most 83 | * significant version SHOULD be selected. In such a scenario it should align with {@code 84 | * user_agent.name} 85 | */ 86 | public static final AttributeKey USER_AGENT_VERSION = stringKey("user_agent.version"); 87 | 88 | // Enum definitions 89 | /** Values for {@link #USER_AGENT_SYNTHETIC_TYPE}. */ 90 | public static final class UserAgentSyntheticTypeIncubatingValues { 91 | /** Bot source. */ 92 | public static final String BOT = "bot"; 93 | 94 | /** Synthetic test source. */ 95 | public static final String TEST = "test"; 96 | 97 | private UserAgentSyntheticTypeIncubatingValues() {} 98 | } 99 | 100 | private UserAgentIncubatingAttributes() {} 101 | } 102 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | import java.util.List; 13 | 14 | // DO NOT EDIT, this is an Auto-generated file from 15 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 16 | @SuppressWarnings("unused") 17 | public final class UserIncubatingAttributes { 18 | /** User email address. */ 19 | public static final AttributeKey USER_EMAIL = stringKey("user.email"); 20 | 21 | /** User's full name */ 22 | public static final AttributeKey USER_FULL_NAME = stringKey("user.full_name"); 23 | 24 | /** 25 | * Unique user hash to correlate information for a user in anonymized form. 26 | * 27 | *

Notes: 28 | * 29 | *

Useful if {@code user.id} or {@code user.name} contain confidential information and cannot 30 | * be used. 31 | */ 32 | public static final AttributeKey USER_HASH = stringKey("user.hash"); 33 | 34 | /** Unique identifier of the user. */ 35 | public static final AttributeKey USER_ID = stringKey("user.id"); 36 | 37 | /** Short name or login/username of the user. */ 38 | public static final AttributeKey USER_NAME = stringKey("user.name"); 39 | 40 | /** Array of user roles at the time of the event. */ 41 | public static final AttributeKey> USER_ROLES = stringArrayKey("user.roles"); 42 | 43 | // Enum definitions 44 | 45 | private UserIncubatingAttributes() {} 46 | } 47 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/V8jsIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class V8jsIncubatingAttributes { 16 | /** The type of garbage collection. */ 17 | public static final AttributeKey V8JS_GC_TYPE = stringKey("v8js.gc.type"); 18 | 19 | /** 20 | * The name of the space type of heap memory. 21 | * 22 | *

Notes: 23 | * 24 | *

Value can be retrieved from value {@code space_name} of {@code 26 | * v8.getHeapSpaceStatistics()} 27 | */ 28 | public static final AttributeKey V8JS_HEAP_SPACE_NAME = stringKey("v8js.heap.space.name"); 29 | 30 | // Enum definitions 31 | /** Values for {@link #V8JS_GC_TYPE}. */ 32 | public static final class V8jsGcTypeIncubatingValues { 33 | /** Major (Mark Sweep Compact). */ 34 | public static final String MAJOR = "major"; 35 | 36 | /** Minor (Scavenge). */ 37 | public static final String MINOR = "minor"; 38 | 39 | /** Incremental (Incremental Marking). */ 40 | public static final String INCREMENTAL = "incremental"; 41 | 42 | /** Weak Callbacks (Process Weak Callbacks). */ 43 | public static final String WEAKCB = "weakcb"; 44 | 45 | private V8jsGcTypeIncubatingValues() {} 46 | } 47 | 48 | /** Values for {@link #V8JS_HEAP_SPACE_NAME}. */ 49 | public static final class V8jsHeapSpaceNameIncubatingValues { 50 | /** New memory space. */ 51 | public static final String NEW_SPACE = "new_space"; 52 | 53 | /** Old memory space. */ 54 | public static final String OLD_SPACE = "old_space"; 55 | 56 | /** Code memory space. */ 57 | public static final String CODE_SPACE = "code_space"; 58 | 59 | /** Map memory space. */ 60 | public static final String MAP_SPACE = "map_space"; 61 | 62 | /** Large object memory space. */ 63 | public static final String LARGE_OBJECT_SPACE = "large_object_space"; 64 | 65 | private V8jsHeapSpaceNameIncubatingValues() {} 66 | } 67 | 68 | private V8jsIncubatingAttributes() {} 69 | } 70 | -------------------------------------------------------------------------------- /semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/WebengineIncubatingAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv.incubating; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class WebengineIncubatingAttributes { 16 | /** Additional description of the web engine (e.g. detailed version and edition information). */ 17 | public static final AttributeKey WEBENGINE_DESCRIPTION = 18 | stringKey("webengine.description"); 19 | 20 | /** The name of the web engine. */ 21 | public static final AttributeKey WEBENGINE_NAME = stringKey("webengine.name"); 22 | 23 | /** The version of the web engine. */ 24 | public static final AttributeKey WEBENGINE_VERSION = stringKey("webengine.version"); 25 | 26 | // Enum definitions 27 | 28 | private WebengineIncubatingAttributes() {} 29 | } 30 | -------------------------------------------------------------------------------- /semconv/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("otel.java-conventions") 3 | id("otel.publish-conventions") 4 | 5 | id("otel.animalsniffer-conventions") 6 | } 7 | 8 | base { 9 | description = "OpenTelemetry Stable Semantic Conventions generated classes for Java" 10 | archivesName.set("opentelemetry-semconv") 11 | } 12 | otelJava.moduleName.set("io.opentelemetry.semconv") 13 | 14 | dependencies { 15 | compileOnly("io.opentelemetry:opentelemetry-api") 16 | 17 | testImplementation("io.opentelemetry:opentelemetry-api") 18 | } 19 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/AttributeKeyTemplate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import io.opentelemetry.api.common.AttributeKey; 9 | import io.opentelemetry.api.common.AttributeType; 10 | import java.util.List; 11 | import java.util.concurrent.ConcurrentHashMap; 12 | import java.util.concurrent.ConcurrentMap; 13 | import java.util.function.Function; 14 | 15 | /** 16 | * This class provides a handle for creating and caching dynamic / template-type attributes of the 17 | * form <prefix>.<key>. The <prefix> is fixed for a template instance while 18 | * {@link AttributeKey}s can be created and are cached for different values of the <key> part. 19 | * 20 | *

An example template-type attribute is the set of attributes for HTTP headers: 21 | * http.request.header.<key> 22 | * 23 | * @param The type of the nested {@link AttributeKey}s. 24 | */ 25 | public final class AttributeKeyTemplate { 26 | 27 | private final String prefix; 28 | private final Function> keyBuilder; 29 | private final ConcurrentMap> keysCache = new ConcurrentHashMap<>(1); 30 | 31 | private AttributeKeyTemplate(String prefix, Function> keyBuilder) { 32 | this.prefix = prefix; 33 | this.keyBuilder = keyBuilder; 34 | } 35 | 36 | /** 37 | * Create an {@link AttributeKeyTemplate} with type {@link AttributeType#STRING} and the given 38 | * {@code prefix}. 39 | */ 40 | public static AttributeKeyTemplate stringKeyTemplate(String prefix) { 41 | return new AttributeKeyTemplate<>(prefix, AttributeKey::stringKey); 42 | } 43 | 44 | /** 45 | * Create an {@link AttributeKeyTemplate} with type {@link AttributeType#STRING_ARRAY} and the 46 | * given {@code prefix}. 47 | */ 48 | public static AttributeKeyTemplate> stringArrayKeyTemplate(String prefix) { 49 | return new AttributeKeyTemplate<>(prefix, AttributeKey::stringArrayKey); 50 | } 51 | 52 | /** 53 | * Create an {@link AttributeKeyTemplate} with type {@link AttributeType#BOOLEAN} and the given 54 | * {@code prefix}. 55 | */ 56 | public static AttributeKeyTemplate booleanKeyTemplate(String prefix) { 57 | return new AttributeKeyTemplate<>(prefix, AttributeKey::booleanKey); 58 | } 59 | 60 | /** 61 | * Create an {@link AttributeKeyTemplate} with type {@link AttributeType#BOOLEAN_ARRAY} and the 62 | * given {@code prefix}. 63 | */ 64 | public static AttributeKeyTemplate> booleanArrayKeyTemplate(String prefix) { 65 | return new AttributeKeyTemplate<>(prefix, AttributeKey::booleanArrayKey); 66 | } 67 | 68 | /** 69 | * Create an {@link AttributeKeyTemplate} with type {@link AttributeType#LONG} and the given 70 | * {@code prefix}. 71 | */ 72 | public static AttributeKeyTemplate longKeyTemplate(String prefix) { 73 | return new AttributeKeyTemplate<>(prefix, AttributeKey::longKey); 74 | } 75 | 76 | /** 77 | * Create an {@link AttributeKeyTemplate} with type {@link AttributeType#LONG_ARRAY} and the given 78 | * {@code prefix}. 79 | */ 80 | public static AttributeKeyTemplate> longArrayKeyTemplate(String prefix) { 81 | return new AttributeKeyTemplate<>(prefix, AttributeKey::longArrayKey); 82 | } 83 | 84 | /** 85 | * Create an {@link AttributeKeyTemplate} with type {@link AttributeType#DOUBLE} and the given 86 | * {@code prefix}. 87 | */ 88 | public static AttributeKeyTemplate doubleKeyTemplate(String prefix) { 89 | return new AttributeKeyTemplate<>(prefix, AttributeKey::doubleKey); 90 | } 91 | 92 | /** 93 | * Create an {@link AttributeKeyTemplate} with type {@link AttributeType#DOUBLE_ARRAY} and the 94 | * given {@code prefix}. 95 | */ 96 | public static AttributeKeyTemplate> doubleArrayKeyTemplate(String prefix) { 97 | return new AttributeKeyTemplate<>(prefix, AttributeKey::doubleArrayKey); 98 | } 99 | 100 | private AttributeKey createAttributeKey(String keyName) { 101 | String key = prefix + "." + keyName; 102 | return keyBuilder.apply(key); 103 | } 104 | 105 | /** 106 | * Returns an {@link AttributeKey} object for the given attribute key whereby the key is the 107 | * variable part of the full attribute name in a template-typed attribute, for example 108 | * http.request.header.<key>. 109 | * 110 | *

{@link AttributeKey} objets are being created and cached on the first invocation of this 111 | * method for a certain key. Subsequent invocations of this method with the same key return the 112 | * cached object. 113 | * 114 | * @param key The variable part of the template-typed attribute name. 115 | * @return An {@link AttributeKey} object for the given key. 116 | */ 117 | public AttributeKey getAttributeKey(String key) { 118 | return keysCache.computeIfAbsent(key, this::createAttributeKey); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/ClientAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class ClientAttributes { 17 | /** 18 | * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or 19 | * Unix domain socket name. 20 | * 21 | *

Notes: 22 | * 23 | *

When observed from the server side, and when communicating through an intermediary, {@code 24 | * client.address} SHOULD represent the client address behind any intermediaries, for example 25 | * proxies, if it's available. 26 | */ 27 | public static final AttributeKey CLIENT_ADDRESS = stringKey("client.address"); 28 | 29 | /** 30 | * Client port number. 31 | * 32 | *

Notes: 33 | * 34 | *

When observed from the server side, and when communicating through an intermediary, {@code 35 | * client.port} SHOULD represent the client port behind any intermediaries, for example proxies, 36 | * if it's available. 37 | */ 38 | public static final AttributeKey CLIENT_PORT = longKey("client.port"); 39 | 40 | private ClientAttributes() {} 41 | } 42 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ErrorAttributes { 16 | /** 17 | * Describes a class of error the operation ended with. 18 | * 19 | *

Notes: 20 | * 21 | *

The {@code error.type} SHOULD be predictable, and SHOULD have low cardinality. 22 | * 23 | *

When {@code error.type} is set to a type (e.g., an exception type), its canonical class name 24 | * identifying the type within the artifact SHOULD be used. 25 | * 26 | *

Instrumentations SHOULD document the list of errors they report. 27 | * 28 | *

The cardinality of {@code error.type} within one instrumentation library SHOULD be low. 29 | * Telemetry consumers that aggregate data from multiple instrumentation libraries and 30 | * applications should be prepared for {@code error.type} to have high cardinality at query time 31 | * when no additional filters are applied. 32 | * 33 | *

If the operation has completed successfully, instrumentations SHOULD NOT set {@code 34 | * error.type}. 35 | * 36 | *

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status 37 | * codes), it's RECOMMENDED to: 38 | * 39 | *

    40 | *
  • Use a domain-specific attribute 41 | *
  • Set {@code error.type} to capture all errors, regardless of whether they are defined 42 | * within the domain-specific set or not. 43 | *
44 | */ 45 | public static final AttributeKey ERROR_TYPE = stringKey("error.type"); 46 | 47 | // Enum definition 48 | /** Values for {@link #ERROR_TYPE}. */ 49 | public static final class ErrorTypeValues { 50 | /** A fallback error value to be used when the instrumentation doesn't define a custom value. */ 51 | public static final String OTHER = "_OTHER"; 52 | 53 | private ErrorTypeValues() {} 54 | } 55 | 56 | private ErrorAttributes() {} 57 | } 58 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ExceptionAttributes { 16 | /** The exception message. */ 17 | public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); 18 | 19 | /** 20 | * A stacktrace as a string in the natural representation for the language runtime. The 21 | * representation is to be determined and documented by each language SIG. 22 | */ 23 | public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); 24 | 25 | /** 26 | * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of 27 | * the exception should be preferred over the static type in languages that support it. 28 | */ 29 | public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); 30 | 31 | private ExceptionAttributes() {} 32 | } 33 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/JvmAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.booleanKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class JvmAttributes { 17 | /** 18 | * Name of the garbage collector action. 19 | * 20 | *

Notes: 21 | * 22 | *

Garbage collector action is generally obtained via GarbageCollectionNotificationInfo#getGcAction(). 24 | */ 25 | public static final AttributeKey JVM_GC_ACTION = stringKey("jvm.gc.action"); 26 | 27 | /** 28 | * Name of the garbage collector. 29 | * 30 | *

Notes: 31 | * 32 | *

Garbage collector name is generally obtained via GarbageCollectionNotificationInfo#getGcName(). 34 | */ 35 | public static final AttributeKey JVM_GC_NAME = stringKey("jvm.gc.name"); 36 | 37 | /** 38 | * Name of the memory pool. 39 | * 40 | *

Notes: 41 | * 42 | *

Pool names are generally obtained via MemoryPoolMXBean#getName(). 44 | */ 45 | public static final AttributeKey JVM_MEMORY_POOL_NAME = stringKey("jvm.memory.pool.name"); 46 | 47 | /** The type of memory. */ 48 | public static final AttributeKey JVM_MEMORY_TYPE = stringKey("jvm.memory.type"); 49 | 50 | /** Whether the thread is daemon or not. */ 51 | public static final AttributeKey JVM_THREAD_DAEMON = booleanKey("jvm.thread.daemon"); 52 | 53 | /** State of the thread. */ 54 | public static final AttributeKey JVM_THREAD_STATE = stringKey("jvm.thread.state"); 55 | 56 | // Enum definition 57 | /** Values for {@link #JVM_MEMORY_TYPE}. */ 58 | public static final class JvmMemoryTypeValues { 59 | /** Heap memory. */ 60 | public static final String HEAP = "heap"; 61 | 62 | /** Non-heap memory */ 63 | public static final String NON_HEAP = "non_heap"; 64 | 65 | private JvmMemoryTypeValues() {} 66 | } 67 | 68 | // Enum definition 69 | /** Values for {@link #JVM_THREAD_STATE}. */ 70 | public static final class JvmThreadStateValues { 71 | /** A thread that has not yet started is in this state. */ 72 | public static final String NEW = "new"; 73 | 74 | /** A thread executing in the Java virtual machine is in this state. */ 75 | public static final String RUNNABLE = "runnable"; 76 | 77 | /** A thread that is blocked waiting for a monitor lock is in this state. */ 78 | public static final String BLOCKED = "blocked"; 79 | 80 | /** 81 | * A thread that is waiting indefinitely for another thread to perform a particular action is in 82 | * this state. 83 | */ 84 | public static final String WAITING = "waiting"; 85 | 86 | /** 87 | * A thread that is waiting for another thread to perform an action for up to a specified 88 | * waiting time is in this state. 89 | */ 90 | public static final String TIMED_WAITING = "timed_waiting"; 91 | 92 | /** A thread that has exited is in this state. */ 93 | public static final String TERMINATED = "terminated"; 94 | 95 | private JvmThreadStateValues() {} 96 | } 97 | 98 | private JvmAttributes() {} 99 | } 100 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/NetworkAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class NetworkAttributes { 17 | /** Local address of the network connection - IP address or Unix domain socket name. */ 18 | public static final AttributeKey NETWORK_LOCAL_ADDRESS = 19 | stringKey("network.local.address"); 20 | 21 | /** Local port number of the network connection. */ 22 | public static final AttributeKey NETWORK_LOCAL_PORT = longKey("network.local.port"); 23 | 24 | /** Peer address of the network connection - IP address or Unix domain socket name. */ 25 | public static final AttributeKey NETWORK_PEER_ADDRESS = stringKey("network.peer.address"); 26 | 27 | /** Peer port number of the network connection. */ 28 | public static final AttributeKey NETWORK_PEER_PORT = longKey("network.peer.port"); 29 | 30 | /** 31 | * OSI application layer or non-OSI 32 | * equivalent. 33 | * 34 | *

Notes: 35 | * 36 | *

The value SHOULD be normalized to lowercase. 37 | */ 38 | public static final AttributeKey NETWORK_PROTOCOL_NAME = 39 | stringKey("network.protocol.name"); 40 | 41 | /** 42 | * The actual version of the protocol used for network communication. 43 | * 44 | *

Notes: 45 | * 46 | *

If protocol version is subject to negotiation (for example using ALPN), this attribute SHOULD be set to 48 | * the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT 49 | * be set. 50 | */ 51 | public static final AttributeKey NETWORK_PROTOCOL_VERSION = 52 | stringKey("network.protocol.version"); 53 | 54 | /** 55 | * OSI transport layer or inter-process communication 57 | * method. 58 | * 59 | *

Notes: 60 | * 61 | *

The value SHOULD be normalized to lowercase. 62 | * 63 | *

Consider always setting the transport when setting a port number, since a port number is 64 | * ambiguous without knowing the transport. For example different processes could be listening on 65 | * TCP port 12345 and UDP port 12345. 66 | */ 67 | public static final AttributeKey NETWORK_TRANSPORT = stringKey("network.transport"); 68 | 69 | /** 70 | * OSI network layer or non-OSI equivalent. 71 | * 72 | *

Notes: 73 | * 74 | *

The value SHOULD be normalized to lowercase. 75 | */ 76 | public static final AttributeKey NETWORK_TYPE = stringKey("network.type"); 77 | 78 | // Enum definition 79 | /** Values for {@link #NETWORK_TRANSPORT}. */ 80 | public static final class NetworkTransportValues { 81 | /** TCP */ 82 | public static final String TCP = "tcp"; 83 | 84 | /** UDP */ 85 | public static final String UDP = "udp"; 86 | 87 | /** Named or anonymous pipe. */ 88 | public static final String PIPE = "pipe"; 89 | 90 | /** Unix domain socket */ 91 | public static final String UNIX = "unix"; 92 | 93 | /** QUIC */ 94 | public static final String QUIC = "quic"; 95 | 96 | private NetworkTransportValues() {} 97 | } 98 | 99 | // Enum definition 100 | /** Values for {@link #NETWORK_TYPE}. */ 101 | public static final class NetworkTypeValues { 102 | /** IPv4 */ 103 | public static final String IPV4 = "ipv4"; 104 | 105 | /** IPv6 */ 106 | public static final String IPV6 = "ipv6"; 107 | 108 | private NetworkTypeValues() {} 109 | } 110 | 111 | private NetworkAttributes() {} 112 | } 113 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/OtelAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class OtelAttributes { 16 | /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ 17 | public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); 18 | 19 | /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ 20 | public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); 21 | 22 | /** Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. */ 23 | public static final AttributeKey OTEL_STATUS_CODE = stringKey("otel.status_code"); 24 | 25 | /** Description of the Status if it has a value, otherwise not set. */ 26 | public static final AttributeKey OTEL_STATUS_DESCRIPTION = 27 | stringKey("otel.status_description"); 28 | 29 | // Enum definition 30 | /** Values for {@link #OTEL_STATUS_CODE}. */ 31 | public static final class OtelStatusCodeValues { 32 | /** 33 | * The operation has been validated by an Application developer or Operator to have completed 34 | * successfully. 35 | */ 36 | public static final String OK = "OK"; 37 | 38 | /** The operation contains an error. */ 39 | public static final String ERROR = "ERROR"; 40 | 41 | private OtelStatusCodeValues() {} 42 | } 43 | 44 | private OtelAttributes() {} 45 | } 46 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | public final class SchemaUrls { 9 | 10 | public static final String V1_32_0 = "https://opentelemetry.io/schemas/1.32.0"; 11 | public static final String V1_31_0 = "https://opentelemetry.io/schemas/1.31.0"; 12 | public static final String V1_30_0 = "https://opentelemetry.io/schemas/1.30.0"; 13 | public static final String V1_29_0 = "https://opentelemetry.io/schemas/1.29.0"; 14 | public static final String V1_28_0 = "https://opentelemetry.io/schemas/1.28.0"; 15 | public static final String V1_27_0 = "https://opentelemetry.io/schemas/1.27.0"; 16 | public static final String V1_26_0 = "https://opentelemetry.io/schemas/1.26.0"; 17 | public static final String V1_25_0 = "https://opentelemetry.io/schemas/1.25.0"; 18 | public static final String V1_24_0 = "https://opentelemetry.io/schemas/1.24.0"; 19 | 20 | private SchemaUrls() {} 21 | } 22 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/ServerAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.longKey; 9 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 10 | 11 | import io.opentelemetry.api.common.AttributeKey; 12 | 13 | // DO NOT EDIT, this is an Auto-generated file from 14 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 15 | @SuppressWarnings("unused") 16 | public final class ServerAttributes { 17 | /** 18 | * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix 19 | * domain socket name. 20 | * 21 | *

Notes: 22 | * 23 | *

When observed from the client side, and when communicating through an intermediary, {@code 24 | * server.address} SHOULD represent the server address behind any intermediaries, for example 25 | * proxies, if it's available. 26 | */ 27 | public static final AttributeKey SERVER_ADDRESS = stringKey("server.address"); 28 | 29 | /** 30 | * Server port number. 31 | * 32 | *

Notes: 33 | * 34 | *

When observed from the client side, and when communicating through an intermediary, {@code 35 | * server.port} SHOULD represent the server port behind any intermediaries, for example proxies, 36 | * if it's available. 37 | */ 38 | public static final AttributeKey SERVER_PORT = longKey("server.port"); 39 | 40 | private ServerAttributes() {} 41 | } 42 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class ServiceAttributes { 16 | /** 17 | * Logical name of the service. 18 | * 19 | *

Notes: 20 | * 21 | *

MUST be the same for all instances of horizontally scaled services. If the value was not 22 | * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with {@code process.executable.name}, e.g. {@code unknown_service:bash}. If 24 | * {@code process.executable.name} is not available, the value MUST be set to {@code 25 | * unknown_service}. 26 | */ 27 | public static final AttributeKey SERVICE_NAME = stringKey("service.name"); 28 | 29 | /** 30 | * The version string of the service API or implementation. The format is not defined by these 31 | * conventions. 32 | */ 33 | public static final AttributeKey SERVICE_VERSION = stringKey("service.version"); 34 | 35 | private ServiceAttributes() {} 36 | } 37 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/TelemetryAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class TelemetryAttributes { 16 | /** The language of the telemetry SDK. */ 17 | public static final AttributeKey TELEMETRY_SDK_LANGUAGE = 18 | stringKey("telemetry.sdk.language"); 19 | 20 | /** 21 | * The name of the telemetry SDK as defined above. 22 | * 23 | *

Notes: 24 | * 25 | *

The OpenTelemetry SDK MUST set the {@code telemetry.sdk.name} attribute to {@code 26 | * opentelemetry}. If another SDK, like a fork or a vendor-provided implementation, is used, this 27 | * SDK MUST set the {@code telemetry.sdk.name} attribute to the fully-qualified class or module 28 | * name of this SDK's main entry point or another suitable identifier depending on the language. 29 | * The identifier {@code opentelemetry} is reserved and MUST NOT be used in this case. All custom 30 | * identifiers SHOULD be stable across different versions of an implementation. 31 | */ 32 | public static final AttributeKey TELEMETRY_SDK_NAME = stringKey("telemetry.sdk.name"); 33 | 34 | /** The version string of the telemetry SDK. */ 35 | public static final AttributeKey TELEMETRY_SDK_VERSION = 36 | stringKey("telemetry.sdk.version"); 37 | 38 | // Enum definition 39 | /** Values for {@link #TELEMETRY_SDK_LANGUAGE}. */ 40 | public static final class TelemetrySdkLanguageValues { 41 | /** cpp. */ 42 | public static final String CPP = "cpp"; 43 | 44 | /** dotnet. */ 45 | public static final String DOTNET = "dotnet"; 46 | 47 | /** erlang. */ 48 | public static final String ERLANG = "erlang"; 49 | 50 | /** go. */ 51 | public static final String GO = "go"; 52 | 53 | /** java. */ 54 | public static final String JAVA = "java"; 55 | 56 | /** nodejs. */ 57 | public static final String NODEJS = "nodejs"; 58 | 59 | /** php. */ 60 | public static final String PHP = "php"; 61 | 62 | /** python. */ 63 | public static final String PYTHON = "python"; 64 | 65 | /** ruby. */ 66 | public static final String RUBY = "ruby"; 67 | 68 | /** rust. */ 69 | public static final String RUST = "rust"; 70 | 71 | /** swift. */ 72 | public static final String SWIFT = "swift"; 73 | 74 | /** webjs. */ 75 | public static final String WEBJS = "webjs"; 76 | 77 | private TelemetrySdkLanguageValues() {} 78 | } 79 | 80 | private TelemetryAttributes() {} 81 | } 82 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class UrlAttributes { 16 | /** The URI fragment component */ 17 | public static final AttributeKey URL_FRAGMENT = stringKey("url.fragment"); 18 | 19 | /** 20 | * Absolute URL describing a network resource according to RFC3986 22 | * 23 | *

Notes: 24 | * 25 | *

For network calls, URL usually has {@code scheme://host[:port][path][?query][#fragment]} 26 | * format, where the fragment is not transmitted over HTTP, but if it is known, it SHOULD be 27 | * included nevertheless. 28 | * 29 | *

{@code url.full} MUST NOT contain credentials passed via URL in form of {@code 30 | * https://username:password@www.example.com/}. In such case username and password SHOULD be 31 | * redacted and attribute's value SHOULD be {@code https://REDACTED:REDACTED@www.example.com/}. 32 | * 33 | *

{@code url.full} SHOULD capture the absolute URL when it is available (or can be 34 | * reconstructed). 35 | * 36 | *

Sensitive content provided in {@code url.full} SHOULD be scrubbed when instrumentations can 37 | * identify it. 38 | * 39 | *

Query string values for the following keys SHOULD be redacted by default and replaced by the 40 | * value {@code REDACTED}: 41 | * 42 | *

55 | * 56 | *

This list is subject to change over time. 57 | * 58 | *

When a query string value is redacted, the query string key SHOULD still be preserved, e.g. 59 | * {@code https://www.example.com/path?color=blue&sig=REDACTED}. 60 | */ 61 | public static final AttributeKey URL_FULL = stringKey("url.full"); 62 | 63 | /** 64 | * The URI path component 65 | * 66 | *

Notes: 67 | * 68 | *

Sensitive content provided in {@code url.path} SHOULD be scrubbed when instrumentations can 69 | * identify it. 70 | */ 71 | public static final AttributeKey URL_PATH = stringKey("url.path"); 72 | 73 | /** 74 | * The URI query component 75 | * 76 | *

Notes: 77 | * 78 | *

Sensitive content provided in {@code url.query} SHOULD be scrubbed when instrumentations can 79 | * identify it. 80 | * 81 | *

Query string values for the following keys SHOULD be redacted by default and replaced by the 82 | * value {@code REDACTED}: 83 | * 84 | *

97 | * 98 | *

This list is subject to change over time. 99 | * 100 | *

When a query string value is redacted, the query string key SHOULD still be preserved, e.g. 101 | * {@code q=OpenTelemetry&sig=REDACTED}. 102 | */ 103 | public static final AttributeKey URL_QUERY = stringKey("url.query"); 104 | 105 | /** 106 | * The URI scheme component 107 | * identifying the used protocol. 108 | */ 109 | public static final AttributeKey URL_SCHEME = stringKey("url.scheme"); 110 | 111 | private UrlAttributes() {} 112 | } 113 | -------------------------------------------------------------------------------- /semconv/src/main/java/io/opentelemetry/semconv/UserAgentAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static io.opentelemetry.api.common.AttributeKey.stringKey; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | 12 | // DO NOT EDIT, this is an Auto-generated file from 13 | // buildscripts/templates/registry/java/SemanticAttributes.java.j2 14 | @SuppressWarnings("unused") 15 | public final class UserAgentAttributes { 16 | /** 17 | * Value of the HTTP 18 | * User-Agent header sent by the client. 19 | */ 20 | public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); 21 | 22 | private UserAgentAttributes() {} 23 | } 24 | -------------------------------------------------------------------------------- /semconv/src/test/java/io/opentelemetry/semconv/AttributeKeyTemplateTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static org.assertj.core.api.Assertions.assertThat; 9 | 10 | import io.opentelemetry.api.common.AttributeKey; 11 | import io.opentelemetry.api.common.AttributeType; 12 | import java.util.function.Function; 13 | import java.util.stream.Stream; 14 | import org.junit.jupiter.params.ParameterizedTest; 15 | import org.junit.jupiter.params.provider.Arguments; 16 | import org.junit.jupiter.params.provider.MethodSource; 17 | 18 | class AttributeKeyTemplateTest { 19 | 20 | @ParameterizedTest 21 | @MethodSource("getAttributeKeyArgs") 22 | void getAttributeKey( 23 | Function> createTemplate, 24 | AttributeType expectedAttributeType) { 25 | String prefix = "my.prefix"; 26 | AttributeKeyTemplate template = createTemplate.apply(prefix); 27 | 28 | AttributeKey attributeKey1 = template.getAttributeKey("key1"); 29 | AttributeKey attributeKey2 = template.getAttributeKey("key2"); 30 | 31 | assertThat(attributeKey1.getType()).isEqualTo(expectedAttributeType); 32 | assertThat(attributeKey1.getKey()).isEqualTo("my.prefix.key1"); 33 | assertThat(attributeKey1).isSameAs(template.getAttributeKey("key1")); 34 | 35 | assertThat(attributeKey2.getType()).isEqualTo(expectedAttributeType); 36 | assertThat(attributeKey2.getKey()).isEqualTo("my.prefix.key2"); 37 | } 38 | 39 | private static Stream getAttributeKeyArgs() { 40 | return Stream.of( 41 | Arguments.of(asFunction(AttributeKeyTemplate::stringKeyTemplate), AttributeType.STRING), 42 | Arguments.of( 43 | asFunction(AttributeKeyTemplate::stringArrayKeyTemplate), AttributeType.STRING_ARRAY), 44 | Arguments.of(asFunction(AttributeKeyTemplate::booleanKeyTemplate), AttributeType.BOOLEAN), 45 | Arguments.of( 46 | asFunction(AttributeKeyTemplate::booleanArrayKeyTemplate), AttributeType.BOOLEAN_ARRAY), 47 | Arguments.of(asFunction(AttributeKeyTemplate::longKeyTemplate), AttributeType.LONG), 48 | Arguments.of( 49 | asFunction(AttributeKeyTemplate::longArrayKeyTemplate), AttributeType.LONG_ARRAY), 50 | Arguments.of(asFunction(AttributeKeyTemplate::doubleKeyTemplate), AttributeType.DOUBLE), 51 | Arguments.of( 52 | asFunction(AttributeKeyTemplate::doubleArrayKeyTemplate), AttributeType.DOUBLE_ARRAY)); 53 | } 54 | 55 | private static Function> asFunction( 56 | Function> function) { 57 | return function; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /semconv/src/test/java/io/opentelemetry/semconv/AvailabilityTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The OpenTelemetry Authors 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package io.opentelemetry.semconv; 7 | 8 | import static org.assertj.core.api.Assertions.assertThat; 9 | import static org.assertj.core.api.Assertions.fail; 10 | 11 | import java.lang.reflect.Field; 12 | import org.junit.jupiter.api.Test; 13 | 14 | /** A placeholder test which verifies that the generated classes compile and can load. */ 15 | public class AvailabilityTest { 16 | 17 | @Test 18 | void available() { 19 | isValidClass("io.opentelemetry.semconv.ClientAttributes"); 20 | isValidClass("io.opentelemetry.semconv.ErrorAttributes"); 21 | isValidClass("io.opentelemetry.semconv.ExceptionAttributes"); 22 | isValidClass("io.opentelemetry.semconv.HttpAttributes"); 23 | isValidClass("io.opentelemetry.semconv.JvmAttributes"); 24 | isValidClass("io.opentelemetry.semconv.NetworkAttributes"); 25 | isValidClass("io.opentelemetry.semconv.OtelAttributes"); 26 | isValidClass("io.opentelemetry.semconv.ServerAttributes"); 27 | isValidClass("io.opentelemetry.semconv.ServiceAttributes"); 28 | isValidClass("io.opentelemetry.semconv.TelemetryAttributes"); 29 | isValidClass("io.opentelemetry.semconv.UrlAttributes"); 30 | isValidClass("io.opentelemetry.semconv.UserAgentAttributes"); 31 | isValidClass("io.opentelemetry.semconv.SchemaUrls"); 32 | } 33 | 34 | private static void isValidClass(String fqcn) { 35 | Class clazz = null; 36 | try { 37 | clazz = Class.forName(fqcn); 38 | } catch (ClassNotFoundException e) { 39 | fail(e.getMessage()); 40 | } 41 | Field[] declaredFields = clazz.getDeclaredFields(); 42 | Class[] declaredClasses = clazz.getDeclaredClasses(); 43 | boolean hasFieldsOrInnerClasses = 44 | (declaredFields != null && declaredFields.length > 0) 45 | || (declaredClasses != null && declaredClasses.length > 0); 46 | assertThat(hasFieldsOrInnerClasses).withFailMessage(() -> fqcn + " is empty").isTrue(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | plugins { 3 | id("de.undercouch.download") version "5.6.0" 4 | id("io.github.gradle-nexus.publish-plugin") version "2.0.0" 5 | id("com.gradle.develocity") version "4.0.2" 6 | } 7 | } 8 | 9 | plugins { 10 | id("com.gradle.develocity") 11 | } 12 | 13 | dependencyResolutionManagement { 14 | repositories { 15 | mavenCentral() 16 | mavenLocal() 17 | } 18 | } 19 | 20 | develocity { 21 | buildScan { 22 | publishing.onlyIf { System.getenv("CI") != null } 23 | termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use") 24 | termsOfUseAgree.set("yes") 25 | } 26 | } 27 | 28 | rootProject.name = "semantic-conventions-java" 29 | include(":dependencyManagement") 30 | include(":semconv-incubating") 31 | include(":semconv") 32 | --------------------------------------------------------------------------------