diff --git a/.github/labeler.yml b/.github/labeler.yml index cfc6c16e..b8aa83cf 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -13,5 +13,8 @@ scope-api: scope-sdk: - apps/opentelemetry/** +scope-semconv: + - apps/opentelemetry_semantic_conventions/** + scope-ci: - .github/workflows/** diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 97595912..a812dcc0 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -3,21 +3,23 @@ name: Elixir on: pull_request: branches: - - 'main' + - "main" + types: [opened, reopened, synchronize, labeled] + push: branches: - - 'main' + - "main" jobs: format: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: - otp-version: '26.1.2' - elixir-version: '1.15.7' - version-type: 'strict' + otp-version: "26.1.2" + elixir-version: "1.15.7" + version-type: "strict" - uses: actions/cache@v4 name: Cache with: @@ -34,9 +36,9 @@ jobs: name: Test SDK on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['26.1.2', '24.3.4.14'] - elixir_version: ['1.15.7', '1.12.3'] - rebar3_version: ['3.22.1'] + otp_version: ["26.1.2", "24.3.4.14"] + elixir_version: ["1.15.7", "1.12.3"] + rebar3_version: ["3.22.1"] os: [ubuntu-20.04] exclude: - elixir_version: "1.12.3" @@ -51,7 +53,7 @@ jobs: otp-version: ${{ matrix.otp_version }} elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - version-type: 'strict' + version-type: "strict" - name: Compile run: rebar3 as test compile - name: ExUnit @@ -62,9 +64,9 @@ jobs: name: Test API on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['26.1.2', '24.3.4.14'] - elixir_version: ['1.15.7', '1.12.3'] - rebar3_version: ['3.22.1'] + otp_version: ["26.1.2", "24.3.4.14"] + elixir_version: ["1.15.7", "1.12.3"] + rebar3_version: ["3.22.1"] os: [ubuntu-20.04] exclude: - elixir_version: "1.12.3" @@ -82,7 +84,7 @@ jobs: otp-version: ${{ matrix.otp_version }} elixir-version: ${{ matrix.elixir_version }} rebar3-version: ${{ matrix.rebar3_version }} - version-type: 'strict' + version-type: "strict" - uses: actions/cache@v4 name: Cache with: @@ -108,9 +110,9 @@ jobs: name: Dialyze on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} strategy: matrix: - otp_version: ['26.1.2'] - elixir_version: ['1.15.7'] - rebar_version: ['3.22.1'] + otp_version: ["26.1.2"] + elixir_version: ["1.15.7"] + rebar_version: ["3.22.1"] os: [ubuntu-20.04] env: OTP_VERSION: ${{ matrix.otp_version }} @@ -124,7 +126,7 @@ jobs: with: otp-version: ${{ matrix.otp_version }} elixir-version: ${{ matrix.elixir_version }} - version-type: 'strict' + version-type: "strict" - uses: actions/cache@v4 name: Cache with: @@ -138,3 +140,46 @@ jobs: name: Deps - run: mix dialyzer name: Dialyzer + + semconv_tests: + runs-on: ${{ matrix.os }} + if: (contains(github.event.pull_request.labels.*.name, 'language-elixir') && contains(github.event.pull_request.labels.*.name, 'scope-semconv')) + name: Test SemConv on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} + strategy: + matrix: + otp_version: ["26.1.2", "24.3.4.14"] + elixir_version: ["1.15.7", "1.12.3"] + rebar3_version: ["3.22.1"] + os: [ubuntu-20.04] + exclude: + - elixir_version: "1.12.3" + - otp_version: "26.1.2" + defaults: + run: + working-directory: apps/opentelemetry_semantic_conventions + env: + OTP_VERSION: ${{ matrix.otp_version }} + ELIXIR_VERSION: ${{ matrix.elixir_version }} + steps: + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp_version }} + elixir-version: ${{ matrix.elixir_version }} + rebar3-version: ${{ matrix.rebar3_version }} + version-type: "strict" + - name: Cache + uses: actions/cache@v4 + with: + path: | + ~/deps + ~/_build + key: ${{ runner.os }}-test-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-${{ hashFiles('**/mix.lock') }} + + - name: Get and compile deps + if: steps.deps-cache.outputs.cache-hit != 'true' + run: | + mix deps.get + mix deps.compile + - name: ExUnit + run: mix test diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 971fa4fb..731cce18 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -4,10 +4,12 @@ name: Erlang on: pull_request: branches: - - 'main' + - "main" + types: [opened, reopened, synchronize, labeled] + push: branches: - - 'main' + - "main" permissions: checks: write @@ -18,130 +20,156 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['26.1.2', '25.3.2.7', '24.3.4.14'] - rebar3_version: ['3.22.1'] + otp_version: ["26.1.2", "25.3.2.7", "24.3.4.14"] + rebar3_version: ["3.22.1"] os: [ubuntu-20.04] include: - - otp_version: '23.3.4.19' - rebar3_version: '3.17.0' + - otp_version: "23.3.4.19" + rebar3_version: "3.17.0" os: ubuntu-20.04 env: OTP_VERSION: ${{ matrix.otp_version }} steps: - - uses: actions/checkout@v4 - - name: Run Collector - run: docker compose up -d - - uses: erlef/setup-beam@v1 - with: - otp-version: ${{ matrix.otp_version }} - rebar3-version: ${{ matrix.rebar3_version }} - version-type: 'strict' - - uses: actions/cache@v4 - name: Cache - with: - path: | - _build - key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-5 - restore-keys: | - ${{ runner.os }}-build-${{ matrix.otp_version }}-5- - - name: Compile - run: rebar3 compile - - name: EUnit tests - run: rebar3 eunit --cover - - name: Common Test tests - run: rebar3 ct --cover + - uses: actions/checkout@v4 + - name: Run Collector + run: docker compose up -d + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp_version }} + rebar3-version: ${{ matrix.rebar3_version }} + version-type: "strict" + - uses: actions/cache@v4 + name: Cache + with: + path: | + _build + key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-5 + restore-keys: | + ${{ runner.os }}-build-${{ matrix.otp_version }}-5- + - name: Compile + run: rebar3 compile + - name: EUnit tests + run: rebar3 eunit --cover + - name: Common Test tests + run: rebar3 ct --cover - - name: Publish Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() # always run even if the previous step fails - with: - report_paths: '**/_build/test/logs/*/junit_report.xml' + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: "**/_build/test/logs/*/junit_report.xml" - - name: XRef - run: rebar3 xref - - name: Covertool - if: ${{ always() }} - run: rebar3 covertool generate - - uses: codecov/codecov-action@v4 - if: ${{ always() }} - with: - file: _build/test/covertool/opentelemetry.covertool.xml - env_vars: OTP_VERSION - flags: sdk,erlang - - uses: codecov/codecov-action@v4 - if: ${{ always() }} - with: - file: _build/test/covertool/opentelemetry_api.covertool.xml - env_vars: OTP_VERSION - flags: api,erlang - - uses: codecov/codecov-action@v4 - if: ${{ always() }} - with: - file: _build/test/covertool/opentelemetry_exporter.covertool.xml - env_vars: OTP_VERSION - flags: exporter,erlang - - uses: codecov/codecov-action@v4 - if: ${{ always() }} - with: - file: _build/test/covertool/opentelemetry_zipkin.covertool.xml - env_vars: OTP_VERSION - flags: zipkin,erlang + - name: XRef + run: rebar3 xref + - name: Covertool + if: ${{ always() }} + run: rebar3 covertool generate + - uses: codecov/codecov-action@v4 + if: ${{ always() }} + with: + file: _build/test/covertool/opentelemetry.covertool.xml + env_vars: OTP_VERSION + flags: sdk,erlang + - uses: codecov/codecov-action@v4 + if: ${{ always() }} + with: + file: _build/test/covertool/opentelemetry_api.covertool.xml + env_vars: OTP_VERSION + flags: api,erlang + - uses: codecov/codecov-action@v4 + if: ${{ always() }} + with: + file: _build/test/covertool/opentelemetry_exporter.covertool.xml + env_vars: OTP_VERSION + flags: exporter,erlang + - uses: codecov/codecov-action@v4 + if: ${{ always() }} + with: + file: _build/test/covertool/opentelemetry_zipkin.covertool.xml + env_vars: OTP_VERSION + flags: zipkin,erlang dialyzer: name: Dialyze on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['26.1.2'] - rebar3_version: ['3.22.1'] + otp_version: ["26.1.2"] + rebar3_version: ["3.22.1"] os: [ubuntu-20.04] steps: - - uses: actions/checkout@v4 - - uses: erlef/setup-beam@v1 - with: - otp-version: ${{ matrix.otp_version }} - rebar3-version: ${{ matrix.rebar3_version }} - version-type: 'strict' - - uses: actions/cache@v4 - name: Cache - with: - path: | - _build - key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles('rebar.lock') }}-5 - restore-keys: | - ${{ runner.os }}-dialyzer-${{ matrix.otp_version }}-5- - - name: Compile - run: rebar3 compile - - name: Dialyzer - run: rebar3 as dialyzer dialyzer + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp_version }} + rebar3-version: ${{ matrix.rebar3_version }} + version-type: "strict" + - uses: actions/cache@v4 + name: Cache + with: + path: | + _build + key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles('rebar.lock') }}-5 + restore-keys: | + ${{ runner.os }}-dialyzer-${{ matrix.otp_version }}-5- + - name: Compile + run: rebar3 compile + - name: Dialyzer + run: rebar3 as dialyzer dialyzer eqWAlizer: name: EqWAlizer on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - otp_version: ['26.1.2'] - rebar3_version: ['3.22.1'] + otp_version: ["26.1.2"] + rebar3_version: ["3.22.1"] os: [ubuntu-20.04] steps: - - uses: actions/checkout@v4 - - uses: erlef/setup-beam@v1 - with: - otp-version: ${{ matrix.otp_version }} - rebar3-version: ${{ matrix.rebar3_version }} - version-type: 'strict' - - uses: actions/cache@v4 - name: Cache - with: - path: | - _build - key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles('rebar.lock') }}-5 - restore-keys: | - ${{ runner.os }}-eqWAlizer-${{ matrix.otp_version }}-5- - - name: Download elp - run: | - wget https://github.com/WhatsApp/eqwalizer/releases/download/v0.17.16/elp-linux.tar.gz - tar xvf elp-linux.tar.gz - - name: Compile - run: rebar3 compile - - name: eqWAlizer - run: ./elp eqwalize-all + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp_version }} + rebar3-version: ${{ matrix.rebar3_version }} + version-type: "strict" + - uses: actions/cache@v4 + name: Cache + with: + path: | + _build + key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles('rebar.lock') }}-5 + restore-keys: | + ${{ runner.os }}-eqWAlizer-${{ matrix.otp_version }}-5- + - name: Download elp + run: | + wget https://github.com/WhatsApp/eqwalizer/releases/download/v0.17.16/elp-linux.tar.gz + tar xvf elp-linux.tar.gz + - name: Compile + run: rebar3 compile + - name: eqWAlizer + run: ./elp eqwalize-all + + semconv_tests: + runs-on: ${{ matrix.os }} + if: (contains(github.event.pull_request.labels.*.name, 'language-erlang') && contains(github.event.pull_request.labels.*.name, 'scope-semconv')) + name: Test SemConv on (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }} + strategy: + matrix: + otp_version: ["26.1.2", "24.3.4.14"] + rebar3_version: ["3.22.1"] + os: [ubuntu-20.04] + defaults: + run: + working-directory: apps/opentelemetry_semantic_conventions + env: + OTP_VERSION: ${{ matrix.otp_version }} + steps: + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp_version }} + rebar3-version: ${{ matrix.rebar3_version }} + version-type: "strict" + - name: Compile + run: rebar3 compile + - name: Common Test tests + run: rebar3 ct --cover diff --git a/.github/workflows/w3c_interop.yml b/.github/workflows/w3c_interop.yml index 9fc53352..966942db 100644 --- a/.github/workflows/w3c_interop.yml +++ b/.github/workflows/w3c_interop.yml @@ -11,7 +11,7 @@ on: jobs: interop_tests: name: Run W3C Trace Context Interop Tests - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 diff --git a/.gitignore b/.gitignore index d2317bb4..e62a0fa3 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ _build rebar3.crashdump *~ doc -!_index.md \ No newline at end of file +!_index.md +guides diff --git a/apps/opentelemetry/rebar.config b/apps/opentelemetry/rebar.config index 0fdbb61e..b1dcbeef 100644 --- a/apps/opentelemetry/rebar.config +++ b/apps/opentelemetry/rebar.config @@ -1,6 +1,5 @@ {erl_opts, [debug_info]}. -{deps, [{opentelemetry_api, "~> 1.3.0"}, - {opentelemetry_semantic_conventions, "~> 0.2"}]}. +{deps, [{opentelemetry_api, "~> 1.3.0"}]}. {profiles, [{docs, [{edoc_opts, diff --git a/apps/opentelemetry/src/opentelemetry.app.src b/apps/opentelemetry/src/opentelemetry.app.src index 0f423d95..73a54aa9 100644 --- a/apps/opentelemetry/src/opentelemetry.app.src +++ b/apps/opentelemetry/src/opentelemetry.app.src @@ -11,6 +11,7 @@ stdlib, opentelemetry_api ]}, + {exclude_paths, ["rebar.lock"]}, {env, []}, {modules, []}, diff --git a/apps/opentelemetry/src/otel_exporter.erl b/apps/opentelemetry/src/otel_exporter.erl index 6d7ca857..90f6213f 100644 --- a/apps/opentelemetry/src/otel_exporter.erl +++ b/apps/opentelemetry/src/otel_exporter.erl @@ -97,8 +97,7 @@ init({ExporterModule, Config}) when is_atom(ExporterModule) -> end; {error, undef} when ExporterModule =:= opentelemetry_exporter -> ?LOG_WARNING("OTLP exporter module `opentelemetry_exporter` not found. " - "Verify you have included the `opentelemetry_exporter` dependency.", - [ExporterModule]), + "Verify you have included the `opentelemetry_exporter` dependency."), undefined; {error, undef} -> ?LOG_WARNING("Exporter module ~tp not found. Verify you have included " diff --git a/apps/opentelemetry/src/otel_resource_detector.erl b/apps/opentelemetry/src/otel_resource_detector.erl index b9498b87..24681e15 100644 --- a/apps/opentelemetry/src/otel_resource_detector.erl +++ b/apps/opentelemetry/src/otel_resource_detector.erl @@ -46,7 +46,6 @@ -type detector() :: module() | {module(), term()}. -include_lib("kernel/include/logger.hrl"). --include_lib("opentelemetry_semantic_conventions/include/resource.hrl"). -record(data, {resource :: otel_resource:t(), detectors :: [detector()], @@ -175,7 +174,7 @@ spawn_detector(Module, Ref) -> default_resource_attributes(Resource) -> ProgName = prog_name(), - ProcessResource = otel_resource:create([{?PROCESS_EXECUTABLE_NAME, ProgName} | process_attributes()]), + ProcessResource = otel_resource:create([{'process.executable.name', ProgName} | process_attributes()]), Resource1 = otel_resource:merge(ProcessResource, Resource), Resource2 = add_service_name(Resource1, ProgName), Resource3 = add_service_instance(Resource2), @@ -184,9 +183,9 @@ default_resource_attributes(Resource) -> process_attributes() -> OtpVsn = otp_vsn(), ErtsVsn = erts_vsn(), - [{?PROCESS_RUNTIME_NAME, unicode:characters_to_binary(emulator())}, - {?PROCESS_RUNTIME_VERSION, unicode:characters_to_binary(ErtsVsn)}, - {?PROCESS_RUNTIME_DESCRIPTION, unicode:characters_to_binary(runtime_description(OtpVsn, ErtsVsn))}]. + [{'process.runtime.name', unicode:characters_to_binary(emulator())}, + {'process.runtime.version', unicode:characters_to_binary(ErtsVsn)}, + {'process.runtime.description', unicode:characters_to_binary(runtime_description(OtpVsn, ErtsVsn))}]. runtime_description(OtpVsn, ErtsVsn) -> io_lib:format("Erlang/OTP ~s erts-~s", [OtpVsn, ErtsVsn]). @@ -240,7 +239,7 @@ release_name() -> add_service_name(Resource, ProgName) -> case os:getenv("OTEL_SERVICE_NAME") of false -> - case otel_resource:is_key(?SERVICE_NAME, Resource) of + case otel_resource:is_key('service.name', Resource) of false -> ServiceResource = service_release_name(ProgName), otel_resource:merge(ServiceResource, Resource); @@ -256,7 +255,7 @@ add_service_name(Resource, ProgName) -> ServiceResource = service_release_name(ProgName), otel_resource:merge(ServiceResource, Resource); BinaryString -> - ServiceNameResource = otel_resource:create([{?SERVICE_NAME, BinaryString}]), + ServiceNameResource = otel_resource:create([{'service.name', BinaryString}]), otel_resource:merge(ServiceNameResource, Resource) end end. @@ -267,22 +266,22 @@ add_service_name(Resource, ProgName) -> add_service_instance(Resource) -> case os:getenv("OTEL_SERVICE_INSTANCE") of false -> - case otel_resource:is_key(?SERVICE_INSTANCE_ID, Resource) of + case otel_resource:is_key('service.instance.id', Resource) of false -> case erlang:node() of nonode@nohost -> ServiceInstanceId = otel_id_generator:generate_trace_id(), - ServiceInstanceResource = otel_resource:create([{?SERVICE_INSTANCE_ID, ServiceInstanceId}]), + ServiceInstanceResource = otel_resource:create([{'service.instance.id', ServiceInstanceId}]), otel_resource:merge(ServiceInstanceResource, Resource); ServiceInstance -> ServiceInstance1 = erlang:atom_to_binary(ServiceInstance, utf8), case binary:match(ServiceInstance1, <<"@localhost">>) of nomatch -> - ServiceInstanceResource = otel_resource:create([{?SERVICE_INSTANCE_ID, ServiceInstance1}]), + ServiceInstanceResource = otel_resource:create([{'service.instance.id', ServiceInstance1}]), otel_resource:merge(ServiceInstanceResource, Resource); _Match -> ServiceInstanceId = otel_id_generator:generate_trace_id(), - ServiceInstanceResource = otel_resource:create([{?SERVICE_INSTANCE_ID, ServiceInstanceId}]), + ServiceInstanceResource = otel_resource:create([{'service.instance.id', ServiceInstanceId}]), otel_resource:merge(ServiceInstanceResource, Resource) end end; @@ -290,7 +289,7 @@ add_service_instance(Resource) -> Resource end; ServiceInstance -> - ServiceInstanceResource = otel_resource:create([{?SERVICE_INSTANCE_ID, + ServiceInstanceResource = otel_resource:create([{'service.instance.id', otel_utils:assert_to_binary(ServiceInstance)}]), otel_resource:merge(ServiceInstanceResource, Resource) end. @@ -298,21 +297,21 @@ add_service_instance(Resource) -> service_release_name(ProgName) -> case find_release() of {RelName, RelVsn} when RelName =/= false -> - otel_resource:create([{?SERVICE_NAME, RelName} | + otel_resource:create([{'service.name', RelName} | case RelVsn of false -> []; - _ -> [{?SERVICE_VERSION, RelVsn}] + _ -> [{'service.version', RelVsn}] end]); _ -> - otel_resource:create([{?SERVICE_NAME, <<"unknown_service:", ProgName/binary>>}]) + otel_resource:create([{'service.name', <<"unknown_service:", ProgName/binary>>}]) end. add_telemetry_info(Resource) -> {ok, LibraryVsn} = application:get_key(opentelemetry, vsn), LibraryName = <<"opentelemetry">>, LibraryLanguage = <<"erlang">>, - ResourceAttributes = [{?TELEMETRY_SDK_NAME, LibraryName}, - {?TELEMETRY_SDK_LANGUAGE, LibraryLanguage}, - {?TELEMETRY_SDK_VERSION, LibraryVsn}], + ResourceAttributes = [{'telemetry.sdk.name', LibraryName}, + {'telemetry.sdk.language', LibraryLanguage}, + {'telemetry.sdk.version', LibraryVsn}], TelemetryInfoResource = otel_resource:create(ResourceAttributes), otel_resource:merge(TelemetryInfoResource, Resource). diff --git a/apps/opentelemetry/test/otel_resource_SUITE.erl b/apps/opentelemetry/test/otel_resource_SUITE.erl index fd44bfaf..9bfd4243 100644 --- a/apps/opentelemetry/test/otel_resource_SUITE.erl +++ b/apps/opentelemetry/test/otel_resource_SUITE.erl @@ -6,7 +6,6 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("opentelemetry_api/include/opentelemetry.hrl"). --include_lib("opentelemetry_semantic_conventions/include/resource.hrl"). -include("otel_span.hrl"). -include("otel_test_utils.hrl"). -include("otel_tracer.hrl"). @@ -67,8 +66,8 @@ startup(_Config) -> Resource = otel_tracer_provider:resource(), _ = application:stop(opentelemetry), - ?assertMatch(#{?SERVICE_NAME := <<"cttest">>, - ?SERVICE_VERSION := <<"1.1.1">>}, otel_attributes:map(otel_resource:attributes(Resource))), + ?assertMatch(#{'service.name' := <<"cttest">>, + 'service.version' := <<"1.1.1">>}, otel_attributes:map(otel_resource:attributes(Resource))), ok after os:unsetenv("OTEL_RESOURCE_ATTRIBUTES"), @@ -85,8 +84,8 @@ startup_env_service_name(_Config) -> Resource = otel_tracer_provider:resource(), _ = application:stop(opentelemetry), - ?assertMatch(#{?SERVICE_NAME := <<"env-service-name">>, - ?SERVICE_VERSION := <<"1.1.1">>}, otel_attributes:map(otel_resource:attributes(Resource))), + ?assertMatch(#{'service.name' := <<"env-service-name">>, + 'service.version' := <<"1.1.1">>}, otel_attributes:map(otel_resource:attributes(Resource))), ok after os:unsetenv("OTEL_SERVICE_NAME"), @@ -110,8 +109,8 @@ crash_detector(_Config) -> Resource = otel_resource_detector:get_resource(), - ?assertMatch(#{?SERVICE_NAME := <<"cttest">>, - ?SERVICE_VERSION := <<"2.1.1">>, + ?assertMatch(#{'service.name' := <<"cttest">>, + 'service.version' := <<"2.1.1">>, c := <<"d">>, sk := <<"sv">>}, otel_attributes:map(otel_resource:attributes(Resource))), @@ -134,8 +133,8 @@ timeout_detector(_Config) -> Resource = otel_resource_detector:get_resource(), - ?assertMatch(#{?SERVICE_NAME := <<"cttest">>, - ?SERVICE_VERSION := <<"3.1.1">>, + ?assertMatch(#{'service.name' := <<"cttest">>, + 'service.version' := <<"3.1.1">>, e := <<"f">>}, otel_attributes:map(otel_resource:attributes(Resource))), ?assertEqual(otel_resource:create([]), otel_resource_detector:get_resource(0)), @@ -170,8 +169,8 @@ combining(_Config) -> Merged = otel_resource:merge(Resource1, Resource2), - Expected = otel_attributes:new([{?SERVICE_NAME, <<"other-name">>}, - {?SERVICE_VERSION, <<"1.1.1">>}], 128, 255), + Expected = otel_attributes:new([{'service.name', <<"other-name">>}, + {'service.version', <<"1.1.1">>}], 128, 255), ?assertEqual(Expected, otel_resource:attributes(Merged)), ?assertEqual(<<"https://opentelemetry.io/schemas/1.8.0">>, otel_resource:schema_url(Merged)), ok. @@ -184,8 +183,8 @@ combining_conflicting_schemas(_Config) -> Merged = otel_resource:merge(Resource1, Resource2), - Expected = otel_attributes:new([{?SERVICE_NAME, <<"other-name">>}, - {?SERVICE_VERSION, <<"1.1.1">>}], 128, 255), + Expected = otel_attributes:new([{'service.name', <<"other-name">>}, + {'service.version', <<"1.1.1">>}], 128, 255), ?assertEqual(Expected, otel_resource:attributes(Merged)), ?assertEqual(undefined, otel_resource:schema_url(Merged)), ok. @@ -203,9 +202,9 @@ unknown_service_name(_Config) -> resource_detector_timeout => 100}), Resource = otel_resource_detector:get_resource(), - ?assertMatch(#{?SERVICE_NAME := <<"unknown_service:erl">>, - ?PROCESS_RUNTIME_NAME := <<"BEAM">>, - ?PROCESS_EXECUTABLE_NAME := <<"erl">>, + ?assertMatch(#{'service.name' := <<"unknown_service:erl">>, + 'process.runtime.name' := <<"BEAM">>, + 'process.executable.name' := <<"erl">>, e := <<"f">>}, otel_attributes:map(otel_resource:attributes(Resource))), ok @@ -226,8 +225,8 @@ release_service_name(_Config) -> resource_detector_timeout => 100}), Resource = otel_resource_detector:get_resource(), - ?assertMatch(#{?SERVICE_NAME := <<"rel-cttest">>, - ?SERVICE_VERSION := <<"0.1.0">>, + ?assertMatch(#{'service.name' := <<"rel-cttest">>, + 'service.version' := <<"0.1.0">>, e := <<"f">>}, otel_attributes:map(otel_resource:attributes(Resource))), ok @@ -248,7 +247,7 @@ service_instance_id_env(_Config) -> resource_detector_timeout => 100}), Resource = otel_resource_detector:get_resource(), - ?assertMatch(#{?SERVICE_INSTANCE_ID := <<"test@instance">>, + ?assertMatch(#{'service.instance.id' := <<"test@instance">>, e := <<"f">>}, otel_attributes:map(otel_resource:attributes(Resource))), ok @@ -268,7 +267,7 @@ service_instance_id_env_attributes(_Config) -> resource_detector_timeout => 100}), Resource = otel_resource_detector:get_resource(), - ?assertMatch(#{?SERVICE_INSTANCE_ID := <<"test@instance">>, + ?assertMatch(#{'service.instance.id' := <<"test@instance">>, e := <<"f">>}, otel_attributes:map(otel_resource:attributes(Resource))), ok @@ -278,7 +277,7 @@ service_instance_id_env_attributes(_Config) -> service_instance_id_node_name(_Config) -> Resource = otel_resource_detector:get_resource(), - ?assertMatch(#{?SERVICE_INSTANCE_ID := <<"test@instance">>, + ?assertMatch(#{'service.instance.id' := <<"test@instance">>, e := <<"f">>}, otel_attributes:map(otel_resource:attributes(Resource))), ok. @@ -286,8 +285,8 @@ service_instance_id_node_name(_Config) -> service_instance_id_node_id1(_Config) -> Resource = otel_resource_detector:get_resource(), ResourceMap = otel_attributes:map(otel_resource:attributes(Resource)), - ?assertNotMatch(#{?SERVICE_INSTANCE_ID := <<"test@localhost">>}, ResourceMap), - ?assert(maps:is_key(?SERVICE_INSTANCE_ID, ResourceMap)), + ?assertNotMatch(#{'service.instance.id' := <<"test@localhost">>}, ResourceMap), + ?assert(maps:is_key('service.instance.id', ResourceMap)), ok. @@ -302,8 +301,8 @@ service_instance_id_node_id2(_Config) -> Resource = otel_resource_detector:get_resource(), ResourceMap = otel_attributes:map(otel_resource:attributes(Resource)), - ?assertNotMatch(#{?SERVICE_INSTANCE_ID := <<"nonode@nohost">>}, ResourceMap), - ?assert(maps:is_key(?SERVICE_INSTANCE_ID, ResourceMap)), + ?assertNotMatch(#{'service.instance.id' := <<"nonode@nohost">>}, ResourceMap), + ?assert(maps:is_key('service.instance.id', ResourceMap)), ok. release_service_name_no_version(_Config) -> @@ -318,9 +317,9 @@ release_service_name_no_version(_Config) -> resource_detector_timeout => 100}), Resource = otel_resource_detector:get_resource(), - ?assertMatch(#{?SERVICE_NAME := <<"rel-cttest">>, + ?assertMatch(#{'service.name' := <<"rel-cttest">>, e := <<"f">>}, otel_attributes:map(otel_resource:attributes(Resource))), - ?assertNot(maps:is_key(?SERVICE_VERSION, otel_attributes:map(otel_resource:attributes(Resource)))), + ?assertNot(maps:is_key('service.version', otel_attributes:map(otel_resource:attributes(Resource)))), ok after @@ -346,7 +345,7 @@ validate_keys(_Config) -> Resource = otel_resource_detector:get_resource(), ?assert(otel_resource:is_key(e, Resource)), - ?assert(otel_resource:is_key(?SERVICE_NAME, Resource)), + ?assert(otel_resource:is_key('service.name', Resource)), ?assert(otel_resource:is_key(<<"service.alias">>, Resource)), ?assert(otel_resource:is_key("service.alias", Resource)), ?assert(otel_resource:is_key('service.alias', Resource)), diff --git a/apps/opentelemetry_api/lib/open_telemetry/span.ex b/apps/opentelemetry_api/lib/open_telemetry/span.ex index 089a0146..59bce947 100644 --- a/apps/opentelemetry_api/lib/open_telemetry/span.ex +++ b/apps/opentelemetry_api/lib/open_telemetry/span.ex @@ -29,8 +29,6 @@ defmodule OpenTelemetry.Span do - A Status (`t:OpenTelemetry.status/0`) """ - require OpenTelemetry.SemanticConventions.Trace - @type start_opts() :: :otel_span.start_opts() @type start_config() :: :otel_span.start_config() @@ -140,13 +138,12 @@ defmodule OpenTelemetry.Span do exception_type = to_string(exception.__struct__) exception_attributes = [ - {OpenTelemetry.SemanticConventions.Trace.exception_type(), exception_type}, - {OpenTelemetry.SemanticConventions.Trace.exception_message(), Exception.message(exception)}, - {OpenTelemetry.SemanticConventions.Trace.exception_stacktrace(), - Exception.format_stacktrace(trace)} + {:"exception.type", exception_type}, + {:"exception.message", Exception.message(exception)}, + {:"exception.stacktrace", Exception.format_stacktrace(trace)} ] - add_event(span_ctx, "exception", exception_attributes ++ attributes) + add_event(span_ctx, :exception, exception_attributes ++ attributes) end def record_exception(_, _, _, _), do: false diff --git a/apps/opentelemetry_api/mix.exs b/apps/opentelemetry_api/mix.exs index fe282710..52f4e8f8 100644 --- a/apps/opentelemetry_api/mix.exs +++ b/apps/opentelemetry_api/mix.exs @@ -11,7 +11,6 @@ defmodule OpenTelemetry.MixProject do elixir: "~> 1.8", start_permanent: Mix.env() == :prod, deps: [ - {:opentelemetry_semantic_conventions, "~> 0.2"}, {:eqwalizer_support, git: "https://github.com/whatsapp/eqwalizer.git", branch: "main", diff --git a/apps/opentelemetry_api/mix.lock b/apps/opentelemetry_api/mix.lock index 34024f8e..39b0a707 100644 --- a/apps/opentelemetry_api/mix.lock +++ b/apps/opentelemetry_api/mix.lock @@ -1,16 +1,6 @@ %{ - "cmark": {:hex, :cmark, "0.10.0", "51217dc90fec459f34a30ea73345e6a7c1d2f3d618cb4a1738a2ebd0697a57a0", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "00abeadc6f3176e3941853122413082de95d57787777dd0400d64e568acf7c32"}, "covertool": {:hex, :covertool, "2.0.6", "4a291b4e3449025b0595d8f44c8d7635d4f48f033be2ce88d22a329f36f94a91", [:rebar3], [], "hexpm", "5db3fcd82180d8ea4ad857d4d1ab21a8d31b5aee0d60d2f6c0f9e25a411d1e21"}, "dialyxir": {:hex, :dialyxir, "1.4.2", "764a6e8e7a354f0ba95d58418178d486065ead1f69ad89782817c296d0d746a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "516603d8067b2fd585319e4b13d3674ad4f314a5902ba8130cd97dc902ce6bbd"}, - "earmark": {:hex, :earmark, "1.4.14", "d04572cef64dd92726a97d92d714e38d6e130b024ea1b3f8a56e7de66ec04e50", [:mix], [{:earmark_parser, ">= 1.4.12", [hex: :earmark_parser, repo: "hexpm", optional: false]}], "hexpm", "df338b8b1852ee425180b276c56c6941cb12220e04fe8718fe4acbdd35fd699f"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.19", "de0d033d5ff9fc396a24eadc2fcf2afa3d120841eb3f1004d138cbf9273210e8", [:mix], [], "hexpm", "527ab6630b5c75c3a3960b75844c314ec305c76d9899bb30f71cb85952a9dc45"}, - "elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"}, "eqwalizer_support": {:git, "https://github.com/whatsapp/eqwalizer.git", "1a787cb604f6083ebe8763e358ea362e4677e500", [branch: "main", sparse: "eqwalizer_support"]}, - "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.28.0", "7eaf526dd8c80ae8c04d52ac8801594426ae322b52a6156cd038f30bafa8226f", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "e55cdadf69a5d1f4cfd8477122ebac5e1fadd433a8c1022dafc5025e48db0131"}, - "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.15.2", "dc72dfe17eb240552857465cc00cce390960d9a0c055c4ccd38b70629227e97c", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "fd23ae48d09b32eff49d4ced2b43c9f086d402ee4fd4fcb2d7fad97fa8823e75"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.2", "b99ca56bbce410e9d5ee4f9155a212e942e224e259c7ebbf8f2c86ac21d4fa3c", [:mix], [], "hexpm", "98d51bd64d5f6a2a9c6bb7586ee8129e27dfaab1140b5a4753f24dac0ba27d2f"}, - "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.2.0", "b67fe459c2938fcab341cb0951c44860c62347c005ace1b50f8402576f241435", [:mix, :rebar3], [], "hexpm", "d61fa1f5639ee8668d74b527e6806e0503efc55a42db7b5f39939d84c07d6895"}, + "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, } diff --git a/apps/opentelemetry_api/rebar.config b/apps/opentelemetry_api/rebar.config index 80183d2d..79231bbb 100644 --- a/apps/opentelemetry_api/rebar.config +++ b/apps/opentelemetry_api/rebar.config @@ -1,5 +1,5 @@ {erl_opts, [debug_info]}. -{deps, [{opentelemetry_semantic_conventions, "~> 0.2"}]}. +{deps, []}. {profiles, [{docs, [{edoc_opts, diff --git a/apps/opentelemetry_api/src/opentelemetry_api.app.src b/apps/opentelemetry_api/src/opentelemetry_api.app.src index 87855a6a..969e2490 100644 --- a/apps/opentelemetry_api/src/opentelemetry_api.app.src +++ b/apps/opentelemetry_api/src/opentelemetry_api.app.src @@ -6,6 +6,7 @@ [kernel, stdlib ]}, + {exclude_paths, ["rebar.lock"]}, {env,[]}, {modules, []}, diff --git a/apps/opentelemetry_api/src/otel_span.erl b/apps/opentelemetry_api/src/otel_span.erl index 6d5b674f..805887af 100644 --- a/apps/opentelemetry_api/src/otel_span.erl +++ b/apps/opentelemetry_api/src/otel_span.erl @@ -41,7 +41,6 @@ end_span/2]). -include("opentelemetry.hrl"). --include_lib("opentelemetry_semantic_conventions/include/trace.hrl"). -define(is_recording(SpanCtx), SpanCtx =/= undefined andalso SpanCtx#span_ctx.is_recording =:= true). @@ -222,8 +221,8 @@ record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) when is_list(Attr record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) when is_map(Attributes) -> {ok, ExceptionType} = otel_utils:format_binary_string("~0tP:~0tP", [Class, 10, Term, 10], [{chars_limit, 50}]), {ok, StacktraceString} = otel_utils:format_binary_string("~0tP", [Stacktrace, 10], [{chars_limit, 50}]), - ExceptionAttributes = #{?EXCEPTION_TYPE => ExceptionType, - ?EXCEPTION_STACKTRACE => StacktraceString}, + ExceptionAttributes = #{'exception.type' => ExceptionType, + 'exception.stacktrace' => StacktraceString}, add_event(SpanCtx, 'exception', maps:merge(ExceptionAttributes, Attributes)); record_exception(_, _, _, _, _) -> false. @@ -240,9 +239,9 @@ record_exception(SpanCtx, Class, Term, Message, Stacktrace, Attributes) when is_ record_exception(SpanCtx, Class, Term, Message, Stacktrace, Attributes) when is_map(Attributes) -> {ok, ExceptionType} = otel_utils:format_binary_string("~0tP:~0tP", [Class, 10, Term, 10], [{chars_limit, 50}]), {ok, StacktraceString} = otel_utils:format_binary_string("~0tP", [Stacktrace, 10], [{chars_limit, 50}]), - ExceptionAttributes = #{?EXCEPTION_TYPE => ExceptionType, - ?EXCEPTION_STACKTRACE => StacktraceString, - ?EXCEPTION_MESSAGE => Message}, + ExceptionAttributes = #{'exception.type' => ExceptionType, + 'exception.stacktrace' => StacktraceString, + 'exception.message' => Message}, add_event(SpanCtx, 'exception', maps:merge(ExceptionAttributes, Attributes)); record_exception(_, _, _, _, _, _) -> false. diff --git a/apps/opentelemetry_api_experimental/mix.exs b/apps/opentelemetry_api_experimental/mix.exs index b1417be8..18faf8f3 100644 --- a/apps/opentelemetry_api_experimental/mix.exs +++ b/apps/opentelemetry_api_experimental/mix.exs @@ -64,14 +64,14 @@ defmodule OpenTelemetryExperimental.MixProject do end defp load_config do - {:ok, config} = :file.consult('rebar.config') + {:ok, config} = :file.consult(~c"rebar.config") config end defp load_app do {:ok, [{:application, name, desc}]} = - :file.consult('src/opentelemetry_api_experimental.app.src') + :file.consult(~c"src/opentelemetry_api_experimental.app.src") {name, desc} end diff --git a/apps/opentelemetry_api_experimental/src/opentelemetry_api_experimental.app.src b/apps/opentelemetry_api_experimental/src/opentelemetry_api_experimental.app.src index bf350412..3bc55694 100644 --- a/apps/opentelemetry_api_experimental/src/opentelemetry_api_experimental.app.src +++ b/apps/opentelemetry_api_experimental/src/opentelemetry_api_experimental.app.src @@ -7,6 +7,7 @@ stdlib, opentelemetry_api ]}, + {exclude_paths, ["rebar.lock"]}, {env,[]}, {modules, []}, diff --git a/apps/opentelemetry_experimental/src/opentelemetry_experimental.app.src b/apps/opentelemetry_experimental/src/opentelemetry_experimental.app.src index 51be694d..8a7886a5 100644 --- a/apps/opentelemetry_experimental/src/opentelemetry_experimental.app.src +++ b/apps/opentelemetry_experimental/src/opentelemetry_experimental.app.src @@ -10,6 +10,7 @@ opentelemetry_api_experimental, opentelemetry ]}, + {exclude_paths, ["rebar.lock"]}, {env,[]}, {modules, []}, diff --git a/apps/opentelemetry_exporter/src/opentelemetry_exporter.app.src b/apps/opentelemetry_exporter/src/opentelemetry_exporter.app.src index a190794a..898eac63 100644 --- a/apps/opentelemetry_exporter/src/opentelemetry_exporter.app.src +++ b/apps/opentelemetry_exporter/src/opentelemetry_exporter.app.src @@ -11,6 +11,7 @@ tls_certificate_check, opentelemetry_api ]}, + {exclude_paths, ["rebar.lock"]}, {env,[]}, {modules, []}, diff --git a/apps/opentelemetry_semantic_conventions/.gitignore b/apps/opentelemetry_semantic_conventions/.gitignore index 80316eb7..bc9ab70d 100644 --- a/apps/opentelemetry_semantic_conventions/.gitignore +++ b/apps/opentelemetry_semantic_conventions/.gitignore @@ -18,3 +18,4 @@ _build rebar3.crashdump *~ deps +semtmp diff --git a/apps/opentelemetry_semantic_conventions/README.md b/apps/opentelemetry_semantic_conventions/README.md index 5929b02f..f8e67b5a 100644 --- a/apps/opentelemetry_semantic_conventions/README.md +++ b/apps/opentelemetry_semantic_conventions/README.md @@ -1,28 +1,105 @@ -Opentelemetry Semantic Conventions -===== +# Opentelemetry Semantic Conventions Auto-generated constants that represent the [OpenTelemetry Semantic -Conventions](https://github.com/open-telemetry/opentelemetry-specification/tree/main/semantic_conventions). +Conventions](https://github.com/open-telemetry/semantic-conventions). -## How to Use +## Usage + +Comprehensive documentation is available on [hexdocs](https://hexdocs.pm/opentelemetry_semantic_conventions) for Elixir and Erlang. + +Check out the Guides tab on HexDocs for detailed attribute information +and usage. + +### Migration from v1.13.0 (v0.2.0 package version) semantic conventions + +The structure of OpenTelemetry Semantic Conventions has evolved a great +deal since the last version we have published. All attributes now live +under a common attribute registry. In addition, attributes have been classified +as stable or experimental. + +Attributes are now organized by attribute group and stability. The prior code +has been kept in a deprecated status to allow backward compatability +during migration. + +### Erlang For Erlang include the semantic conventions header for the particular kind you -need (`trace`, `resource`, `logs`): +need: ``` --include_lib("opentelemetry_semantic_conventions/include/trace.hrl"). +-include_lib("opentelemetry_semantic_conventions/include/attributes/url_attributes.hrl"). ``` You can then use the macros for the attribute keys: ``` -?DB_CONNECTION_STRING +?URL_PATH +``` + +#### Enums + +Enum Attribute types define each value in a macro with the attribute name prefixed. + +Enum Attributes allow for a user-supplied value when no pre-defined option exists. Users +may set this value manually while paying attention to the required value type + +#### Incubating Attributes & Metrics + +Incubating attribute header files are located in the `incubating` folder and metrics under `incubating/metrics`. + +Experimental attributes are considered to be incubating. Attribute groups can +contain attributes which are stable, experimental, or both. Experimental +attributes are contained in an incubating header. Attribute groups containing +attributes of both stability levels will have two header files in this case. + +``` +-include_lib("opentelemetry_semantic_conventions/include/incubating/attributes/url_attributes.hrl"). +``` + +You can then use the macros for the experimental attribute keys: + +``` +?URL_DOMAIN ``` ### Elixir -You could also use `OpenTelemetry.SemanticConventions.Logs`, `OpenTelemetry.SemanticConventions.Resource` or -`OpenTelemetry.SemanticConventions.Trace` modules. +Attributes in Elixir are defined as functions. To use an attribute, simply call it +with that attribute's name. + +``` +iex> OpenTelemetry.SemConv.URLAttributes.url_path() +:"url.path" +``` + +#### Enums + +Enum Attributes allow for a user-supplied value when no pre-defined option exists. Users +may set this value manually while paying attention to the required value type + +``` +iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_system_values().postgresql +:postgresql +``` + +Enum Attributes allow for a user-supplied value when no pre-defined option exists. Users +may set this value manually while paying attention to the required value type + +#### Incubating Attributes + +Incubating attributes are located under the `OpenTelemetry.SemConv.Incubating` +namespace. + +Experimental attributes are considered to be incubating. Attribute groups can +contain attributes which are stable, experimental, or both. Experimental +attributes are contained in an incubating module. Attribute groups containing +attributes of both stability levels will have two modules in this case. + +## Contribution - iex> OpenTelemetry.SemanticConventions.Logs.event_name() - :"event.name" +The semantic conventions are auto-generated from the definitions in +[OpenTelemetry Semantic +Conventions](https://github.com/open-telemetry/semantic-conventions) repository. +To generate the file, execute the generator by invoking `elixir generate.exs` in the +root of this folder. The definitions version to be generated is set in the `generate.exs` +file. diff --git a/apps/opentelemetry_semantic_conventions/docs.config b/apps/opentelemetry_semantic_conventions/docs.config deleted file mode 100644 index 0ed954f0..00000000 --- a/apps/opentelemetry_semantic_conventions/docs.config +++ /dev/null @@ -1,4 +0,0 @@ -{source_url, <<"https://github.com/open-telemetry/opentelemetry-erlang">>}. -{extras, [<<"apps/opentelemetry_semantic_conventions/README.md">>, <<"apps/opentelemetry_semantic_conventions/LICENSE">>, <<"VERSIONING.md">>]}. -{main, <<"readme">>}. -{proglang, erlang}. diff --git a/apps/opentelemetry_semantic_conventions/generate.sh b/apps/opentelemetry_semantic_conventions/generate.sh deleted file mode 100755 index da4568ba..00000000 --- a/apps/opentelemetry_semantic_conventions/generate.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -semconv_version='1.13.0' -docker_img_vsn='0.14.0' -schema_uri=https://opentelemetry.io/schemas/$semconv_version - -tmp_dir=$(mktemp -d) -git clone https://github.com/open-telemetry/opentelemetry-specification.git $tmp_dir - -cwd=$(pwd) - -cd $tmp_dir - -git checkout "v${semconv_version}" - -for kind in trace resource logs; do - docker run --rm \ - -v "${tmp_dir}/semantic_conventions/${kind}":/source \ - -v "${cwd}/templates":/templates \ - -v "${cwd}/include":/output \ - otel/semconvgen:${docker_img_vsn} \ - -f /source code \ - --template /templates/semantic_conventions.hrl.j2 \ - --output /output/${kind}.hrl \ - -Dmodule=${kind} \ - -Dschema_uri=${schema_uri} - - docker run --rm \ - -v "${tmp_dir}/semantic_conventions/${kind}":/source \ - -v "${cwd}/templates":/templates \ - -v "${cwd}/lib/open_telemetry/semantic_conventions":/output \ - otel/semconvgen:${docker_img_vsn} \ - -f /source code \ - --template /templates/semantic_conventions.ex.j2 \ - --output /output/${kind}.ex \ - -Dmodule=${kind} \ - -Dschema_uri=${schema_uri} -done diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/client_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/client_attributes.hrl new file mode 100644 index 00000000..193bca86 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/client_attributes.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +-define(CLIENT_ADDRESS, 'client.address'). + + +%% Client port number. +-define(CLIENT_PORT, 'client.port'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/error_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/error_attributes.hrl new file mode 100644 index 00000000..640a982f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/error_attributes.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Describes a class of error the operation ended with. +%% +-define(ERROR_TYPE, 'error.type'). + +-define(ERROR_TYPE_VALUES_OTHER, '_OTHER'). + diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl new file mode 100644 index 00000000..fee6dd17 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl @@ -0,0 +1,33 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. +%% +-define(EXCEPTION_ESCAPED, 'exception.escaped'). + + +%% The exception message. +-define(EXCEPTION_MESSAGE, 'exception.message'). + + +%% A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. +%% +-define(EXCEPTION_STACKTRACE, 'exception.stacktrace'). + + +%% The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. +%% +-define(EXCEPTION_TYPE, 'exception.type'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/http_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/http_attributes.hrl new file mode 100644 index 00000000..014d1d70 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/http_attributes.hrl @@ -0,0 +1,67 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. +%% +-define(HTTP_REQUEST_HEADER, 'http.request.header'). + + +%% HTTP request method. +-define(HTTP_REQUEST_METHOD, 'http.request.method'). + +-define(HTTP_REQUEST_METHOD_VALUES_CONNECT, 'CONNECT'). + +-define(HTTP_REQUEST_METHOD_VALUES_DELETE, 'DELETE'). + +-define(HTTP_REQUEST_METHOD_VALUES_GET, 'GET'). + +-define(HTTP_REQUEST_METHOD_VALUES_HEAD, 'HEAD'). + +-define(HTTP_REQUEST_METHOD_VALUES_OPTIONS, 'OPTIONS'). + +-define(HTTP_REQUEST_METHOD_VALUES_PATCH, 'PATCH'). + +-define(HTTP_REQUEST_METHOD_VALUES_POST, 'POST'). + +-define(HTTP_REQUEST_METHOD_VALUES_PUT, 'PUT'). + +-define(HTTP_REQUEST_METHOD_VALUES_TRACE, 'TRACE'). + +-define(HTTP_REQUEST_METHOD_VALUES_OTHER, '_OTHER'). + + + +%% Original HTTP method sent by the client in the request line. +-define(HTTP_REQUEST_METHOD_ORIGINAL, 'http.request.method_original'). + + +%% The ordinal number of request resending attempt (for any reason, including redirects). +%% +-define(HTTP_REQUEST_RESEND_COUNT, 'http.request.resend_count'). + + +%% HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. +%% +-define(HTTP_RESPONSE_HEADER, 'http.response.header'). + + +%% [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). +-define(HTTP_RESPONSE_STATUS_CODE, 'http.response.status_code'). + + +%% The matched route, that is, the path template in the format used by the respective server framework. +%% +-define(HTTP_ROUTE, 'http.route'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl new file mode 100644 index 00000000..2bc501ca --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl @@ -0,0 +1,63 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Local address of the network connection - IP address or Unix domain socket name. +-define(NETWORK_LOCAL_ADDRESS, 'network.local.address'). + + +%% Local port number of the network connection. +-define(NETWORK_LOCAL_PORT, 'network.local.port'). + + +%% Peer address of the network connection - IP address or Unix domain socket name. +-define(NETWORK_PEER_ADDRESS, 'network.peer.address'). + + +%% Peer port number of the network connection. +-define(NETWORK_PEER_PORT, 'network.peer.port'). + + +%% [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. +-define(NETWORK_PROTOCOL_NAME, 'network.protocol.name'). + + +%% The actual version of the protocol used for network communication. +-define(NETWORK_PROTOCOL_VERSION, 'network.protocol.version'). + + +%% [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). +%% +-define(NETWORK_TRANSPORT, 'network.transport'). + +-define(NETWORK_TRANSPORT_VALUES_TCP, 'tcp'). + +-define(NETWORK_TRANSPORT_VALUES_UDP, 'udp'). + +-define(NETWORK_TRANSPORT_VALUES_PIPE, 'pipe'). + +-define(NETWORK_TRANSPORT_VALUES_UNIX, 'unix'). + +-define(NETWORK_TRANSPORT_VALUES_QUIC, 'quic'). + + + +%% [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. +-define(NETWORK_TYPE, 'network.type'). + +-define(NETWORK_TYPE_VALUES_IPV4, 'ipv4'). + +-define(NETWORK_TYPE_VALUES_IPV6, 'ipv6'). + diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/otel_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/otel_attributes.hrl new file mode 100644 index 00000000..6374bdec --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/otel_attributes.hrl @@ -0,0 +1,35 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). +-define(OTEL_SCOPE_NAME, 'otel.scope.name'). + + +%% The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). +-define(OTEL_SCOPE_VERSION, 'otel.scope.version'). + + +%% Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. +-define(OTEL_STATUS_CODE, 'otel.status_code'). + +-define(OTEL_STATUS_CODE_VALUES_OK, 'OK'). + +-define(OTEL_STATUS_CODE_VALUES_ERROR, 'ERROR'). + + + +%% Description of the Status if it has a value, otherwise not set. +-define(OTEL_STATUS_DESCRIPTION, 'otel.status_description'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/server_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/server_attributes.hrl new file mode 100644 index 00000000..0b31242b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/server_attributes.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +-define(SERVER_ADDRESS, 'server.address'). + + +%% Server port number. +-define(SERVER_PORT, 'server.port'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl new file mode 100644 index 00000000..5a9422ad --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl @@ -0,0 +1,24 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Logical name of the service. +%% +-define(SERVICE_NAME, 'service.name'). + + +%% The version string of the service API or implementation. The format is not defined by these conventions. +%% +-define(SERVICE_VERSION, 'service.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/telemetry_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/telemetry_attributes.hrl new file mode 100644 index 00000000..85295608 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/telemetry_attributes.hrl @@ -0,0 +1,54 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The language of the telemetry SDK. +%% +-define(TELEMETRY_SDK_LANGUAGE, 'telemetry.sdk.language'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_CPP, 'cpp'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_DOTNET, 'dotnet'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_ERLANG, 'erlang'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_GO, 'go'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_JAVA, 'java'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_NODEJS, 'nodejs'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_PHP, 'php'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_PYTHON, 'python'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_RUBY, 'ruby'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_RUST, 'rust'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_SWIFT, 'swift'). + +-define(TELEMETRY_SDK_LANGUAGE_VALUES_WEBJS, 'webjs'). + + + +%% The name of the telemetry SDK as defined above. +%% +-define(TELEMETRY_SDK_NAME, 'telemetry.sdk.name'). + + +%% The version string of the telemetry SDK. +%% +-define(TELEMETRY_SDK_VERSION, 'telemetry.sdk.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/url_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/url_attributes.hrl new file mode 100644 index 00000000..de20e51b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/url_attributes.hrl @@ -0,0 +1,38 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component +%% +-define(URL_FRAGMENT, 'url.fragment'). + + +%% Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) +-define(URL_FULL, 'url.full'). + + +%% The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component +%% +-define(URL_PATH, 'url.path'). + + +%% The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component +%% +-define(URL_QUERY, 'url.query'). + + +%% The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. +%% +-define(URL_SCHEME, 'url.scheme'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/user_agent_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/user_agent_attributes.hrl new file mode 100644 index 00000000..611dee21 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/user_agent_attributes.hrl @@ -0,0 +1,19 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. +%% +-define(USER_AGENT_ORIGINAL, 'user_agent.original'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl new file mode 100644 index 00000000..ca4cc4d1 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl @@ -0,0 +1,49 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The provenance filename of the built attestation which directly relates to the build artifact filename. This filename SHOULD accompany the artifact at publish time. See the [SLSA Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) specification for more information. +%% +-define(ARTIFACT_ATTESTATION_FILENAME, 'artifact.attestation.filename'). + + +%% The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the software attestation space also refer to this as the [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). +%% +-define(ARTIFACT_ATTESTATION_HASH, 'artifact.attestation.hash'). + + +%% The id of the build [software attestation](https://slsa.dev/attestation-model). +%% +-define(ARTIFACT_ATTESTATION_ID, 'artifact.attestation.id'). + + +%% The human readable file name of the artifact, typically generated during build and release processes. Often includes the package name and version in the file name. +%% +-define(ARTIFACT_FILENAME, 'artifact.filename'). + + +%% The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), often found in checksum.txt on a release of the artifact and used to verify package integrity. +%% +-define(ARTIFACT_HASH, 'artifact.hash'). + + +%% The [Package URL](https://github.com/package-url/purl-spec) of the [package artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides a standard way to identify and locate the packaged artifact. +%% +-define(ARTIFACT_PURL, 'artifact.purl'). + + +%% The version of the artifact. +%% +-define(ARTIFACT_VERSION, 'artifact.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl new file mode 100644 index 00000000..219b9082 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl @@ -0,0 +1,200 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The JSON-serialized value of each item in the `AttributeDefinitions` request field. +-define(AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, 'aws.dynamodb.attribute_definitions'). + + +%% The value of the `AttributesToGet` request parameter. +-define(AWS_DYNAMODB_ATTRIBUTES_TO_GET, 'aws.dynamodb.attributes_to_get'). + + +%% The value of the `ConsistentRead` request parameter. +-define(AWS_DYNAMODB_CONSISTENT_READ, 'aws.dynamodb.consistent_read'). + + +%% The JSON-serialized value of each item in the `ConsumedCapacity` response field. +-define(AWS_DYNAMODB_CONSUMED_CAPACITY, 'aws.dynamodb.consumed_capacity'). + + +%% The value of the `Count` response parameter. +-define(AWS_DYNAMODB_COUNT, 'aws.dynamodb.count'). + + +%% The value of the `ExclusiveStartTableName` request parameter. +-define(AWS_DYNAMODB_EXCLUSIVE_START_TABLE, 'aws.dynamodb.exclusive_start_table'). + + +%% The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. +-define(AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES, 'aws.dynamodb.global_secondary_index_updates'). + + +%% The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field +-define(AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES, 'aws.dynamodb.global_secondary_indexes'). + + +%% The value of the `IndexName` request parameter. +-define(AWS_DYNAMODB_INDEX_NAME, 'aws.dynamodb.index_name'). + + +%% The JSON-serialized value of the `ItemCollectionMetrics` response field. +-define(AWS_DYNAMODB_ITEM_COLLECTION_METRICS, 'aws.dynamodb.item_collection_metrics'). + + +%% The value of the `Limit` request parameter. +-define(AWS_DYNAMODB_LIMIT, 'aws.dynamodb.limit'). + + +%% The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. +-define(AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES, 'aws.dynamodb.local_secondary_indexes'). + + +%% The value of the `ProjectionExpression` request parameter. +-define(AWS_DYNAMODB_PROJECTION, 'aws.dynamodb.projection'). + + +%% The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. +-define(AWS_DYNAMODB_PROVISIONED_READ_CAPACITY, 'aws.dynamodb.provisioned_read_capacity'). + + +%% The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. +-define(AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY, 'aws.dynamodb.provisioned_write_capacity'). + + +%% The value of the `ScanIndexForward` request parameter. +-define(AWS_DYNAMODB_SCAN_FORWARD, 'aws.dynamodb.scan_forward'). + + +%% The value of the `ScannedCount` response parameter. +-define(AWS_DYNAMODB_SCANNED_COUNT, 'aws.dynamodb.scanned_count'). + + +%% The value of the `Segment` request parameter. +-define(AWS_DYNAMODB_SEGMENT, 'aws.dynamodb.segment'). + + +%% The value of the `Select` request parameter. +-define(AWS_DYNAMODB_SELECT, 'aws.dynamodb.select'). + + +%% The number of items in the `TableNames` response parameter. +-define(AWS_DYNAMODB_TABLE_COUNT, 'aws.dynamodb.table_count'). + + +%% The keys in the `RequestItems` object field. +-define(AWS_DYNAMODB_TABLE_NAMES, 'aws.dynamodb.table_names'). + + +%% The value of the `TotalSegments` request parameter. +-define(AWS_DYNAMODB_TOTAL_SEGMENTS, 'aws.dynamodb.total_segments'). + + +%% The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). +%% +-define(AWS_ECS_CLUSTER_ARN, 'aws.ecs.cluster.arn'). + + +%% The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). +%% +-define(AWS_ECS_CONTAINER_ARN, 'aws.ecs.container.arn'). + + +%% The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. +%% +-define(AWS_ECS_LAUNCHTYPE, 'aws.ecs.launchtype'). + +-define(AWS_ECS_LAUNCHTYPE_VALUES_EC2, 'ec2'). + +-define(AWS_ECS_LAUNCHTYPE_VALUES_FARGATE, 'fargate'). + + + +%% The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). +%% +-define(AWS_ECS_TASK_ARN, 'aws.ecs.task.arn'). + + +%% The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. +%% +-define(AWS_ECS_TASK_FAMILY, 'aws.ecs.task.family'). + + +%% The ID of a running ECS task. The ID MUST be extracted from `task.arn`. +%% +-define(AWS_ECS_TASK_ID, 'aws.ecs.task.id'). + + +%% The revision for the task definition used to create the ECS task. +%% +-define(AWS_ECS_TASK_REVISION, 'aws.ecs.task.revision'). + + +%% The ARN of an EKS cluster. +%% +-define(AWS_EKS_CLUSTER_ARN, 'aws.eks.cluster.arn'). + + +%% The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). +%% +-define(AWS_LAMBDA_INVOKED_ARN, 'aws.lambda.invoked_arn'). + + +%% The Amazon Resource Name(s) (ARN) of the AWS log group(s). +%% +-define(AWS_LOG_GROUP_ARNS, 'aws.log.group.arns'). + + +%% The name(s) of the AWS log group(s) an application is writing to. +%% +-define(AWS_LOG_GROUP_NAMES, 'aws.log.group.names'). + + +%% The ARN(s) of the AWS log stream(s). +%% +-define(AWS_LOG_STREAM_ARNS, 'aws.log.stream.arns'). + + +%% The name(s) of the AWS log stream(s) an application is writing to. +%% +-define(AWS_LOG_STREAM_NAMES, 'aws.log.stream.names'). + + +%% The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. +-define(AWS_REQUEST_ID, 'aws.request_id'). + + +%% The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. +-define(AWS_S3_BUCKET, 'aws.s3.bucket'). + + +%% The source object (in the form `bucket`/`key`) for the copy operation. +-define(AWS_S3_COPY_SOURCE, 'aws.s3.copy_source'). + + +%% The delete request container that specifies the objects to be deleted. +-define(AWS_S3_DELETE, 'aws.s3.delete'). + + +%% The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. +-define(AWS_S3_KEY, 'aws.s3.key'). + + +%% The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000. +-define(AWS_S3_PART_NUMBER, 'aws.s3.part_number'). + + +%% Upload ID that identifies the multipart upload. +-define(AWS_S3_UPLOAD_ID, 'aws.s3.upload_id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/azure_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/azure_attributes.hrl new file mode 100644 index 00000000..7038ced4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/azure_attributes.hrl @@ -0,0 +1,18 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The unique identifier of the service request. It's generated by the Azure service and returned with the response. +-define(AZ_SERVICE_REQUEST_ID, 'az.service_request_id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/browser_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/browser_attributes.hrl new file mode 100644 index 00000000..a016ca03 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/browser_attributes.hrl @@ -0,0 +1,30 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Array of brand name and version separated by a space +-define(BROWSER_BRANDS, 'browser.brands'). + + +%% Preferred language of the user using the browser +-define(BROWSER_LANGUAGE, 'browser.language'). + + +%% A boolean that is true if the browser is running on a mobile device +-define(BROWSER_MOBILE, 'browser.mobile'). + + +%% The platform on which the browser is running +-define(BROWSER_PLATFORM, 'browser.platform'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl new file mode 100644 index 00000000..76a45ed4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl @@ -0,0 +1,51 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The human readable name of the pipeline within a CI/CD system. +%% +-define(CICD_PIPELINE_NAME, 'cicd.pipeline.name'). + + +%% The unique identifier of a pipeline run within a CI/CD system. +%% +-define(CICD_PIPELINE_RUN_ID, 'cicd.pipeline.run.id'). + + +%% The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. +%% +-define(CICD_PIPELINE_TASK_NAME, 'cicd.pipeline.task.name'). + + +%% The unique identifier of a task run within a pipeline. +%% +-define(CICD_PIPELINE_TASK_RUN_ID, 'cicd.pipeline.task.run.id'). + + +%% The [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run providing the complete address in order to locate and identify the pipeline run. +%% +-define(CICD_PIPELINE_TASK_RUN_URL_FULL, 'cicd.pipeline.task.run.url.full'). + + +%% The type of the task within a pipeline. +%% +-define(CICD_PIPELINE_TASK_TYPE, 'cicd.pipeline.task.type'). + +-define(CICD_PIPELINE_TASK_TYPE_VALUES_BUILD, 'build'). + +-define(CICD_PIPELINE_TASK_TYPE_VALUES_TEST, 'test'). + +-define(CICD_PIPELINE_TASK_TYPE_VALUES_DEPLOY, 'deploy'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl new file mode 100644 index 00000000..687a9374 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl @@ -0,0 +1,116 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The cloud account ID the resource is assigned to. +%% +-define(CLOUD_ACCOUNT_ID, 'cloud.account.id'). + + +%% Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. +%% +-define(CLOUD_AVAILABILITY_ZONE, 'cloud.availability_zone'). + + +%% The cloud platform in use. +%% +-define(CLOUD_PLATFORM, 'cloud.platform'). + +-define(CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_ECS, 'alibaba_cloud_ecs'). + +-define(CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_FC, 'alibaba_cloud_fc'). + +-define(CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_OPENSHIFT, 'alibaba_cloud_openshift'). + +-define(CLOUD_PLATFORM_VALUES_AWS_EC2, 'aws_ec2'). + +-define(CLOUD_PLATFORM_VALUES_AWS_ECS, 'aws_ecs'). + +-define(CLOUD_PLATFORM_VALUES_AWS_EKS, 'aws_eks'). + +-define(CLOUD_PLATFORM_VALUES_AWS_LAMBDA, 'aws_lambda'). + +-define(CLOUD_PLATFORM_VALUES_AWS_ELASTIC_BEANSTALK, 'aws_elastic_beanstalk'). + +-define(CLOUD_PLATFORM_VALUES_AWS_APP_RUNNER, 'aws_app_runner'). + +-define(CLOUD_PLATFORM_VALUES_AWS_OPENSHIFT, 'aws_openshift'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_VM, 'azure_vm'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_CONTAINER_APPS, 'azure_container_apps'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_CONTAINER_INSTANCES, 'azure_container_instances'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_AKS, 'azure_aks'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_FUNCTIONS, 'azure_functions'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_APP_SERVICE, 'azure_app_service'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_OPENSHIFT, 'azure_openshift'). + +-define(CLOUD_PLATFORM_VALUES_GCP_BARE_METAL_SOLUTION, 'gcp_bare_metal_solution'). + +-define(CLOUD_PLATFORM_VALUES_GCP_COMPUTE_ENGINE, 'gcp_compute_engine'). + +-define(CLOUD_PLATFORM_VALUES_GCP_CLOUD_RUN, 'gcp_cloud_run'). + +-define(CLOUD_PLATFORM_VALUES_GCP_KUBERNETES_ENGINE, 'gcp_kubernetes_engine'). + +-define(CLOUD_PLATFORM_VALUES_GCP_CLOUD_FUNCTIONS, 'gcp_cloud_functions'). + +-define(CLOUD_PLATFORM_VALUES_GCP_APP_ENGINE, 'gcp_app_engine'). + +-define(CLOUD_PLATFORM_VALUES_GCP_OPENSHIFT, 'gcp_openshift'). + +-define(CLOUD_PLATFORM_VALUES_IBM_CLOUD_OPENSHIFT, 'ibm_cloud_openshift'). + +-define(CLOUD_PLATFORM_VALUES_TENCENT_CLOUD_CVM, 'tencent_cloud_cvm'). + +-define(CLOUD_PLATFORM_VALUES_TENCENT_CLOUD_EKS, 'tencent_cloud_eks'). + +-define(CLOUD_PLATFORM_VALUES_TENCENT_CLOUD_SCF, 'tencent_cloud_scf'). + + + +%% Name of the cloud provider. +%% +-define(CLOUD_PROVIDER, 'cloud.provider'). + +-define(CLOUD_PROVIDER_VALUES_ALIBABA_CLOUD, 'alibaba_cloud'). + +-define(CLOUD_PROVIDER_VALUES_AWS, 'aws'). + +-define(CLOUD_PROVIDER_VALUES_AZURE, 'azure'). + +-define(CLOUD_PROVIDER_VALUES_GCP, 'gcp'). + +-define(CLOUD_PROVIDER_VALUES_HEROKU, 'heroku'). + +-define(CLOUD_PROVIDER_VALUES_IBM_CLOUD, 'ibm_cloud'). + +-define(CLOUD_PROVIDER_VALUES_TENCENT_CLOUD, 'tencent_cloud'). + + + +%% The geographical region the resource is running. +%% +-define(CLOUD_REGION, 'cloud.region'). + + +%% Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP) +%% +-define(CLOUD_RESOURCE_ID, 'cloud.resource_id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudevents_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudevents_attributes.hrl new file mode 100644 index 00000000..97ef4a27 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudevents_attributes.hrl @@ -0,0 +1,39 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. +%% +-define(CLOUDEVENTS_EVENT_ID, 'cloudevents.event_id'). + + +%% The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. +%% +-define(CLOUDEVENTS_EVENT_SOURCE, 'cloudevents.event_source'). + + +%% The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. +%% +-define(CLOUDEVENTS_EVENT_SPEC_VERSION, 'cloudevents.event_spec_version'). + + +%% The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source). +%% +-define(CLOUDEVENTS_EVENT_SUBJECT, 'cloudevents.event_subject'). + + +%% The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence. +%% +-define(CLOUDEVENTS_EVENT_TYPE, 'cloudevents.event_type'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/code_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/code_attributes.hrl new file mode 100644 index 00000000..8500b126 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/code_attributes.hrl @@ -0,0 +1,44 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. +%% +-define(CODE_COLUMN, 'code.column'). + + +%% The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). +%% +-define(CODE_FILEPATH, 'code.filepath'). + + +%% The method or function name, or equivalent (usually rightmost part of the code unit's name). +%% +-define(CODE_FUNCTION, 'code.function'). + + +%% The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. +%% +-define(CODE_LINENO, 'code.lineno'). + + +%% The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. +%% +-define(CODE_NAMESPACE, 'code.namespace'). + + +%% A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. +%% +-define(CODE_STACKTRACE, 'code.stacktrace'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl new file mode 100644 index 00000000..f99c32b8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl @@ -0,0 +1,84 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The command used to run the container (i.e. the command name). +%% +-define(CONTAINER_COMMAND, 'container.command'). + + +%% All the command arguments (including the command/executable itself) run by the container. [2] +%% +-define(CONTAINER_COMMAND_ARGS, 'container.command_args'). + + +%% The full command run by the container as a single string representing the full command. [2] +%% +-define(CONTAINER_COMMAND_LINE, 'container.command_line'). + +%% @deprecated Replaced by `cpu.mode` +%% Deprecated, use `cpu.mode` instead. +-define(CONTAINER_CPU_STATE, 'container.cpu.state'). + +-define(CONTAINER_CPU_STATE_VALUES_USER, 'user'). + +-define(CONTAINER_CPU_STATE_VALUES_SYSTEM, 'system'). + +-define(CONTAINER_CPU_STATE_VALUES_KERNEL, 'kernel'). + + + +%% Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. +%% +-define(CONTAINER_ID, 'container.id'). + + +%% Runtime specific image identifier. Usually a hash algorithm followed by a UUID. +%% +-define(CONTAINER_IMAGE_ID, 'container.image.id'). + + +%% Name of the image the container was built on. +%% +-define(CONTAINER_IMAGE_NAME, 'container.image.name'). + + +%% Repo digests of the container image as provided by the container runtime. +%% +-define(CONTAINER_IMAGE_REPO_DIGESTS, 'container.image.repo_digests'). + + +%% Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. +%% +-define(CONTAINER_IMAGE_TAGS, 'container.image.tags'). + + +%% Container labels, `` being the label name, the value being the label value. +%% +-define(CONTAINER_LABEL, 'container.label'). + +%% @deprecated Replaced by `container.label`. +%% Deprecated, use `container.label` instead. +-define(CONTAINER_LABELS, 'container.labels'). + + +%% Container name used by container runtime. +%% +-define(CONTAINER_NAME, 'container.name'). + + +%% The container runtime managing this container. +%% +-define(CONTAINER_RUNTIME, 'container.runtime'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl new file mode 100644 index 00000000..9ed41c80 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl @@ -0,0 +1,35 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The mode of the CPU +-define(CPU_MODE, 'cpu.mode'). + +-define(CPU_MODE_VALUES_USER, 'user'). + +-define(CPU_MODE_VALUES_SYSTEM, 'system'). + +-define(CPU_MODE_VALUES_NICE, 'nice'). + +-define(CPU_MODE_VALUES_IDLE, 'idle'). + +-define(CPU_MODE_VALUES_IOWAIT, 'iowait'). + +-define(CPU_MODE_VALUES_INTERRUPT, 'interrupt'). + +-define(CPU_MODE_VALUES_STEAL, 'steal'). + +-define(CPU_MODE_VALUES_KERNEL, 'kernel'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/db_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/db_attributes.hrl new file mode 100644 index 00000000..237c3025 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/db_attributes.hrl @@ -0,0 +1,380 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). +%% +-define(DB_CASSANDRA_CONSISTENCY_LEVEL, 'db.cassandra.consistency_level'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL, 'all'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_EACH_QUORUM, 'each_quorum'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_QUORUM, 'quorum'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_LOCAL_QUORUM, 'local_quorum'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_ONE, 'one'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_TWO, 'two'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_THREE, 'three'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_LOCAL_ONE, 'local_one'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_ANY, 'any'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_SERIAL, 'serial'). + +-define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_LOCAL_SERIAL, 'local_serial'). + + + +%% The data center of the coordinating node for a query. +%% +-define(DB_CASSANDRA_COORDINATOR_DC, 'db.cassandra.coordinator.dc'). + + +%% The ID of the coordinating node for a query. +%% +-define(DB_CASSANDRA_COORDINATOR_ID, 'db.cassandra.coordinator.id'). + + +%% Whether or not the query is idempotent. +%% +-define(DB_CASSANDRA_IDEMPOTENCE, 'db.cassandra.idempotence'). + + +%% The fetch size used for paging, i.e. how many rows will be returned at once. +%% +-define(DB_CASSANDRA_PAGE_SIZE, 'db.cassandra.page_size'). + + +%% The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. +%% +-define(DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT, 'db.cassandra.speculative_execution_count'). + +%% @deprecated Replaced by `db.collection.name`. +%% Deprecated, use `db.collection.name` instead. +-define(DB_CASSANDRA_TABLE, 'db.cassandra.table'). + + +%% The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it. +%% +-define(DB_CLIENT_CONNECTION_POOL_NAME, 'db.client.connection.pool.name'). + + +%% The state of a connection in the pool +-define(DB_CLIENT_CONNECTION_STATE, 'db.client.connection.state'). + +-define(DB_CLIENT_CONNECTION_STATE_VALUES_IDLE, 'idle'). + +-define(DB_CLIENT_CONNECTION_STATE_VALUES_USED, 'used'). + + +%% @deprecated Replaced by `db.client.connection.pool.name`. +%% Deprecated, use `db.client.connection.pool.name` instead. +-define(DB_CLIENT_CONNECTIONS_POOL_NAME, 'db.client.connections.pool.name'). + +%% @deprecated Replaced by `db.client.connection.state`. +%% Deprecated, use `db.client.connection.state` instead. +-define(DB_CLIENT_CONNECTIONS_STATE, 'db.client.connections.state'). + +-define(DB_CLIENT_CONNECTIONS_STATE_VALUES_IDLE, 'idle'). + +-define(DB_CLIENT_CONNECTIONS_STATE_VALUES_USED, 'used'). + + + +%% The name of a collection (table, container) within the database. +-define(DB_COLLECTION_NAME, 'db.collection.name'). + +%% @deprecated "Replaced by `server.address` and `server.port`." +%% +%% Deprecated, use `server.address`, `server.port` attributes instead. +-define(DB_CONNECTION_STRING, 'db.connection_string'). + + +%% Unique Cosmos client instance id. +-define(DB_COSMOSDB_CLIENT_ID, 'db.cosmosdb.client_id'). + + +%% Cosmos client connection mode. +-define(DB_COSMOSDB_CONNECTION_MODE, 'db.cosmosdb.connection_mode'). + +-define(DB_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY, 'gateway'). + +-define(DB_COSMOSDB_CONNECTION_MODE_VALUES_DIRECT, 'direct'). + + +%% @deprecated Replaced by `db.collection.name`. +%% Deprecated, use `db.collection.name` instead. +-define(DB_COSMOSDB_CONTAINER, 'db.cosmosdb.container'). + + +%% CosmosDB Operation Type. +-define(DB_COSMOSDB_OPERATION_TYPE, 'db.cosmosdb.operation_type'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_INVALID, 'Invalid'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_CREATE, 'Create'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_PATCH, 'Patch'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_READ, 'Read'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_READ_FEED, 'ReadFeed'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_DELETE, 'Delete'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_REPLACE, 'Replace'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_EXECUTE, 'Execute'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_QUERY, 'Query'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_HEAD, 'Head'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_HEAD_FEED, 'HeadFeed'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_UPSERT, 'Upsert'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_BATCH, 'Batch'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_QUERY_PLAN, 'QueryPlan'). + +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_EXECUTE_JAVASCRIPT, 'ExecuteJavaScript'). + + + +%% RU consumed for that operation +-define(DB_COSMOSDB_REQUEST_CHARGE, 'db.cosmosdb.request_charge'). + + +%% Request payload size in bytes +-define(DB_COSMOSDB_REQUEST_CONTENT_LENGTH, 'db.cosmosdb.request_content_length'). + + +%% Cosmos DB status code. +-define(DB_COSMOSDB_STATUS_CODE, 'db.cosmosdb.status_code'). + + +%% Cosmos DB sub status code. +-define(DB_COSMOSDB_SUB_STATUS_CODE, 'db.cosmosdb.sub_status_code'). + +%% @deprecated Replaced by `db.namespace`. +%% Deprecated, use `db.namespace` instead. +%% +-define(DB_ELASTICSEARCH_CLUSTER_NAME, 'db.elasticsearch.cluster.name'). + + +%% Represents the human-readable identifier of the node/instance to which a request was routed. +%% +-define(DB_ELASTICSEARCH_NODE_NAME, 'db.elasticsearch.node.name'). + + +%% A dynamic value in the url path. +%% +-define(DB_ELASTICSEARCH_PATH_PARTS, 'db.elasticsearch.path_parts'). + +%% @deprecated Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. +%% Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. +-define(DB_INSTANCE_ID, 'db.instance.id'). + +%% @deprecated Removed as not used. +%% Removed, no replacement at this time. +-define(DB_JDBC_DRIVER_CLASSNAME, 'db.jdbc.driver_classname'). + +%% @deprecated Replaced by `db.collection.name`. +%% Deprecated, use `db.collection.name` instead. +-define(DB_MONGODB_COLLECTION, 'db.mongodb.collection'). + +%% @deprecated Deprecated, no replacement at this time. +%% Deprecated, SQL Server instance is now populated as a part of `db.namespace` attribute. +-define(DB_MSSQL_INSTANCE_NAME, 'db.mssql.instance_name'). + +%% @deprecated Replaced by `db.namespace`. +%% Deprecated, use `db.namespace` instead. +-define(DB_NAME, 'db.name'). + + +%% The name of the database, fully qualified within the server address and port. +%% +-define(DB_NAMESPACE, 'db.namespace'). + +%% @deprecated Replaced by `db.operation.name`. +%% Deprecated, use `db.operation.name` instead. +-define(DB_OPERATION, 'db.operation'). + + +%% The number of queries included in a [batch operation](/docs/database/database-spans.md#batch-operations). +-define(DB_OPERATION_BATCH_SIZE, 'db.operation.batch.size'). + + +%% The name of the operation or command being executed. +%% +-define(DB_OPERATION_NAME, 'db.operation.name'). + + +%% A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. +%% +-define(DB_QUERY_PARAMETER, 'db.query.parameter'). + + +%% The database query being executed. +%% +-define(DB_QUERY_TEXT, 'db.query.text'). + +%% @deprecated Replaced by `db.namespace`. +%% Deprecated, use `db.namespace` instead. +-define(DB_REDIS_DATABASE_INDEX, 'db.redis.database_index'). + +%% @deprecated Replaced by `db.collection.name`. +%% Deprecated, use `db.collection.name` instead. +-define(DB_SQL_TABLE, 'db.sql.table'). + +%% @deprecated Replaced by `db.query.text`. +%% The database statement being executed. +-define(DB_STATEMENT, 'db.statement'). + + +%% The database management system (DBMS) product as identified by the client instrumentation. +-define(DB_SYSTEM, 'db.system'). + +-define(DB_SYSTEM_VALUES_OTHER_SQL, 'other_sql'). + +-define(DB_SYSTEM_VALUES_ADABAS, 'adabas'). + +-define(DB_SYSTEM_VALUES_CACHE, 'cache'). + +-define(DB_SYSTEM_VALUES_INTERSYSTEMS_CACHE, 'intersystems_cache'). + +-define(DB_SYSTEM_VALUES_CASSANDRA, 'cassandra'). + +-define(DB_SYSTEM_VALUES_CLICKHOUSE, 'clickhouse'). + +-define(DB_SYSTEM_VALUES_CLOUDSCAPE, 'cloudscape'). + +-define(DB_SYSTEM_VALUES_COCKROACHDB, 'cockroachdb'). + +-define(DB_SYSTEM_VALUES_COLDFUSION, 'coldfusion'). + +-define(DB_SYSTEM_VALUES_COSMOSDB, 'cosmosdb'). + +-define(DB_SYSTEM_VALUES_COUCHBASE, 'couchbase'). + +-define(DB_SYSTEM_VALUES_COUCHDB, 'couchdb'). + +-define(DB_SYSTEM_VALUES_DB2, 'db2'). + +-define(DB_SYSTEM_VALUES_DERBY, 'derby'). + +-define(DB_SYSTEM_VALUES_DYNAMODB, 'dynamodb'). + +-define(DB_SYSTEM_VALUES_EDB, 'edb'). + +-define(DB_SYSTEM_VALUES_ELASTICSEARCH, 'elasticsearch'). + +-define(DB_SYSTEM_VALUES_FILEMAKER, 'filemaker'). + +-define(DB_SYSTEM_VALUES_FIREBIRD, 'firebird'). + +-define(DB_SYSTEM_VALUES_FIRSTSQL, 'firstsql'). + +-define(DB_SYSTEM_VALUES_GEODE, 'geode'). + +-define(DB_SYSTEM_VALUES_H2, 'h2'). + +-define(DB_SYSTEM_VALUES_HANADB, 'hanadb'). + +-define(DB_SYSTEM_VALUES_HBASE, 'hbase'). + +-define(DB_SYSTEM_VALUES_HIVE, 'hive'). + +-define(DB_SYSTEM_VALUES_HSQLDB, 'hsqldb'). + +-define(DB_SYSTEM_VALUES_INFLUXDB, 'influxdb'). + +-define(DB_SYSTEM_VALUES_INFORMIX, 'informix'). + +-define(DB_SYSTEM_VALUES_INGRES, 'ingres'). + +-define(DB_SYSTEM_VALUES_INSTANTDB, 'instantdb'). + +-define(DB_SYSTEM_VALUES_INTERBASE, 'interbase'). + +-define(DB_SYSTEM_VALUES_MARIADB, 'mariadb'). + +-define(DB_SYSTEM_VALUES_MAXDB, 'maxdb'). + +-define(DB_SYSTEM_VALUES_MEMCACHED, 'memcached'). + +-define(DB_SYSTEM_VALUES_MONGODB, 'mongodb'). + +-define(DB_SYSTEM_VALUES_MSSQL, 'mssql'). + +-define(DB_SYSTEM_VALUES_MSSQLCOMPACT, 'mssqlcompact'). + +-define(DB_SYSTEM_VALUES_MYSQL, 'mysql'). + +-define(DB_SYSTEM_VALUES_NEO4J, 'neo4j'). + +-define(DB_SYSTEM_VALUES_NETEZZA, 'netezza'). + +-define(DB_SYSTEM_VALUES_OPENSEARCH, 'opensearch'). + +-define(DB_SYSTEM_VALUES_ORACLE, 'oracle'). + +-define(DB_SYSTEM_VALUES_PERVASIVE, 'pervasive'). + +-define(DB_SYSTEM_VALUES_POINTBASE, 'pointbase'). + +-define(DB_SYSTEM_VALUES_POSTGRESQL, 'postgresql'). + +-define(DB_SYSTEM_VALUES_PROGRESS, 'progress'). + +-define(DB_SYSTEM_VALUES_REDIS, 'redis'). + +-define(DB_SYSTEM_VALUES_REDSHIFT, 'redshift'). + +-define(DB_SYSTEM_VALUES_SPANNER, 'spanner'). + +-define(DB_SYSTEM_VALUES_SQLITE, 'sqlite'). + +-define(DB_SYSTEM_VALUES_SYBASE, 'sybase'). + +-define(DB_SYSTEM_VALUES_TERADATA, 'teradata'). + +-define(DB_SYSTEM_VALUES_TRINO, 'trino'). + +-define(DB_SYSTEM_VALUES_VERTICA, 'vertica'). + + +%% @deprecated No replacement at this time. +%% Deprecated, no replacement at this time. +-define(DB_USER, 'db.user'). + +%% @deprecated Replaced by `db.client.connection.pool.name`. +%% Deprecated, use `db.client.connection.pool.name` instead. +-define(POOL_NAME, 'pool.name'). + +%% @deprecated Replaced by `db.client.connection.state`. +%% Deprecated, use `db.client.connection.state` instead. +-define(STATE, 'state'). + +-define(STATE_VALUES_IDLE, 'idle'). + +-define(STATE_VALUES_USED, 'used'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl new file mode 100644 index 00000000..6c72d077 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl @@ -0,0 +1,44 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +%% @deprecated Deprecated, use `deployment.environment.name` instead. +%% 'Deprecated, use `deployment.environment.name` instead.' +%% +-define(DEPLOYMENT_ENVIRONMENT, 'deployment.environment'). + + +%% Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). +%% +-define(DEPLOYMENT_ENVIRONMENT_NAME, 'deployment.environment.name'). + + +%% The id of the deployment. +%% +-define(DEPLOYMENT_ID, 'deployment.id'). + + +%% The name of the deployment. +%% +-define(DEPLOYMENT_NAME, 'deployment.name'). + + +%% The status of the deployment. +%% +-define(DEPLOYMENT_STATUS, 'deployment.status'). + +-define(DEPLOYMENT_STATUS_VALUES_FAILED, 'failed'). + +-define(DEPLOYMENT_STATUS_VALUES_SUCCEEDED, 'succeeded'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/destination_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/destination_attributes.hrl new file mode 100644 index 00000000..3239960a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/destination_attributes.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +-define(DESTINATION_ADDRESS, 'destination.address'). + + +%% Destination port number +-define(DESTINATION_PORT, 'destination.port'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/device_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/device_attributes.hrl new file mode 100644 index 00000000..8b75ec21 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/device_attributes.hrl @@ -0,0 +1,34 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% A unique identifier representing the device +%% +-define(DEVICE_ID, 'device.id'). + + +%% The name of the device manufacturer +%% +-define(DEVICE_MANUFACTURER, 'device.manufacturer'). + + +%% The model identifier for the device +%% +-define(DEVICE_MODEL_IDENTIFIER, 'device.model.identifier'). + + +%% The marketing name for the device model +%% +-define(DEVICE_MODEL_NAME, 'device.model.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/disk_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/disk_attributes.hrl new file mode 100644 index 00000000..7d6d8d96 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/disk_attributes.hrl @@ -0,0 +1,23 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The disk IO operation direction. +-define(DISK_IO_DIRECTION, 'disk.io.direction'). + +-define(DISK_IO_DIRECTION_VALUES_READ, 'read'). + +-define(DISK_IO_DIRECTION_VALUES_WRITE, 'write'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl new file mode 100644 index 00000000..b5399045 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl @@ -0,0 +1,18 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The name being queried. +-define(DNS_QUESTION_NAME, 'dns.question.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl new file mode 100644 index 00000000..82a015db --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl @@ -0,0 +1,26 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +%% @deprecated Replaced by `user.id` attribute. +%% Deprecated, use `user.id` instead. +-define(ENDUSER_ID, 'enduser.id'). + +%% @deprecated Replaced by `user.roles` attribute. +%% Deprecated, use `user.roles` instead. +-define(ENDUSER_ROLE, 'enduser.role'). + +%% @deprecated Removed. +%% Deprecated, no replacement at this time. +-define(ENDUSER_SCOPE, 'enduser.scope'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/event_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/event_attributes.hrl new file mode 100644 index 00000000..58b4dbd1 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/event_attributes.hrl @@ -0,0 +1,19 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Identifies the class / type of event. +%% +-define(EVENT_NAME, 'event.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/faas_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/faas_attributes.hrl new file mode 100644 index 00000000..ab95f158 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/faas_attributes.hrl @@ -0,0 +1,121 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% A boolean that is true if the serverless function is executed for the first time (aka cold-start). +%% +-define(FAAS_COLDSTART, 'faas.coldstart'). + + +%% A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). +%% +-define(FAAS_CRON, 'faas.cron'). + + +%% The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. +%% +-define(FAAS_DOCUMENT_COLLECTION, 'faas.document.collection'). + + +%% The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. +%% +-define(FAAS_DOCUMENT_NAME, 'faas.document.name'). + + +%% Describes the type of the operation that was performed on the data. +-define(FAAS_DOCUMENT_OPERATION, 'faas.document.operation'). + +-define(FAAS_DOCUMENT_OPERATION_VALUES_INSERT, 'insert'). + +-define(FAAS_DOCUMENT_OPERATION_VALUES_EDIT, 'edit'). + +-define(FAAS_DOCUMENT_OPERATION_VALUES_DELETE, 'delete'). + + + +%% A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +%% +-define(FAAS_DOCUMENT_TIME, 'faas.document.time'). + + +%% The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. +%% +-define(FAAS_INSTANCE, 'faas.instance'). + + +%% The invocation ID of the current function invocation. +%% +-define(FAAS_INVOCATION_ID, 'faas.invocation_id'). + + +%% The name of the invoked function. +%% +-define(FAAS_INVOKED_NAME, 'faas.invoked_name'). + + +%% The cloud provider of the invoked function. +%% +-define(FAAS_INVOKED_PROVIDER, 'faas.invoked_provider'). + +-define(FAAS_INVOKED_PROVIDER_VALUES_ALIBABA_CLOUD, 'alibaba_cloud'). + +-define(FAAS_INVOKED_PROVIDER_VALUES_AWS, 'aws'). + +-define(FAAS_INVOKED_PROVIDER_VALUES_AZURE, 'azure'). + +-define(FAAS_INVOKED_PROVIDER_VALUES_GCP, 'gcp'). + +-define(FAAS_INVOKED_PROVIDER_VALUES_TENCENT_CLOUD, 'tencent_cloud'). + + + +%% The cloud region of the invoked function. +%% +-define(FAAS_INVOKED_REGION, 'faas.invoked_region'). + + +%% The amount of memory available to the serverless function converted to Bytes. +%% +-define(FAAS_MAX_MEMORY, 'faas.max_memory'). + + +%% The name of the single function that this runtime instance executes. +%% +-define(FAAS_NAME, 'faas.name'). + + +%% A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +%% +-define(FAAS_TIME, 'faas.time'). + + +%% Type of the trigger which caused this function invocation. +%% +-define(FAAS_TRIGGER, 'faas.trigger'). + +-define(FAAS_TRIGGER_VALUES_DATASOURCE, 'datasource'). + +-define(FAAS_TRIGGER_VALUES_HTTP, 'http'). + +-define(FAAS_TRIGGER_VALUES_PUBSUB, 'pubsub'). + +-define(FAAS_TRIGGER_VALUES_TIMER, 'timer'). + +-define(FAAS_TRIGGER_VALUES_OTHER, 'other'). + + + +%% The immutable version of the function being executed. +-define(FAAS_VERSION, 'faas.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/feature_flag_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/feature_flag_attributes.hrl new file mode 100644 index 00000000..5b59e448 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/feature_flag_attributes.hrl @@ -0,0 +1,27 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The unique identifier of the feature flag. +-define(FEATURE_FLAG_KEY, 'feature_flag.key'). + + +%% The name of the service provider that performs the flag evaluation. +-define(FEATURE_FLAG_PROVIDER_NAME, 'feature_flag.provider_name'). + + +%% SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. +%% +-define(FEATURE_FLAG_VARIANT, 'feature_flag.variant'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl new file mode 100644 index 00000000..0ea28994 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl @@ -0,0 +1,39 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Directory where the file is located. It should include the drive letter, when appropriate. +%% +-define(FILE_DIRECTORY, 'file.directory'). + + +%% File extension, excluding the leading dot. +%% +-define(FILE_EXTENSION, 'file.extension'). + + +%% Name of the file including the extension, without the directory. +%% +-define(FILE_NAME, 'file.name'). + + +%% Full path to the file, including the file name. It should include the drive letter, when appropriate. +%% +-define(FILE_PATH, 'file.path'). + + +%% File size in bytes. +%% +-define(FILE_SIZE, 'file.size'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl new file mode 100644 index 00000000..e361f859 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl @@ -0,0 +1,38 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Identifies the Google Cloud service for which the official client library is intended. +-define(GCP_CLIENT_SERVICE, 'gcp.client.service'). + + +%% The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. +%% +-define(GCP_CLOUD_RUN_JOB_EXECUTION, 'gcp.cloud_run.job.execution'). + + +%% The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. +%% +-define(GCP_CLOUD_RUN_JOB_TASK_INDEX, 'gcp.cloud_run.job.task_index'). + + +%% The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). +%% +-define(GCP_GCE_INSTANCE_HOSTNAME, 'gcp.gce.instance.hostname'). + + +%% The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). +%% +-define(GCP_GCE_INSTANCE_NAME, 'gcp.gce.instance.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gen_ai_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gen_ai_attributes.hrl new file mode 100644 index 00000000..08e4ac33 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gen_ai_attributes.hrl @@ -0,0 +1,113 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The full response received from the GenAI model. +-define(GEN_AI_COMPLETION, 'gen_ai.completion'). + + +%% The name of the operation being performed. +-define(GEN_AI_OPERATION_NAME, 'gen_ai.operation.name'). + +-define(GEN_AI_OPERATION_NAME_VALUES_CHAT, 'chat'). + +-define(GEN_AI_OPERATION_NAME_VALUES_TEXT_COMPLETION, 'text_completion'). + + + +%% The full prompt sent to the GenAI model. +-define(GEN_AI_PROMPT, 'gen_ai.prompt'). + + +%% The frequency penalty setting for the GenAI request. +-define(GEN_AI_REQUEST_FREQUENCY_PENALTY, 'gen_ai.request.frequency_penalty'). + + +%% The maximum number of tokens the model generates for a request. +-define(GEN_AI_REQUEST_MAX_TOKENS, 'gen_ai.request.max_tokens'). + + +%% The name of the GenAI model a request is being made to. +-define(GEN_AI_REQUEST_MODEL, 'gen_ai.request.model'). + + +%% The presence penalty setting for the GenAI request. +-define(GEN_AI_REQUEST_PRESENCE_PENALTY, 'gen_ai.request.presence_penalty'). + + +%% List of sequences that the model will use to stop generating further tokens. +-define(GEN_AI_REQUEST_STOP_SEQUENCES, 'gen_ai.request.stop_sequences'). + + +%% The temperature setting for the GenAI request. +-define(GEN_AI_REQUEST_TEMPERATURE, 'gen_ai.request.temperature'). + + +%% The top_k sampling setting for the GenAI request. +-define(GEN_AI_REQUEST_TOP_K, 'gen_ai.request.top_k'). + + +%% The top_p sampling setting for the GenAI request. +-define(GEN_AI_REQUEST_TOP_P, 'gen_ai.request.top_p'). + + +%% Array of reasons the model stopped generating tokens, corresponding to each generation received. +-define(GEN_AI_RESPONSE_FINISH_REASONS, 'gen_ai.response.finish_reasons'). + + +%% The unique identifier for the completion. +-define(GEN_AI_RESPONSE_ID, 'gen_ai.response.id'). + + +%% The name of the model that generated the response. +-define(GEN_AI_RESPONSE_MODEL, 'gen_ai.response.model'). + + +%% The Generative AI product as identified by the client or server instrumentation. +-define(GEN_AI_SYSTEM, 'gen_ai.system'). + +-define(GEN_AI_SYSTEM_VALUES_OPENAI, 'openai'). + +-define(GEN_AI_SYSTEM_VALUES_VERTEX_AI, 'vertex_ai'). + +-define(GEN_AI_SYSTEM_VALUES_ANTHROPIC, 'anthropic'). + +-define(GEN_AI_SYSTEM_VALUES_COHERE, 'cohere'). + + + +%% The type of token being counted. +-define(GEN_AI_TOKEN_TYPE, 'gen_ai.token.type'). + +-define(GEN_AI_TOKEN_TYPE_VALUES_INPUT, 'input'). + +-define(GEN_AI_TOKEN_TYPE_VALUES_COMPLETION, 'output'). + + +%% @deprecated Replaced by `gen_ai.usage.output_tokens` attribute. +%% Deprecated, use `gen_ai.usage.output_tokens` instead. +-define(GEN_AI_USAGE_COMPLETION_TOKENS, 'gen_ai.usage.completion_tokens'). + + +%% The number of tokens used in the GenAI input (prompt). +-define(GEN_AI_USAGE_INPUT_TOKENS, 'gen_ai.usage.input_tokens'). + + +%% The number of tokens used in the GenAI response (completion). +-define(GEN_AI_USAGE_OUTPUT_TOKENS, 'gen_ai.usage.output_tokens'). + +%% @deprecated Replaced by `gen_ai.usage.input_tokens` attribute. +%% Deprecated, use `gen_ai.usage.input_tokens` instead. +-define(GEN_AI_USAGE_PROMPT_TOKENS, 'gen_ai.usage.prompt_tokens'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/graphql_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/graphql_attributes.hrl new file mode 100644 index 00000000..18b58ba4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/graphql_attributes.hrl @@ -0,0 +1,33 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The GraphQL document being executed. +-define(GRAPHQL_DOCUMENT, 'graphql.document'). + + +%% The name of the operation being executed. +-define(GRAPHQL_OPERATION_NAME, 'graphql.operation.name'). + + +%% The type of the operation being executed. +-define(GRAPHQL_OPERATION_TYPE, 'graphql.operation.type'). + +-define(GRAPHQL_OPERATION_TYPE_VALUES_QUERY, 'query'). + +-define(GRAPHQL_OPERATION_TYPE_VALUES_MUTATION, 'mutation'). + +-define(GRAPHQL_OPERATION_TYPE_VALUES_SUBSCRIPTION, 'subscription'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/heroku_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/heroku_attributes.hrl new file mode 100644 index 00000000..96595577 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/heroku_attributes.hrl @@ -0,0 +1,29 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Unique identifier for the application +%% +-define(HEROKU_APP_ID, 'heroku.app.id'). + + +%% Commit hash for the current release +%% +-define(HEROKU_RELEASE_COMMIT, 'heroku.release.commit'). + + +%% Time and date the release was created +%% +-define(HEROKU_RELEASE_CREATION_TIMESTAMP, 'heroku.release.creation_timestamp'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/host_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/host_attributes.hrl new file mode 100644 index 00000000..0a1e9e1c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/host_attributes.hrl @@ -0,0 +1,106 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The CPU architecture the host system is running on. +%% +-define(HOST_ARCH, 'host.arch'). + +-define(HOST_ARCH_VALUES_AMD64, 'amd64'). + +-define(HOST_ARCH_VALUES_ARM32, 'arm32'). + +-define(HOST_ARCH_VALUES_ARM64, 'arm64'). + +-define(HOST_ARCH_VALUES_IA64, 'ia64'). + +-define(HOST_ARCH_VALUES_PPC32, 'ppc32'). + +-define(HOST_ARCH_VALUES_PPC64, 'ppc64'). + +-define(HOST_ARCH_VALUES_S390X, 's390x'). + +-define(HOST_ARCH_VALUES_X86, 'x86'). + + + +%% The amount of level 2 memory cache available to the processor (in Bytes). +%% +-define(HOST_CPU_CACHE_L2_SIZE, 'host.cpu.cache.l2.size'). + + +%% Family or generation of the CPU. +%% +-define(HOST_CPU_FAMILY, 'host.cpu.family'). + + +%% Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. +%% +-define(HOST_CPU_MODEL_ID, 'host.cpu.model.id'). + + +%% Model designation of the processor. +%% +-define(HOST_CPU_MODEL_NAME, 'host.cpu.model.name'). + + +%% Stepping or core revisions. +%% +-define(HOST_CPU_STEPPING, 'host.cpu.stepping'). + + +%% Processor manufacturer identifier. A maximum 12-character string. +%% +-define(HOST_CPU_VENDOR_ID, 'host.cpu.vendor.id'). + + +%% Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. +%% +-define(HOST_ID, 'host.id'). + + +%% VM image ID or host OS image ID. For Cloud, this value is from the provider. +%% +-define(HOST_IMAGE_ID, 'host.image.id'). + + +%% Name of the VM image or OS install the host was instantiated from. +%% +-define(HOST_IMAGE_NAME, 'host.image.name'). + + +%% The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +%% +-define(HOST_IMAGE_VERSION, 'host.image.version'). + + +%% Available IP addresses of the host, excluding loopback interfaces. +%% +-define(HOST_IP, 'host.ip'). + + +%% Available MAC addresses of the host, excluding loopback interfaces. +%% +-define(HOST_MAC, 'host.mac'). + + +%% Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. +%% +-define(HOST_NAME, 'host.name'). + + +%% Type of host. For Cloud, this must be the machine type. +%% +-define(HOST_TYPE, 'host.type'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl new file mode 100644 index 00000000..cf098bbb --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl @@ -0,0 +1,114 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/http_attributes.hrl"). + +%% @deprecated Replaced by `client.address`. +%% Deprecated, use `client.address` instead. +-define(HTTP_CLIENT_IP, 'http.client_ip'). + + +%% State of the HTTP connection in the HTTP connection pool. +-define(HTTP_CONNECTION_STATE, 'http.connection.state'). + +-define(HTTP_CONNECTION_STATE_VALUES_ACTIVE, 'active'). + +-define(HTTP_CONNECTION_STATE_VALUES_IDLE, 'idle'). + + +%% @deprecated Replaced by `network.protocol.name`. +%% Deprecated, use `network.protocol.name` instead. +-define(HTTP_FLAVOR, 'http.flavor'). + +-define(HTTP_FLAVOR_VALUES_HTTP_1_0, '1.0'). + +-define(HTTP_FLAVOR_VALUES_HTTP_1_1, '1.1'). + +-define(HTTP_FLAVOR_VALUES_HTTP_2_0, '2.0'). + +-define(HTTP_FLAVOR_VALUES_HTTP_3_0, '3.0'). + +-define(HTTP_FLAVOR_VALUES_SPDY, 'SPDY'). + +-define(HTTP_FLAVOR_VALUES_QUIC, 'QUIC'). + + +%% @deprecated Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage. +%% Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage. +-define(HTTP_HOST, 'http.host'). + +%% @deprecated Replaced by `http.request.method`. +%% Deprecated, use `http.request.method` instead. +-define(HTTP_METHOD, 'http.method'). + + +%% The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. +%% +-define(HTTP_REQUEST_BODY_SIZE, 'http.request.body.size'). + + +%% The total size of the request in bytes. This should be the total number of bytes sent over the wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request body if any. +%% +-define(HTTP_REQUEST_SIZE, 'http.request.size'). + +%% @deprecated Replaced by `http.request.header.content-length`. +%% Deprecated, use `http.request.header.content-length` instead. +-define(HTTP_REQUEST_CONTENT_LENGTH, 'http.request_content_length'). + +%% @deprecated Replaced by `http.request.body.size`. +%% Deprecated, use `http.request.body.size` instead. +-define(HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED, 'http.request_content_length_uncompressed'). + + +%% The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. +%% +-define(HTTP_RESPONSE_BODY_SIZE, 'http.response.body.size'). + + +%% The total size of the response in bytes. This should be the total number of bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and response body and trailers if any. +%% +-define(HTTP_RESPONSE_SIZE, 'http.response.size'). + +%% @deprecated Replaced by `http.response.header.content-length`. +%% Deprecated, use `http.response.header.content-length` instead. +-define(HTTP_RESPONSE_CONTENT_LENGTH, 'http.response_content_length'). + +%% @deprecated Replace by `http.response.body.size`. +%% Deprecated, use `http.response.body.size` instead. +-define(HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, 'http.response_content_length_uncompressed'). + +%% @deprecated Replaced by `url.scheme` instead. +%% Deprecated, use `url.scheme` instead. +-define(HTTP_SCHEME, 'http.scheme'). + +%% @deprecated Replaced by `server.address`. +%% Deprecated, use `server.address` instead. +-define(HTTP_SERVER_NAME, 'http.server_name'). + +%% @deprecated Replaced by `http.response.status_code`. +%% Deprecated, use `http.response.status_code` instead. +-define(HTTP_STATUS_CODE, 'http.status_code'). + +%% @deprecated Split to `url.path` and `url.query. +%% Deprecated, use `url.path` and `url.query` instead. +-define(HTTP_TARGET, 'http.target'). + +%% @deprecated Replaced by `url.full`. +%% Deprecated, use `url.full` instead. +-define(HTTP_URL, 'http.url'). + +%% @deprecated Replaced by `user_agent.original`. +%% Deprecated, use `user_agent.original` instead. +-define(HTTP_USER_AGENT, 'http.user_agent'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl new file mode 100644 index 00000000..61ccc98d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl @@ -0,0 +1,138 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The name of the cluster. +%% +-define(K8S_CLUSTER_NAME, 'k8s.cluster.name'). + + +%% A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. +%% +-define(K8S_CLUSTER_UID, 'k8s.cluster.uid'). + + +%% The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). +%% +-define(K8S_CONTAINER_NAME, 'k8s.container.name'). + + +%% Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. +%% +-define(K8S_CONTAINER_RESTART_COUNT, 'k8s.container.restart_count'). + + +%% Last terminated reason of the Container. +%% +-define(K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON, 'k8s.container.status.last_terminated_reason'). + + +%% The name of the CronJob. +%% +-define(K8S_CRONJOB_NAME, 'k8s.cronjob.name'). + + +%% The UID of the CronJob. +%% +-define(K8S_CRONJOB_UID, 'k8s.cronjob.uid'). + + +%% The name of the DaemonSet. +%% +-define(K8S_DAEMONSET_NAME, 'k8s.daemonset.name'). + + +%% The UID of the DaemonSet. +%% +-define(K8S_DAEMONSET_UID, 'k8s.daemonset.uid'). + + +%% The name of the Deployment. +%% +-define(K8S_DEPLOYMENT_NAME, 'k8s.deployment.name'). + + +%% The UID of the Deployment. +%% +-define(K8S_DEPLOYMENT_UID, 'k8s.deployment.uid'). + + +%% The name of the Job. +%% +-define(K8S_JOB_NAME, 'k8s.job.name'). + + +%% The UID of the Job. +%% +-define(K8S_JOB_UID, 'k8s.job.uid'). + + +%% The name of the namespace that the pod is running in. +%% +-define(K8S_NAMESPACE_NAME, 'k8s.namespace.name'). + + +%% The name of the Node. +%% +-define(K8S_NODE_NAME, 'k8s.node.name'). + + +%% The UID of the Node. +%% +-define(K8S_NODE_UID, 'k8s.node.uid'). + + +%% The annotation key-value pairs placed on the Pod, the `` being the annotation name, the value being the annotation value. +%% +-define(K8S_POD_ANNOTATION, 'k8s.pod.annotation'). + + +%% The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. +%% +-define(K8S_POD_LABEL, 'k8s.pod.label'). + +%% @deprecated Replaced by `k8s.pod.label`. +%% Deprecated, use `k8s.pod.label` instead. +-define(K8S_POD_LABELS, 'k8s.pod.labels'). + + +%% The name of the Pod. +%% +-define(K8S_POD_NAME, 'k8s.pod.name'). + + +%% The UID of the Pod. +%% +-define(K8S_POD_UID, 'k8s.pod.uid'). + + +%% The name of the ReplicaSet. +%% +-define(K8S_REPLICASET_NAME, 'k8s.replicaset.name'). + + +%% The UID of the ReplicaSet. +%% +-define(K8S_REPLICASET_UID, 'k8s.replicaset.uid'). + + +%% The name of the StatefulSet. +%% +-define(K8S_STATEFULSET_NAME, 'k8s.statefulset.name'). + + +%% The UID of the StatefulSet. +%% +-define(K8S_STATEFULSET_UID, 'k8s.statefulset.uid'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl new file mode 100644 index 00000000..ca82508e --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl @@ -0,0 +1,23 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The Linux Slab memory state +-define(LINUX_MEMORY_SLAB_STATE, 'linux.memory.slab.state'). + +-define(LINUX_MEMORY_SLAB_STATE_VALUES_RECLAIMABLE, 'reclaimable'). + +-define(LINUX_MEMORY_SLAB_STATE_VALUES_UNRECLAIMABLE, 'unreclaimable'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl new file mode 100644 index 00000000..770f3718 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl @@ -0,0 +1,54 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The basename of the file. +%% +-define(LOG_FILE_NAME, 'log.file.name'). + + +%% The basename of the file, with symlinks resolved. +%% +-define(LOG_FILE_NAME_RESOLVED, 'log.file.name_resolved'). + + +%% The full path to the file. +%% +-define(LOG_FILE_PATH, 'log.file.path'). + + +%% The full path to the file, with symlinks resolved. +%% +-define(LOG_FILE_PATH_RESOLVED, 'log.file.path_resolved'). + + +%% The stream associated with the log. See below for a list of well-known values. +%% +-define(LOG_IOSTREAM, 'log.iostream'). + +-define(LOG_IOSTREAM_VALUES_STDOUT, 'stdout'). + +-define(LOG_IOSTREAM_VALUES_STDERR, 'stderr'). + + + +%% The complete orignal Log Record. +%% +-define(LOG_RECORD_ORIGINAL, 'log.record.original'). + + +%% A unique identifier for the Log Record. +%% +-define(LOG_RECORD_UID, 'log.record.uid'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl new file mode 100644 index 00000000..0fec8ffc --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl @@ -0,0 +1,299 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/messaging_attributes.hrl"). + + +%% The number of messages sent, received, or processed in the scope of the batching operation. +-define(MESSAGING_BATCH_MESSAGE_COUNT, 'messaging.batch.message_count'). + + +%% A unique identifier for the client that consumes or produces a message. +%% +-define(MESSAGING_CLIENT_ID, 'messaging.client.id'). + + +%% The name of the consumer group with which a consumer is associated. +%% +-define(MESSAGING_CONSUMER_GROUP_NAME, 'messaging.consumer.group.name'). + + +%% A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). +-define(MESSAGING_DESTINATION_ANONYMOUS, 'messaging.destination.anonymous'). + + +%% The message destination name +-define(MESSAGING_DESTINATION_NAME, 'messaging.destination.name'). + + +%% The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. +%% +-define(MESSAGING_DESTINATION_PARTITION_ID, 'messaging.destination.partition.id'). + + +%% The name of the destination subscription from which a message is consumed. +-define(MESSAGING_DESTINATION_SUBSCRIPTION_NAME, 'messaging.destination.subscription.name'). + + +%% Low cardinality representation of the messaging destination name +-define(MESSAGING_DESTINATION_TEMPLATE, 'messaging.destination.template'). + + +%% A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. +-define(MESSAGING_DESTINATION_TEMPORARY, 'messaging.destination.temporary'). + +%% @deprecated No replacement at this time. +%% Deprecated, no replacement at this time. +-define(MESSAGING_DESTINATION_PUBLISH_ANONYMOUS, 'messaging.destination_publish.anonymous'). + +%% @deprecated No replacement at this time. +%% Deprecated, no replacement at this time. +-define(MESSAGING_DESTINATION_PUBLISH_NAME, 'messaging.destination_publish.name'). + +%% @deprecated Replaced by `messaging.consumer.group.name`. +%% +%% Deprecated, use `messaging.consumer.group.name` instead. +%% +-define(MESSAGING_EVENTHUBS_CONSUMER_GROUP, 'messaging.eventhubs.consumer.group'). + + +%% The UTC epoch seconds at which the message has been accepted and stored in the entity. +%% +-define(MESSAGING_EVENTHUBS_MESSAGE_ENQUEUED_TIME, 'messaging.eventhubs.message.enqueued_time'). + + +%% The ack deadline in seconds set for the modify ack deadline request. +%% +-define(MESSAGING_GCP_PUBSUB_MESSAGE_ACK_DEADLINE, 'messaging.gcp_pubsub.message.ack_deadline'). + + +%% The ack id for a given message. +%% +-define(MESSAGING_GCP_PUBSUB_MESSAGE_ACK_ID, 'messaging.gcp_pubsub.message.ack_id'). + + +%% The delivery attempt for a given message. +%% +-define(MESSAGING_GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT, 'messaging.gcp_pubsub.message.delivery_attempt'). + + +%% The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. +%% +-define(MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY, 'messaging.gcp_pubsub.message.ordering_key'). + +%% @deprecated Replaced by `messaging.consumer.group.name`. +%% +%% Deprecated, use `messaging.consumer.group.name` instead. +%% +-define(MESSAGING_KAFKA_CONSUMER_GROUP, 'messaging.kafka.consumer.group'). + +%% @deprecated Replaced by `messaging.destination.partition.id`. +%% Deprecated, use `messaging.destination.partition.id` instead. +%% +-define(MESSAGING_KAFKA_DESTINATION_PARTITION, 'messaging.kafka.destination.partition'). + + +%% Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. +%% +-define(MESSAGING_KAFKA_MESSAGE_KEY, 'messaging.kafka.message.key'). + +%% @deprecated Replaced by `messaging.kafka.offset`. +%% +%% Deprecated, use `messaging.kafka.offset` instead. +%% +-define(MESSAGING_KAFKA_MESSAGE_OFFSET, 'messaging.kafka.message.offset'). + + +%% A boolean that is true if the message is a tombstone. +-define(MESSAGING_KAFKA_MESSAGE_TOMBSTONE, 'messaging.kafka.message.tombstone'). + + +%% The offset of a record in the corresponding Kafka partition. +%% +-define(MESSAGING_KAFKA_OFFSET, 'messaging.kafka.offset'). + + +%% The size of the message body in bytes. +%% +-define(MESSAGING_MESSAGE_BODY_SIZE, 'messaging.message.body.size'). + + +%% The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". +%% +-define(MESSAGING_MESSAGE_CONVERSATION_ID, 'messaging.message.conversation_id'). + + +%% The size of the message body and metadata in bytes. +%% +-define(MESSAGING_MESSAGE_ENVELOPE_SIZE, 'messaging.message.envelope.size'). + + +%% A value used by the messaging system as an identifier for the message, represented as a string. +-define(MESSAGING_MESSAGE_ID, 'messaging.message.id'). + +%% @deprecated Replaced by `messaging.operation.type`. +%% Deprecated, use `messaging.operation.type` instead. +%% +-define(MESSAGING_OPERATION, 'messaging.operation'). + + +%% The system-specific name of the messaging operation. +%% +-define(MESSAGING_OPERATION_NAME, 'messaging.operation.name'). + + +%% A string identifying the type of the messaging operation. +%% +-define(MESSAGING_OPERATION_TYPE, 'messaging.operation.type'). + +-define(MESSAGING_OPERATION_TYPE_VALUES_PUBLISH, 'publish'). + +-define(MESSAGING_OPERATION_TYPE_VALUES_CREATE, 'create'). + +-define(MESSAGING_OPERATION_TYPE_VALUES_RECEIVE, 'receive'). + +-define(MESSAGING_OPERATION_TYPE_VALUES_PROCESS, 'process'). + +-define(MESSAGING_OPERATION_TYPE_VALUES_SETTLE, 'settle'). + +-define(MESSAGING_OPERATION_TYPE_VALUES_DELIVER, 'deliver'). + + + +%% RabbitMQ message routing key. +%% +-define(MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY, 'messaging.rabbitmq.destination.routing_key'). + + +%% RabbitMQ message delivery tag +%% +-define(MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG, 'messaging.rabbitmq.message.delivery_tag'). + +%% @deprecated Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. +%% +%% Deprecated, use `messaging.consumer.group.name` instead. +%% +-define(MESSAGING_ROCKETMQ_CLIENT_GROUP, 'messaging.rocketmq.client_group'). + + +%% Model of message consumption. This only applies to consumer spans. +%% +-define(MESSAGING_ROCKETMQ_CONSUMPTION_MODEL, 'messaging.rocketmq.consumption_model'). + +-define(MESSAGING_ROCKETMQ_CONSUMPTION_MODEL_VALUES_CLUSTERING, 'clustering'). + +-define(MESSAGING_ROCKETMQ_CONSUMPTION_MODEL_VALUES_BROADCASTING, 'broadcasting'). + + + +%% The delay time level for delay message, which determines the message delay time. +%% +-define(MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL, 'messaging.rocketmq.message.delay_time_level'). + + +%% The timestamp in milliseconds that the delay message is expected to be delivered to consumer. +%% +-define(MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP, 'messaging.rocketmq.message.delivery_timestamp'). + + +%% It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. +%% +-define(MESSAGING_ROCKETMQ_MESSAGE_GROUP, 'messaging.rocketmq.message.group'). + + +%% Key(s) of message, another way to mark message besides message id. +%% +-define(MESSAGING_ROCKETMQ_MESSAGE_KEYS, 'messaging.rocketmq.message.keys'). + + +%% The secondary classifier of message besides topic. +%% +-define(MESSAGING_ROCKETMQ_MESSAGE_TAG, 'messaging.rocketmq.message.tag'). + + +%% Type of message. +%% +-define(MESSAGING_ROCKETMQ_MESSAGE_TYPE, 'messaging.rocketmq.message.type'). + +-define(MESSAGING_ROCKETMQ_MESSAGE_TYPE_VALUES_NORMAL, 'normal'). + +-define(MESSAGING_ROCKETMQ_MESSAGE_TYPE_VALUES_FIFO, 'fifo'). + +-define(MESSAGING_ROCKETMQ_MESSAGE_TYPE_VALUES_DELAY, 'delay'). + +-define(MESSAGING_ROCKETMQ_MESSAGE_TYPE_VALUES_TRANSACTION, 'transaction'). + + + +%% Namespace of RocketMQ resources, resources in different namespaces are individual. +%% +-define(MESSAGING_ROCKETMQ_NAMESPACE, 'messaging.rocketmq.namespace'). + +%% @deprecated Replaced by `messaging.servicebus.destination.subscription_name`. +%% +%% Deprecated, use `messaging.servicebus.destination.subscription_name` instead. +%% +-define(MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME, 'messaging.servicebus.destination.subscription_name'). + + +%% Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). +%% +-define(MESSAGING_SERVICEBUS_DISPOSITION_STATUS, 'messaging.servicebus.disposition_status'). + +-define(MESSAGING_SERVICEBUS_DISPOSITION_STATUS_VALUES_COMPLETE, 'complete'). + +-define(MESSAGING_SERVICEBUS_DISPOSITION_STATUS_VALUES_ABANDON, 'abandon'). + +-define(MESSAGING_SERVICEBUS_DISPOSITION_STATUS_VALUES_DEAD_LETTER, 'dead_letter'). + +-define(MESSAGING_SERVICEBUS_DISPOSITION_STATUS_VALUES_DEFER, 'defer'). + + + +%% Number of deliveries that have been attempted for this message. +%% +-define(MESSAGING_SERVICEBUS_MESSAGE_DELIVERY_COUNT, 'messaging.servicebus.message.delivery_count'). + + +%% The UTC epoch seconds at which the message has been accepted and stored in the entity. +%% +-define(MESSAGING_SERVICEBUS_MESSAGE_ENQUEUED_TIME, 'messaging.servicebus.message.enqueued_time'). + + +%% The messaging system as identified by the client instrumentation. +-define(MESSAGING_SYSTEM, 'messaging.system'). + +-define(MESSAGING_SYSTEM_VALUES_ACTIVEMQ, 'activemq'). + +-define(MESSAGING_SYSTEM_VALUES_AWS_SQS, 'aws_sqs'). + +-define(MESSAGING_SYSTEM_VALUES_EVENTGRID, 'eventgrid'). + +-define(MESSAGING_SYSTEM_VALUES_EVENTHUBS, 'eventhubs'). + +-define(MESSAGING_SYSTEM_VALUES_SERVICEBUS, 'servicebus'). + +-define(MESSAGING_SYSTEM_VALUES_GCP_PUBSUB, 'gcp_pubsub'). + +-define(MESSAGING_SYSTEM_VALUES_JMS, 'jms'). + +-define(MESSAGING_SYSTEM_VALUES_KAFKA, 'kafka'). + +-define(MESSAGING_SYSTEM_VALUES_RABBITMQ, 'rabbitmq'). + +-define(MESSAGING_SYSTEM_VALUES_ROCKETMQ, 'rocketmq'). + +-define(MESSAGING_SYSTEM_VALUES_PULSAR, 'pulsar'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl new file mode 100644 index 00000000..01a700e4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl @@ -0,0 +1,181 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl"). + +%% @deprecated Replaced by `network.local.address`. +%% Deprecated, use `network.local.address`. +-define(NET_HOST_IP, 'net.host.ip'). + +%% @deprecated Replaced by `server.address`. +%% Deprecated, use `server.address`. +-define(NET_HOST_NAME, 'net.host.name'). + +%% @deprecated Replaced by `server.port`. +%% Deprecated, use `server.port`. +-define(NET_HOST_PORT, 'net.host.port'). + +%% @deprecated Replaced by `network.peer.address`. +%% Deprecated, use `network.peer.address`. +-define(NET_PEER_IP, 'net.peer.ip'). + +%% @deprecated Replaced by `server.address` on client spans and `client.address` on server spans. +%% Deprecated, use `server.address` on client spans and `client.address` on server spans. +-define(NET_PEER_NAME, 'net.peer.name'). + +%% @deprecated Replaced by `server.port` on client spans and `client.port` on server spans. +%% Deprecated, use `server.port` on client spans and `client.port` on server spans. +-define(NET_PEER_PORT, 'net.peer.port'). + +%% @deprecated Replaced by `network.protocol.name`. +%% Deprecated, use `network.protocol.name`. +-define(NET_PROTOCOL_NAME, 'net.protocol.name'). + +%% @deprecated Replaced by `network.protocol.version`. +%% Deprecated, use `network.protocol.version`. +-define(NET_PROTOCOL_VERSION, 'net.protocol.version'). + +%% @deprecated Split to `network.transport` and `network.type`. +%% Deprecated, use `network.transport` and `network.type`. +-define(NET_SOCK_FAMILY, 'net.sock.family'). + +-define(NET_SOCK_FAMILY_VALUES_INET, 'inet'). + +-define(NET_SOCK_FAMILY_VALUES_INET6, 'inet6'). + +-define(NET_SOCK_FAMILY_VALUES_UNIX, 'unix'). + + +%% @deprecated Replaced by `network.local.address`. +%% Deprecated, use `network.local.address`. +-define(NET_SOCK_HOST_ADDR, 'net.sock.host.addr'). + +%% @deprecated Replaced by `network.local.port`. +%% Deprecated, use `network.local.port`. +-define(NET_SOCK_HOST_PORT, 'net.sock.host.port'). + +%% @deprecated Replaced by `network.peer.address`. +%% Deprecated, use `network.peer.address`. +-define(NET_SOCK_PEER_ADDR, 'net.sock.peer.addr'). + +%% @deprecated Removed. +%% Deprecated, no replacement at this time. +-define(NET_SOCK_PEER_NAME, 'net.sock.peer.name'). + +%% @deprecated Replaced by `network.peer.port`. +%% Deprecated, use `network.peer.port`. +-define(NET_SOCK_PEER_PORT, 'net.sock.peer.port'). + +%% @deprecated Replaced by `network.transport`. +%% Deprecated, use `network.transport`. +-define(NET_TRANSPORT, 'net.transport'). + +-define(NET_TRANSPORT_VALUES_IP_TCP, 'ip_tcp'). + +-define(NET_TRANSPORT_VALUES_IP_UDP, 'ip_udp'). + +-define(NET_TRANSPORT_VALUES_PIPE, 'pipe'). + +-define(NET_TRANSPORT_VALUES_INPROC, 'inproc'). + +-define(NET_TRANSPORT_VALUES_OTHER, 'other'). + + + +%% The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. +-define(NETWORK_CARRIER_ICC, 'network.carrier.icc'). + + +%% The mobile carrier country code. +-define(NETWORK_CARRIER_MCC, 'network.carrier.mcc'). + + +%% The mobile carrier network code. +-define(NETWORK_CARRIER_MNC, 'network.carrier.mnc'). + + +%% The name of the mobile carrier. +-define(NETWORK_CARRIER_NAME, 'network.carrier.name'). + + +%% This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. +-define(NETWORK_CONNECTION_SUBTYPE, 'network.connection.subtype'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_GPRS, 'gprs'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_EDGE, 'edge'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_UMTS, 'umts'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_CDMA, 'cdma'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_EVDO_0, 'evdo_0'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_EVDO_A, 'evdo_a'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_CDMA2000_1XRTT, 'cdma2000_1xrtt'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_HSDPA, 'hsdpa'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_HSUPA, 'hsupa'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_HSPA, 'hspa'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_IDEN, 'iden'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_EVDO_B, 'evdo_b'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_LTE, 'lte'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_EHRPD, 'ehrpd'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_HSPAP, 'hspap'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_GSM, 'gsm'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_TD_SCDMA, 'td_scdma'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_IWLAN, 'iwlan'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_NR, 'nr'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_NRNSA, 'nrnsa'). + +-define(NETWORK_CONNECTION_SUBTYPE_VALUES_LTE_CA, 'lte_ca'). + + + +%% The internet connection type. +-define(NETWORK_CONNECTION_TYPE, 'network.connection.type'). + +-define(NETWORK_CONNECTION_TYPE_VALUES_WIFI, 'wifi'). + +-define(NETWORK_CONNECTION_TYPE_VALUES_WIRED, 'wired'). + +-define(NETWORK_CONNECTION_TYPE_VALUES_CELL, 'cell'). + +-define(NETWORK_CONNECTION_TYPE_VALUES_UNAVAILABLE, 'unavailable'). + +-define(NETWORK_CONNECTION_TYPE_VALUES_UNKNOWN, 'unknown'). + + + +%% The network IO operation direction. +-define(NETWORK_IO_DIRECTION, 'network.io.direction'). + +-define(NETWORK_IO_DIRECTION_VALUES_TRANSMIT, 'transmit'). + +-define(NETWORK_IO_DIRECTION_VALUES_RECEIVE, 'receive'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oci_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oci_attributes.hrl new file mode 100644 index 00000000..18bab4a8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oci_attributes.hrl @@ -0,0 +1,19 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. +%% +-define(OCI_MANIFEST_DIGEST, 'oci.manifest.digest'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/opentracing_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/opentracing_attributes.hrl new file mode 100644 index 00000000..6ac28d2d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/opentracing_attributes.hrl @@ -0,0 +1,23 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Parent-child Reference type +-define(OPENTRACING_REF_TYPE, 'opentracing.ref_type'). + +-define(OPENTRACING_REF_TYPE_VALUES_CHILD_OF, 'child_of'). + +-define(OPENTRACING_REF_TYPE_VALUES_FOLLOWS_FROM, 'follows_from'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl new file mode 100644 index 00000000..93a0b251 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl @@ -0,0 +1,60 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Unique identifier for a particular build or compilation of the operating system. +-define(OS_BUILD_ID, 'os.build_id'). + + +%% Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. +%% +-define(OS_DESCRIPTION, 'os.description'). + + +%% Human readable operating system name. +-define(OS_NAME, 'os.name'). + + +%% The operating system type. +%% +-define(OS_TYPE, 'os.type'). + +-define(OS_TYPE_VALUES_WINDOWS, 'windows'). + +-define(OS_TYPE_VALUES_LINUX, 'linux'). + +-define(OS_TYPE_VALUES_DARWIN, 'darwin'). + +-define(OS_TYPE_VALUES_FREEBSD, 'freebsd'). + +-define(OS_TYPE_VALUES_NETBSD, 'netbsd'). + +-define(OS_TYPE_VALUES_OPENBSD, 'openbsd'). + +-define(OS_TYPE_VALUES_DRAGONFLYBSD, 'dragonflybsd'). + +-define(OS_TYPE_VALUES_HPUX, 'hpux'). + +-define(OS_TYPE_VALUES_AIX, 'aix'). + +-define(OS_TYPE_VALUES_SOLARIS, 'solaris'). + +-define(OS_TYPE_VALUES_Z_OS, 'z_os'). + + + +%% The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +%% +-define(OS_VERSION, 'os.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/otel_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/otel_attributes.hrl new file mode 100644 index 00000000..13575604 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/otel_attributes.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +%% @deprecated use the `otel.scope.name` attribute. +%% +-define(OTEL_LIBRARY_NAME, 'otel.library.name'). + +%% @deprecated use the `otel.scope.version` attribute. +%% +-define(OTEL_LIBRARY_VERSION, 'otel.library.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl new file mode 100644 index 00000000..3dfee4e6 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl @@ -0,0 +1,19 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. +%% +-define(PEER_SERVICE, 'peer.service'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl new file mode 100644 index 00000000..9910359d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl @@ -0,0 +1,164 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. +%% +-define(PROCESS_COMMAND, 'process.command'). + + +%% All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. +%% +-define(PROCESS_COMMAND_ARGS, 'process.command_args'). + + +%% The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. +%% +-define(PROCESS_COMMAND_LINE, 'process.command_line'). + + +%% Specifies whether the context switches for this data point were voluntary or involuntary. +-define(PROCESS_CONTEXT_SWITCH_TYPE, 'process.context_switch_type'). + +-define(PROCESS_CONTEXT_SWITCH_TYPE_VALUES_VOLUNTARY, 'voluntary'). + +-define(PROCESS_CONTEXT_SWITCH_TYPE_VALUES_INVOLUNTARY, 'involuntary'). + + +%% @deprecated Replaced by `cpu.mode` +%% Deprecated, use `cpu.mode` instead. +-define(PROCESS_CPU_STATE, 'process.cpu.state'). + +-define(PROCESS_CPU_STATE_VALUES_SYSTEM, 'system'). + +-define(PROCESS_CPU_STATE_VALUES_USER, 'user'). + +-define(PROCESS_CPU_STATE_VALUES_WAIT, 'wait'). + + + +%% The date and time the process was created, in ISO 8601 format. +%% +-define(PROCESS_CREATION_TIME, 'process.creation.time'). + + +%% The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. +%% +-define(PROCESS_EXECUTABLE_NAME, 'process.executable.name'). + + +%% The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. +%% +-define(PROCESS_EXECUTABLE_PATH, 'process.executable.path'). + + +%% The exit code of the process. +%% +-define(PROCESS_EXIT_CODE, 'process.exit.code'). + + +%% The date and time the process exited, in ISO 8601 format. +%% +-define(PROCESS_EXIT_TIME, 'process.exit.time'). + + +%% The PID of the process's group leader. This is also the process group ID (PGID) of the process. +%% +-define(PROCESS_GROUP_LEADER_PID, 'process.group_leader.pid'). + + +%% Whether the process is connected to an interactive shell. +%% +-define(PROCESS_INTERACTIVE, 'process.interactive'). + + +%% The username of the user that owns the process. +%% +-define(PROCESS_OWNER, 'process.owner'). + + +%% The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. +%% +-define(PROCESS_PAGING_FAULT_TYPE, 'process.paging.fault_type'). + +-define(PROCESS_PAGING_FAULT_TYPE_VALUES_MAJOR, 'major'). + +-define(PROCESS_PAGING_FAULT_TYPE_VALUES_MINOR, 'minor'). + + + +%% Parent Process identifier (PPID). +%% +-define(PROCESS_PARENT_PID, 'process.parent_pid'). + + +%% Process identifier (PID). +%% +-define(PROCESS_PID, 'process.pid'). + + +%% The real user ID (RUID) of the process. +%% +-define(PROCESS_REAL_USER_ID, 'process.real_user.id'). + + +%% The username of the real user of the process. +%% +-define(PROCESS_REAL_USER_NAME, 'process.real_user.name'). + + +%% An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. +%% +-define(PROCESS_RUNTIME_DESCRIPTION, 'process.runtime.description'). + + +%% The name of the runtime of this process. +%% +-define(PROCESS_RUNTIME_NAME, 'process.runtime.name'). + + +%% The version of the runtime of this process, as returned by the runtime without modification. +%% +-define(PROCESS_RUNTIME_VERSION, 'process.runtime.version'). + + +%% The saved user ID (SUID) of the process. +%% +-define(PROCESS_SAVED_USER_ID, 'process.saved_user.id'). + + +%% The username of the saved user. +%% +-define(PROCESS_SAVED_USER_NAME, 'process.saved_user.name'). + + +%% The PID of the process's session leader. This is also the session ID (SID) of the process. +%% +-define(PROCESS_SESSION_LEADER_PID, 'process.session_leader.pid'). + + +%% The effective user ID (EUID) of the process. +%% +-define(PROCESS_USER_ID, 'process.user.id'). + + +%% The username of the effective user of the process. +%% +-define(PROCESS_USER_NAME, 'process.user.name'). + + +%% Virtual process identifier. +%% +-define(PROCESS_VPID, 'process.vpid'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl new file mode 100644 index 00000000..a8bdc1e4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl @@ -0,0 +1,192 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +%% @deprecated Replaced by `rpc.message.compressed_size`. +%% Deprecated, use `rpc.message.compressed_size` instead. +-define(MESSAGE_COMPRESSED_SIZE, 'message.compressed_size'). + +%% @deprecated Replaced by `rpc.message.id`. +%% Deprecated, use `rpc.message.id` instead. +-define(MESSAGE_ID, 'message.id'). + +%% @deprecated Replaced by `rpc.message.type`. +%% Deprecated, use `rpc.message.type` instead. +-define(MESSAGE_TYPE, 'message.type'). + +-define(MESSAGE_TYPE_VALUES_SENT, 'SENT'). + +-define(MESSAGE_TYPE_VALUES_RECEIVED, 'RECEIVED'). + + +%% @deprecated Replaced by `rpc.message.uncompressed_size`. +%% Deprecated, use `rpc.message.uncompressed_size` instead. +-define(MESSAGE_UNCOMPRESSED_SIZE, 'message.uncompressed_size'). + + +%% The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. +-define(RPC_CONNECT_RPC_ERROR_CODE, 'rpc.connect_rpc.error_code'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_CANCELLED, 'cancelled'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_UNKNOWN, 'unknown'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_INVALID_ARGUMENT, 'invalid_argument'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_DEADLINE_EXCEEDED, 'deadline_exceeded'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_NOT_FOUND, 'not_found'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_ALREADY_EXISTS, 'already_exists'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_PERMISSION_DENIED, 'permission_denied'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_RESOURCE_EXHAUSTED, 'resource_exhausted'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_FAILED_PRECONDITION, 'failed_precondition'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_ABORTED, 'aborted'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_OUT_OF_RANGE, 'out_of_range'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_UNIMPLEMENTED, 'unimplemented'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_INTERNAL, 'internal'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_UNAVAILABLE, 'unavailable'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_DATA_LOSS, 'data_loss'). + +-define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_UNAUTHENTICATED, 'unauthenticated'). + + + +%% Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. +%% +-define(RPC_CONNECT_RPC_REQUEST_METADATA, 'rpc.connect_rpc.request.metadata'). + + +%% Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. +%% +-define(RPC_CONNECT_RPC_RESPONSE_METADATA, 'rpc.connect_rpc.response.metadata'). + + +%% gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. +%% +-define(RPC_GRPC_REQUEST_METADATA, 'rpc.grpc.request.metadata'). + + +%% gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. +%% +-define(RPC_GRPC_RESPONSE_METADATA, 'rpc.grpc.response.metadata'). + + +%% The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. +-define(RPC_GRPC_STATUS_CODE, 'rpc.grpc.status_code'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_OK, '0'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_CANCELLED, '1'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_UNKNOWN, '2'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_INVALID_ARGUMENT, '3'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_DEADLINE_EXCEEDED, '4'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_NOT_FOUND, '5'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_ALREADY_EXISTS, '6'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_PERMISSION_DENIED, '7'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_RESOURCE_EXHAUSTED, '8'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_FAILED_PRECONDITION, '9'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_ABORTED, '10'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_OUT_OF_RANGE, '11'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_UNIMPLEMENTED, '12'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_INTERNAL, '13'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_UNAVAILABLE, '14'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_DATA_LOSS, '15'). + +-define(RPC_GRPC_STATUS_CODE_VALUES_UNAUTHENTICATED, '16'). + + + +%% `error.code` property of response if it is an error response. +-define(RPC_JSONRPC_ERROR_CODE, 'rpc.jsonrpc.error_code'). + + +%% `error.message` property of response if it is an error response. +-define(RPC_JSONRPC_ERROR_MESSAGE, 'rpc.jsonrpc.error_message'). + + +%% `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. +%% +-define(RPC_JSONRPC_REQUEST_ID, 'rpc.jsonrpc.request_id'). + + +%% Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. +-define(RPC_JSONRPC_VERSION, 'rpc.jsonrpc.version'). + + +%% Compressed size of the message in bytes. +-define(RPC_MESSAGE_COMPRESSED_SIZE, 'rpc.message.compressed_size'). + + +%% MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. +-define(RPC_MESSAGE_ID, 'rpc.message.id'). + + +%% Whether this is a received or sent message. +-define(RPC_MESSAGE_TYPE, 'rpc.message.type'). + +-define(RPC_MESSAGE_TYPE_VALUES_SENT, 'SENT'). + +-define(RPC_MESSAGE_TYPE_VALUES_RECEIVED, 'RECEIVED'). + + + +%% Uncompressed size of the message in bytes. +-define(RPC_MESSAGE_UNCOMPRESSED_SIZE, 'rpc.message.uncompressed_size'). + + +%% The name of the (logical) method being called, must be equal to the $method part in the span name. +-define(RPC_METHOD, 'rpc.method'). + + +%% The full (logical) name of the service being called, including its package name, if applicable. +-define(RPC_SERVICE, 'rpc.service'). + + +%% A string identifying the remoting system. See below for a list of well-known identifiers. +-define(RPC_SYSTEM, 'rpc.system'). + +-define(RPC_SYSTEM_VALUES_GRPC, 'grpc'). + +-define(RPC_SYSTEM_VALUES_JAVA_RMI, 'java_rmi'). + +-define(RPC_SYSTEM_VALUES_DOTNET_WCF, 'dotnet_wcf'). + +-define(RPC_SYSTEM_VALUES_APACHE_DUBBO, 'apache_dubbo'). + +-define(RPC_SYSTEM_VALUES_CONNECT_RPC, 'connect_rpc'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/service_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/service_attributes.hrl new file mode 100644 index 00000000..e0896b2a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/service_attributes.hrl @@ -0,0 +1,26 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl"). + + +%% The string ID of the service instance. +%% +-define(SERVICE_INSTANCE_ID, 'service.instance.id'). + + +%% A namespace for `service.name`. +%% +-define(SERVICE_NAMESPACE, 'service.namespace'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/session_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/session_attributes.hrl new file mode 100644 index 00000000..b44e753a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/session_attributes.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% A unique id to identify a session. +-define(SESSION_ID, 'session.id'). + + +%% The previous `session.id` for this user, when known. +-define(SESSION_PREVIOUS_ID, 'session.previous_id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/source_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/source_attributes.hrl new file mode 100644 index 00000000..4f7c3f9b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/source_attributes.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +-define(SOURCE_ADDRESS, 'source.address'). + + +%% Source port number +-define(SOURCE_PORT, 'source.port'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl new file mode 100644 index 00000000..0b874cc0 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl @@ -0,0 +1,175 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The logical CPU number [0..n-1] +-define(SYSTEM_CPU_LOGICAL_NUMBER, 'system.cpu.logical_number'). + +%% @deprecated Replaced by `cpu.mode` +%% Deprecated, use `cpu.mode` instead. +-define(SYSTEM_CPU_STATE, 'system.cpu.state'). + +-define(SYSTEM_CPU_STATE_VALUES_USER, 'user'). + +-define(SYSTEM_CPU_STATE_VALUES_SYSTEM, 'system'). + +-define(SYSTEM_CPU_STATE_VALUES_NICE, 'nice'). + +-define(SYSTEM_CPU_STATE_VALUES_IDLE, 'idle'). + +-define(SYSTEM_CPU_STATE_VALUES_IOWAIT, 'iowait'). + +-define(SYSTEM_CPU_STATE_VALUES_INTERRUPT, 'interrupt'). + +-define(SYSTEM_CPU_STATE_VALUES_STEAL, 'steal'). + + + +%% The device identifier +-define(SYSTEM_DEVICE, 'system.device'). + + +%% The filesystem mode +-define(SYSTEM_FILESYSTEM_MODE, 'system.filesystem.mode'). + + +%% The filesystem mount path +-define(SYSTEM_FILESYSTEM_MOUNTPOINT, 'system.filesystem.mountpoint'). + + +%% The filesystem state +-define(SYSTEM_FILESYSTEM_STATE, 'system.filesystem.state'). + +-define(SYSTEM_FILESYSTEM_STATE_VALUES_USED, 'used'). + +-define(SYSTEM_FILESYSTEM_STATE_VALUES_FREE, 'free'). + +-define(SYSTEM_FILESYSTEM_STATE_VALUES_RESERVED, 'reserved'). + + + +%% The filesystem type +-define(SYSTEM_FILESYSTEM_TYPE, 'system.filesystem.type'). + +-define(SYSTEM_FILESYSTEM_TYPE_VALUES_FAT32, 'fat32'). + +-define(SYSTEM_FILESYSTEM_TYPE_VALUES_EXFAT, 'exfat'). + +-define(SYSTEM_FILESYSTEM_TYPE_VALUES_NTFS, 'ntfs'). + +-define(SYSTEM_FILESYSTEM_TYPE_VALUES_REFS, 'refs'). + +-define(SYSTEM_FILESYSTEM_TYPE_VALUES_HFSPLUS, 'hfsplus'). + +-define(SYSTEM_FILESYSTEM_TYPE_VALUES_EXT4, 'ext4'). + + + +%% The memory state +-define(SYSTEM_MEMORY_STATE, 'system.memory.state'). + +-define(SYSTEM_MEMORY_STATE_VALUES_USED, 'used'). + +-define(SYSTEM_MEMORY_STATE_VALUES_FREE, 'free'). + +-define(SYSTEM_MEMORY_STATE_VALUES_SHARED, 'shared'). + +-define(SYSTEM_MEMORY_STATE_VALUES_BUFFERS, 'buffers'). + +-define(SYSTEM_MEMORY_STATE_VALUES_CACHED, 'cached'). + + + +%% A stateless protocol MUST NOT set this attribute +-define(SYSTEM_NETWORK_STATE, 'system.network.state'). + +-define(SYSTEM_NETWORK_STATE_VALUES_CLOSE, 'close'). + +-define(SYSTEM_NETWORK_STATE_VALUES_CLOSE_WAIT, 'close_wait'). + +-define(SYSTEM_NETWORK_STATE_VALUES_CLOSING, 'closing'). + +-define(SYSTEM_NETWORK_STATE_VALUES_DELETE, 'delete'). + +-define(SYSTEM_NETWORK_STATE_VALUES_ESTABLISHED, 'established'). + +-define(SYSTEM_NETWORK_STATE_VALUES_FIN_WAIT_1, 'fin_wait_1'). + +-define(SYSTEM_NETWORK_STATE_VALUES_FIN_WAIT_2, 'fin_wait_2'). + +-define(SYSTEM_NETWORK_STATE_VALUES_LAST_ACK, 'last_ack'). + +-define(SYSTEM_NETWORK_STATE_VALUES_LISTEN, 'listen'). + +-define(SYSTEM_NETWORK_STATE_VALUES_SYN_RECV, 'syn_recv'). + +-define(SYSTEM_NETWORK_STATE_VALUES_SYN_SENT, 'syn_sent'). + +-define(SYSTEM_NETWORK_STATE_VALUES_TIME_WAIT, 'time_wait'). + + + +%% The paging access direction +-define(SYSTEM_PAGING_DIRECTION, 'system.paging.direction'). + +-define(SYSTEM_PAGING_DIRECTION_VALUES_IN, 'in'). + +-define(SYSTEM_PAGING_DIRECTION_VALUES_OUT, 'out'). + + + +%% The memory paging state +-define(SYSTEM_PAGING_STATE, 'system.paging.state'). + +-define(SYSTEM_PAGING_STATE_VALUES_USED, 'used'). + +-define(SYSTEM_PAGING_STATE_VALUES_FREE, 'free'). + + + +%% The memory paging type +-define(SYSTEM_PAGING_TYPE, 'system.paging.type'). + +-define(SYSTEM_PAGING_TYPE_VALUES_MAJOR, 'major'). + +-define(SYSTEM_PAGING_TYPE_VALUES_MINOR, 'minor'). + + + +%% The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) +%% +-define(SYSTEM_PROCESS_STATUS, 'system.process.status'). + +-define(SYSTEM_PROCESS_STATUS_VALUES_RUNNING, 'running'). + +-define(SYSTEM_PROCESS_STATUS_VALUES_SLEEPING, 'sleeping'). + +-define(SYSTEM_PROCESS_STATUS_VALUES_STOPPED, 'stopped'). + +-define(SYSTEM_PROCESS_STATUS_VALUES_DEFUNCT, 'defunct'). + + +%% @deprecated Replaced by `system.process.status`. +%% Deprecated, use `system.process.status` instead. +-define(SYSTEM_PROCESSES_STATUS, 'system.processes.status'). + +-define(SYSTEM_PROCESSES_STATUS_VALUES_RUNNING, 'running'). + +-define(SYSTEM_PROCESSES_STATUS_VALUES_SLEEPING, 'sleeping'). + +-define(SYSTEM_PROCESSES_STATUS_VALUES_STOPPED, 'stopped'). + +-define(SYSTEM_PROCESSES_STATUS_VALUES_DEFUNCT, 'defunct'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/telemetry_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/telemetry_attributes.hrl new file mode 100644 index 00000000..9b231394 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/telemetry_attributes.hrl @@ -0,0 +1,26 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/telemetry_attributes.hrl"). + + +%% The name of the auto instrumentation agent or distribution, if used. +%% +-define(TELEMETRY_DISTRO_NAME, 'telemetry.distro.name'). + + +%% The version string of the auto instrumentation agent or distribution, if used. +%% +-define(TELEMETRY_DISTRO_VERSION, 'telemetry.distro.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl new file mode 100644 index 00000000..4b308f77 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl @@ -0,0 +1,52 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The fully qualified human readable name of the [test case](https://en.wikipedia.org/wiki/Test_case). +%% +-define(TEST_CASE_NAME, 'test.case.name'). + + +%% The status of the actual test case result from test execution. +%% +-define(TEST_CASE_RESULT_STATUS, 'test.case.result.status'). + +-define(TEST_CASE_RESULT_STATUS_VALUES_PASS, 'pass'). + +-define(TEST_CASE_RESULT_STATUS_VALUES_FAIL, 'fail'). + + + +%% The human readable name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). +%% +-define(TEST_SUITE_NAME, 'test.suite.name'). + + +%% The status of the test suite run. +%% +-define(TEST_SUITE_RUN_STATUS, 'test.suite.run.status'). + +-define(TEST_SUITE_RUN_STATUS_VALUES_SUCCESS, 'success'). + +-define(TEST_SUITE_RUN_STATUS_VALUES_FAILURE, 'failure'). + +-define(TEST_SUITE_RUN_STATUS_VALUES_SKIPPED, 'skipped'). + +-define(TEST_SUITE_RUN_STATUS_VALUES_ABORTED, 'aborted'). + +-define(TEST_SUITE_RUN_STATUS_VALUES_TIMED_OUT, 'timed_out'). + +-define(TEST_SUITE_RUN_STATUS_VALUES_IN_PROGRESS, 'in_progress'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/thread_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/thread_attributes.hrl new file mode 100644 index 00000000..8eec8d36 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/thread_attributes.hrl @@ -0,0 +1,24 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Current "managed" thread ID (as opposed to OS thread ID). +%% +-define(THREAD_ID, 'thread.id'). + + +%% Current thread name. +%% +-define(THREAD_NAME, 'thread.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl new file mode 100644 index 00000000..7918f446 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl @@ -0,0 +1,149 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection. +%% +-define(TLS_CIPHER, 'tls.cipher'). + + +%% PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list. +%% +-define(TLS_CLIENT_CERTIFICATE, 'tls.client.certificate'). + + +%% Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain. +%% +-define(TLS_CLIENT_CERTIFICATE_CHAIN, 'tls.client.certificate_chain'). + + +%% Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. +%% +-define(TLS_CLIENT_HASH_MD5, 'tls.client.hash.md5'). + + +%% Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. +%% +-define(TLS_CLIENT_HASH_SHA1, 'tls.client.hash.sha1'). + + +%% Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. +%% +-define(TLS_CLIENT_HASH_SHA256, 'tls.client.hash.sha256'). + + +%% Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client. +-define(TLS_CLIENT_ISSUER, 'tls.client.issuer'). + + +%% A hash that identifies clients based on how they perform an SSL/TLS handshake. +-define(TLS_CLIENT_JA3, 'tls.client.ja3'). + + +%% Date/Time indicating when client certificate is no longer considered valid. +-define(TLS_CLIENT_NOT_AFTER, 'tls.client.not_after'). + + +%% Date/Time indicating when client certificate is first considered valid. +-define(TLS_CLIENT_NOT_BEFORE, 'tls.client.not_before'). + +%% @deprecated Replaced by `server.address. +%% Deprecated, use `server.address` instead. +-define(TLS_CLIENT_SERVER_NAME, 'tls.client.server_name'). + + +%% Distinguished name of subject of the x.509 certificate presented by the client. +-define(TLS_CLIENT_SUBJECT, 'tls.client.subject'). + + +%% Array of ciphers offered by the client during the client hello. +-define(TLS_CLIENT_SUPPORTED_CIPHERS, 'tls.client.supported_ciphers'). + + +%% String indicating the curve used for the given cipher, when applicable +-define(TLS_CURVE, 'tls.curve'). + + +%% Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel. +-define(TLS_ESTABLISHED, 'tls.established'). + + +%% String indicating the protocol being tunneled. Per the values in the [IANA registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case. +%% +-define(TLS_NEXT_PROTOCOL, 'tls.next_protocol'). + + +%% Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) +%% +-define(TLS_PROTOCOL_NAME, 'tls.protocol.name'). + +-define(TLS_PROTOCOL_NAME_VALUES_SSL, 'ssl'). + +-define(TLS_PROTOCOL_NAME_VALUES_TLS, 'tls'). + + + +%% Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) +%% +-define(TLS_PROTOCOL_VERSION, 'tls.protocol.version'). + + +%% Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation. +-define(TLS_RESUMED, 'tls.resumed'). + + +%% PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list. +%% +-define(TLS_SERVER_CERTIFICATE, 'tls.server.certificate'). + + +%% Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain. +%% +-define(TLS_SERVER_CERTIFICATE_CHAIN, 'tls.server.certificate_chain'). + + +%% Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. +%% +-define(TLS_SERVER_HASH_MD5, 'tls.server.hash.md5'). + + +%% Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. +%% +-define(TLS_SERVER_HASH_SHA1, 'tls.server.hash.sha1'). + + +%% Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. +%% +-define(TLS_SERVER_HASH_SHA256, 'tls.server.hash.sha256'). + + +%% Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client. +-define(TLS_SERVER_ISSUER, 'tls.server.issuer'). + + +%% A hash that identifies servers based on how they perform an SSL/TLS handshake. +-define(TLS_SERVER_JA3S, 'tls.server.ja3s'). + + +%% Date/Time indicating when server certificate is no longer considered valid. +-define(TLS_SERVER_NOT_AFTER, 'tls.server.not_after'). + + +%% Date/Time indicating when server certificate is first considered valid. +-define(TLS_SERVER_NOT_BEFORE, 'tls.server.not_before'). + + +%% Distinguished name of subject of the x.509 certificate presented by the server. +-define(TLS_SERVER_SUBJECT, 'tls.server.subject'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/url_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/url_attributes.hrl new file mode 100644 index 00000000..0ed66fbd --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/url_attributes.hrl @@ -0,0 +1,56 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/url_attributes.hrl"). + + +%% Domain extracted from the `url.full`, such as "opentelemetry.io". +%% +-define(URL_DOMAIN, 'url.domain'). + + +%% The file extension extracted from the `url.full`, excluding the leading dot. +%% +-define(URL_EXTENSION, 'url.extension'). + + +%% Unmodified original URL as seen in the event source. +%% +-define(URL_ORIGINAL, 'url.original'). + + +%% Port extracted from the `url.full` +%% +-define(URL_PORT, 'url.port'). + + +%% The highest registered url domain, stripped of the subdomain. +%% +-define(URL_REGISTERED_DOMAIN, 'url.registered_domain'). + + +%% The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. +%% +-define(URL_SUBDOMAIN, 'url.subdomain'). + + +%% The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). +%% +-define(URL_TEMPLATE, 'url.template'). + + +%% The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is `com`. +%% +-define(URL_TOP_LEVEL_DOMAIN, 'url.top_level_domain'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_agent_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_agent_attributes.hrl new file mode 100644 index 00000000..b60d96c8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_agent_attributes.hrl @@ -0,0 +1,26 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/user_agent_attributes.hrl"). + + +%% Name of the user-agent extracted from original. Usually refers to the browser's name. +%% +-define(USER_AGENT_NAME, 'user_agent.name'). + + +%% Version of the user-agent extracted from original. Usually refers to the browser's version +%% +-define(USER_AGENT_VERSION, 'user_agent.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_attributes.hrl new file mode 100644 index 00000000..9ac3fe22 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_attributes.hrl @@ -0,0 +1,44 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% User email address. +%% +-define(USER_EMAIL, 'user.email'). + + +%% User's full name +%% +-define(USER_FULL_NAME, 'user.full_name'). + + +%% Unique user hash to correlate information for a user in anonymized form. +%% +-define(USER_HASH, 'user.hash'). + + +%% Unique identifier of the user. +%% +-define(USER_ID, 'user.id'). + + +%% Short name or login/username of the user. +%% +-define(USER_NAME, 'user.name'). + + +%% Array of user roles at the time of the event. +%% +-define(USER_ROLES, 'user.roles'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl new file mode 100644 index 00000000..b3a3b83c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl @@ -0,0 +1,49 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The ID of the change (pull request/merge request) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. +%% +-define(VCS_REPOSITORY_CHANGE_ID, 'vcs.repository.change.id'). + + +%% The human readable title of the change (pull request/merge request). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. +%% +-define(VCS_REPOSITORY_CHANGE_TITLE, 'vcs.repository.change.title'). + + +%% The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. +%% +-define(VCS_REPOSITORY_REF_NAME, 'vcs.repository.ref.name'). + + +%% The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. +%% +-define(VCS_REPOSITORY_REF_REVISION, 'vcs.repository.ref.revision'). + + +%% The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +%% +-define(VCS_REPOSITORY_REF_TYPE, 'vcs.repository.ref.type'). + +-define(VCS_REPOSITORY_REF_TYPE_VALUES_BRANCH, 'branch'). + +-define(VCS_REPOSITORY_REF_TYPE_VALUES_TAG, 'tag'). + + + +%% The [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. +%% +-define(VCS_REPOSITORY_URL_FULL, 'vcs.repository.url.full'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl new file mode 100644 index 00000000..70487615 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl @@ -0,0 +1,30 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Total CPU time consumed +-define(CONTAINER_CPU_TIME, 'container.cpu.time'). + + +%% Disk bytes for the container. +-define(CONTAINER_DISK_IO, 'container.disk.io'). + + +%% Memory usage of the container. +-define(CONTAINER_MEMORY_USAGE, 'container.memory.usage'). + + +%% Network bytes for the container. +-define(CONTAINER_NETWORK_IO, 'container.network.io'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl new file mode 100644 index 00000000..d68836a3 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl @@ -0,0 +1,90 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The number of connections that are currently in state described by the `state` attribute +-define(DB_CLIENT_CONNECTION_COUNT, 'db.client.connection.count'). + + +%% The time it took to create a new connection +-define(DB_CLIENT_CONNECTION_CREATE_TIME, 'db.client.connection.create_time'). + + +%% The maximum number of idle open connections allowed +-define(DB_CLIENT_CONNECTION_IDLE_MAX, 'db.client.connection.idle.max'). + + +%% The minimum number of idle open connections allowed +-define(DB_CLIENT_CONNECTION_IDLE_MIN, 'db.client.connection.idle.min'). + + +%% The maximum number of open connections allowed +-define(DB_CLIENT_CONNECTION_MAX, 'db.client.connection.max'). + + +%% The number of pending requests for an open connection, cumulative for the entire pool +-define(DB_CLIENT_CONNECTION_PENDING_REQUESTS, 'db.client.connection.pending_requests'). + + +%% The number of connection timeouts that have occurred trying to obtain a connection from the pool +-define(DB_CLIENT_CONNECTION_TIMEOUTS, 'db.client.connection.timeouts'). + + +%% The time between borrowing a connection and returning it to the pool +-define(DB_CLIENT_CONNECTION_USE_TIME, 'db.client.connection.use_time'). + + +%% The time it took to obtain an open connection from the pool +-define(DB_CLIENT_CONNECTION_WAIT_TIME, 'db.client.connection.wait_time'). + +%% @deprecated Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. +%% Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`. +-define(DB_CLIENT_CONNECTIONS_CREATE_TIME, 'db.client.connections.create_time'). + +%% @deprecated Replaced by `db.client.connection.idle.max`. +%% Deprecated, use `db.client.connection.idle.max` instead. +-define(DB_CLIENT_CONNECTIONS_IDLE_MAX, 'db.client.connections.idle.max'). + +%% @deprecated Replaced by `db.client.connection.idle.min`. +%% Deprecated, use `db.client.connection.idle.min` instead. +-define(DB_CLIENT_CONNECTIONS_IDLE_MIN, 'db.client.connections.idle.min'). + +%% @deprecated Replaced by `db.client.connection.max`. +%% Deprecated, use `db.client.connection.max` instead. +-define(DB_CLIENT_CONNECTIONS_MAX, 'db.client.connections.max'). + +%% @deprecated Replaced by `db.client.connection.pending_requests`. +%% Deprecated, use `db.client.connection.pending_requests` instead. +-define(DB_CLIENT_CONNECTIONS_PENDING_REQUESTS, 'db.client.connections.pending_requests'). + +%% @deprecated Replaced by `db.client.connection.timeouts`. +%% Deprecated, use `db.client.connection.timeouts` instead. +-define(DB_CLIENT_CONNECTIONS_TIMEOUTS, 'db.client.connections.timeouts'). + +%% @deprecated Replaced by `db.client.connection.count`. +%% Deprecated, use `db.client.connection.count` instead. +-define(DB_CLIENT_CONNECTIONS_USAGE, 'db.client.connections.usage'). + +%% @deprecated Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. +%% Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`. +-define(DB_CLIENT_CONNECTIONS_USE_TIME, 'db.client.connections.use_time'). + +%% @deprecated Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. +%% Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`. +-define(DB_CLIENT_CONNECTIONS_WAIT_TIME, 'db.client.connections.wait_time'). + + +%% Duration of database client operations. +-define(DB_CLIENT_OPERATION_DURATION, 'db.client.operation.duration'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/dns_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/dns_metrics.hrl new file mode 100644 index 00000000..52c3855b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/dns_metrics.hrl @@ -0,0 +1,18 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Measures the time taken to perform a DNS lookup. +-define(DNS_LOOKUP_DURATION, 'dns.lookup.duration'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/faas_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/faas_metrics.hrl new file mode 100644 index 00000000..3f777ac4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/faas_metrics.hrl @@ -0,0 +1,50 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Number of invocation cold starts +-define(FAAS_COLDSTARTS, 'faas.coldstarts'). + + +%% Distribution of CPU usage per invocation +-define(FAAS_CPU_USAGE, 'faas.cpu_usage'). + + +%% Number of invocation errors +-define(FAAS_ERRORS, 'faas.errors'). + + +%% Measures the duration of the function's initialization, such as a cold start +-define(FAAS_INIT_DURATION, 'faas.init_duration'). + + +%% Number of successful invocations +-define(FAAS_INVOCATIONS, 'faas.invocations'). + + +%% Measures the duration of the function's logic execution +-define(FAAS_INVOKE_DURATION, 'faas.invoke_duration'). + + +%% Distribution of max memory usage per invocation +-define(FAAS_MEM_USAGE, 'faas.mem_usage'). + + +%% Distribution of net I/O usage per invocation +-define(FAAS_NET_IO, 'faas.net_io'). + + +%% Number of invocation timeouts +-define(FAAS_TIMEOUTS, 'faas.timeouts'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/gen_ai_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/gen_ai_metrics.hrl new file mode 100644 index 00000000..9db211af --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/gen_ai_metrics.hrl @@ -0,0 +1,34 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% GenAI operation duration +-define(GEN_AI_CLIENT_OPERATION_DURATION, 'gen_ai.client.operation.duration'). + + +%% Measures number of input and output tokens used +-define(GEN_AI_CLIENT_TOKEN_USAGE, 'gen_ai.client.token.usage'). + + +%% Generative AI server request duration such as time-to-last byte or last output token +-define(GEN_AI_SERVER_REQUEST_DURATION, 'gen_ai.server.request.duration'). + + +%% Time per output token generated after the first token for successful responses +-define(GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN, 'gen_ai.server.time_per_output_token'). + + +%% Time to generate first token for successful responses +-define(GEN_AI_SERVER_TIME_TO_FIRST_TOKEN, 'gen_ai.server.time_to_first_token'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/http_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/http_metrics.hrl new file mode 100644 index 00000000..c18cf169 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/http_metrics.hrl @@ -0,0 +1,46 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Number of active HTTP requests. +-define(HTTP_CLIENT_ACTIVE_REQUESTS, 'http.client.active_requests'). + + +%% The duration of the successfully established outbound HTTP connections. +-define(HTTP_CLIENT_CONNECTION_DURATION, 'http.client.connection.duration'). + + +%% Number of outbound HTTP connections that are currently active or idle on the client. +-define(HTTP_CLIENT_OPEN_CONNECTIONS, 'http.client.open_connections'). + + +%% Size of HTTP client request bodies. +-define(HTTP_CLIENT_REQUEST_BODY_SIZE, 'http.client.request.body.size'). + + +%% Size of HTTP client response bodies. +-define(HTTP_CLIENT_RESPONSE_BODY_SIZE, 'http.client.response.body.size'). + + +%% Number of active HTTP server requests. +-define(HTTP_SERVER_ACTIVE_REQUESTS, 'http.server.active_requests'). + + +%% Size of HTTP server request bodies. +-define(HTTP_SERVER_REQUEST_BODY_SIZE, 'http.server.request.body.size'). + + +%% Size of HTTP server response bodies. +-define(HTTP_SERVER_RESPONSE_BODY_SIZE, 'http.server.response.body.size'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/messaging_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/messaging_metrics.hrl new file mode 100644 index 00000000..381d81d6 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/messaging_metrics.hrl @@ -0,0 +1,50 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Number of messages that were delivered to the application. +-define(MESSAGING_CLIENT_CONSUMED_MESSAGES, 'messaging.client.consumed.messages'). + + +%% Duration of messaging operation initiated by a producer or consumer client. +-define(MESSAGING_CLIENT_OPERATION_DURATION, 'messaging.client.operation.duration'). + + +%% Number of messages producer attempted to publish to the broker. +-define(MESSAGING_CLIENT_PUBLISHED_MESSAGES, 'messaging.client.published.messages'). + + +%% Duration of processing operation. +-define(MESSAGING_PROCESS_DURATION, 'messaging.process.duration'). + +%% @deprecated Replaced by `messaging.client.consumed.messages`. +%% Deprecated. Use `messaging.client.consumed.messages` instead. +-define(MESSAGING_PROCESS_MESSAGES, 'messaging.process.messages'). + +%% @deprecated Replaced by `messaging.client.operation.duration`. +%% Deprecated. Use `messaging.client.operation.duration` instead. +-define(MESSAGING_PUBLISH_DURATION, 'messaging.publish.duration'). + +%% @deprecated Replaced by `messaging.client.produced.messages`. +%% Deprecated. Use `messaging.client.produced.messages` instead. +-define(MESSAGING_PUBLISH_MESSAGES, 'messaging.publish.messages'). + +%% @deprecated Replaced by `messaging.client.operation.duration`. +%% Deprecated. Use `messaging.client.operation.duration` instead. +-define(MESSAGING_RECEIVE_DURATION, 'messaging.receive.duration'). + +%% @deprecated Replaced by `messaging.client.consumed.messages`. +%% Deprecated. Use `messaging.client.consumed.messages` instead. +-define(MESSAGING_RECEIVE_MESSAGES, 'messaging.receive.messages'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl new file mode 100644 index 00000000..e4dbe3ba --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl @@ -0,0 +1,54 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Number of times the process has been context switched. +-define(PROCESS_CONTEXT_SWITCHES, 'process.context_switches'). + + +%% Total CPU seconds broken down by different states. +-define(PROCESS_CPU_TIME, 'process.cpu.time'). + + +%% Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. +-define(PROCESS_CPU_UTILIZATION, 'process.cpu.utilization'). + + +%% Disk bytes transferred. +-define(PROCESS_DISK_IO, 'process.disk.io'). + + +%% The amount of physical memory in use. +-define(PROCESS_MEMORY_USAGE, 'process.memory.usage'). + + +%% The amount of committed virtual memory. +-define(PROCESS_MEMORY_VIRTUAL, 'process.memory.virtual'). + + +%% Network bytes transferred. +-define(PROCESS_NETWORK_IO, 'process.network.io'). + + +%% Number of file descriptors in use by the process. +-define(PROCESS_OPEN_FILE_DESCRIPTOR_COUNT, 'process.open_file_descriptor.count'). + + +%% Number of page faults the process has made. +-define(PROCESS_PAGING_FAULTS, 'process.paging.faults'). + + +%% Process threads count. +-define(PROCESS_THREAD_COUNT, 'process.thread.count'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/rpc_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/rpc_metrics.hrl new file mode 100644 index 00000000..44ec47ff --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/rpc_metrics.hrl @@ -0,0 +1,54 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Measures the duration of outbound RPC. +-define(RPC_CLIENT_DURATION, 'rpc.client.duration'). + + +%% Measures the size of RPC request messages (uncompressed). +-define(RPC_CLIENT_REQUEST_SIZE, 'rpc.client.request.size'). + + +%% Measures the number of messages received per RPC. +-define(RPC_CLIENT_REQUESTS_PER_RPC, 'rpc.client.requests_per_rpc'). + + +%% Measures the size of RPC response messages (uncompressed). +-define(RPC_CLIENT_RESPONSE_SIZE, 'rpc.client.response.size'). + + +%% Measures the number of messages sent per RPC. +-define(RPC_CLIENT_RESPONSES_PER_RPC, 'rpc.client.responses_per_rpc'). + + +%% Measures the duration of inbound RPC. +-define(RPC_SERVER_DURATION, 'rpc.server.duration'). + + +%% Measures the size of RPC request messages (uncompressed). +-define(RPC_SERVER_REQUEST_SIZE, 'rpc.server.request.size'). + + +%% Measures the number of messages received per RPC. +-define(RPC_SERVER_REQUESTS_PER_RPC, 'rpc.server.requests_per_rpc'). + + +%% Measures the size of RPC response messages (uncompressed). +-define(RPC_SERVER_RESPONSE_SIZE, 'rpc.server.response.size'). + + +%% Measures the number of messages sent per RPC. +-define(RPC_SERVER_RESPONSES_PER_RPC, 'rpc.server.responses_per_rpc'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl new file mode 100644 index 00000000..5e38b8d6 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl @@ -0,0 +1,130 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Reports the current frequency of the CPU in Hz +-define(SYSTEM_CPU_FREQUENCY, 'system.cpu.frequency'). + + +%% Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking +-define(SYSTEM_CPU_LOGICAL_COUNT, 'system.cpu.logical.count'). + + +%% Reports the number of actual physical processor cores on the hardware +-define(SYSTEM_CPU_PHYSICAL_COUNT, 'system.cpu.physical.count'). + + +%% Seconds each logical CPU spent on each mode +-define(SYSTEM_CPU_TIME, 'system.cpu.time'). + + +%% Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs +-define(SYSTEM_CPU_UTILIZATION, 'system.cpu.utilization'). + + +%% none +-define(SYSTEM_DISK_IO, 'system.disk.io'). + + +%% Time disk spent activated +-define(SYSTEM_DISK_IO_TIME, 'system.disk.io_time'). + + +%% none +-define(SYSTEM_DISK_MERGED, 'system.disk.merged'). + + +%% Sum of the time each operation took to complete +-define(SYSTEM_DISK_OPERATION_TIME, 'system.disk.operation_time'). + + +%% none +-define(SYSTEM_DISK_OPERATIONS, 'system.disk.operations'). + + +%% none +-define(SYSTEM_FILESYSTEM_USAGE, 'system.filesystem.usage'). + + +%% none +-define(SYSTEM_FILESYSTEM_UTILIZATION, 'system.filesystem.utilization'). + + +%% An estimate of how much memory is available for starting new applications, without causing swapping +-define(SYSTEM_LINUX_MEMORY_AVAILABLE, 'system.linux.memory.available'). + + +%% Reports the memory used by the Linux kernel for managing caches of frequently used objects. +-define(SYSTEM_LINUX_MEMORY_SLAB_USAGE, 'system.linux.memory.slab.usage'). + + +%% Total memory available in the system. +-define(SYSTEM_MEMORY_LIMIT, 'system.memory.limit'). + + +%% Shared memory used (mostly by tmpfs). +-define(SYSTEM_MEMORY_SHARED, 'system.memory.shared'). + + +%% Reports memory in use by state. +-define(SYSTEM_MEMORY_USAGE, 'system.memory.usage'). + + +%% none +-define(SYSTEM_MEMORY_UTILIZATION, 'system.memory.utilization'). + + +%% none +-define(SYSTEM_NETWORK_CONNECTIONS, 'system.network.connections'). + + +%% Count of packets that are dropped or discarded even though there was no error +-define(SYSTEM_NETWORK_DROPPED, 'system.network.dropped'). + + +%% Count of network errors detected +-define(SYSTEM_NETWORK_ERRORS, 'system.network.errors'). + + +%% none +-define(SYSTEM_NETWORK_IO, 'system.network.io'). + + +%% none +-define(SYSTEM_NETWORK_PACKETS, 'system.network.packets'). + + +%% none +-define(SYSTEM_PAGING_FAULTS, 'system.paging.faults'). + + +%% none +-define(SYSTEM_PAGING_OPERATIONS, 'system.paging.operations'). + + +%% Unix swap or windows pagefile usage +-define(SYSTEM_PAGING_USAGE, 'system.paging.usage'). + + +%% none +-define(SYSTEM_PAGING_UTILIZATION, 'system.paging.utilization'). + + +%% Total number of processes in each state +-define(SYSTEM_PROCESS_COUNT, 'system.process.count'). + + +%% Total number of processes created over uptime of the host +-define(SYSTEM_PROCESS_CREATED, 'system.process.created'). diff --git a/apps/opentelemetry_semantic_conventions/include/logs.hrl b/apps/opentelemetry_semantic_conventions/include/logs.hrl index 2f9a6cce..b187b111 100644 --- a/apps/opentelemetry_semantic_conventions/include/logs.hrl +++ b/apps/opentelemetry_semantic_conventions/include/logs.hrl @@ -1,11 +1,14 @@ -%% The schema url for telemetry resources +%% WARNING: These macros are deprecated and will be removed in a future release. +%% Migrate to >= v1.27.0 semantic conventions + +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(LOGS_SCHEMA_URL, <<"https://opentelemetry.io/schemas/1.13.0">>). -%% The name identifies the event +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(EVENT_NAME, 'event.name'). -%% The domain identifies the context in which an event happened. An event name is unique only within a domain -%% An `event.name` is supposed to be unique only in the context of an -%% `event.domain`, so this allows for two events in different domains to -%% have same `event.name`, yet be unrelated events +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(EVENT_DOMAIN, 'event.domain'). diff --git a/apps/opentelemetry_semantic_conventions/include/metrics/http_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/metrics/http_metrics.hrl new file mode 100644 index 00000000..32212de8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/metrics/http_metrics.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Duration of HTTP client requests. +-define(HTTP_CLIENT_REQUEST_DURATION, 'http.client.request.duration'). + + +%% Duration of HTTP server requests. +-define(HTTP_SERVER_REQUEST_DURATION, 'http.server.request.duration'). diff --git a/apps/opentelemetry_semantic_conventions/include/resource.hrl b/apps/opentelemetry_semantic_conventions/include/resource.hrl index 65bd8c06..744f5a9a 100644 --- a/apps/opentelemetry_semantic_conventions/include/resource.hrl +++ b/apps/opentelemetry_semantic_conventions/include/resource.hrl @@ -1,323 +1,354 @@ -%% The schema url for telemetry resources +%% WARNING: These macros are deprecated and will be removed in a future release. +%% Migrate to >= v1.27.0 semantic conventions + +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RESOURCE_SCHEMA_URL, <<"https://opentelemetry.io/schemas/1.13.0">>). -%% Array of brand name and version separated by a space -%% This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (navigator.userAgentData.brands) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(BROWSER_BRANDS, 'browser.brands'). -%% The platform on which the browser is running -%% This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (navigator.userAgentData.platform). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent. -%% The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [os.type and os.name attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(BROWSER_PLATFORM, 'browser.platform'). -%% Full user-agent string provided by the browser -%% The user-agent value SHOULD be provided only from browsers that do not have a mechanism to retrieve brands and platform individually from the User-Agent Client Hints API. To retrieve the value, the legacy `navigator.userAgent` API can be used +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(BROWSER_USER_AGENT, 'browser.user_agent'). -%% Name of the cloud provider +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUD_PROVIDER, 'cloud.provider'). -%% The cloud account ID the resource is assigned to +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUD_ACCOUNT_ID, 'cloud.account.id'). -%% The geographical region the resource is running -%% Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://intl.cloud.tencent.com/document/product/213/6091) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUD_REGION, 'cloud.region'). -%% Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running -%% Availability zones are called "zones" on Alibaba Cloud and Google Cloud +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUD_AVAILABILITY_ZONE, 'cloud.availability_zone'). -%% The cloud platform in use -%% The prefix of the service SHOULD match the one specified in `cloud.provider` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUD_PLATFORM, 'cloud.platform'). -%% The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_ECS_CONTAINER_ARN, 'aws.ecs.container.arn'). -%% The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_ECS_CLUSTER_ARN, 'aws.ecs.cluster.arn'). -%% The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_ECS_LAUNCHTYPE, 'aws.ecs.launchtype'). -%% The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_ECS_TASK_ARN, 'aws.ecs.task.arn'). -%% The task definition family this task definition is a member of +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_ECS_TASK_FAMILY, 'aws.ecs.task.family'). -%% The revision for this task definition +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_ECS_TASK_REVISION, 'aws.ecs.task.revision'). -%% The ARN of an EKS cluster +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_EKS_CLUSTER_ARN, 'aws.eks.cluster.arn'). -%% The name(s) of the AWS log group(s) an application is writing to -%% Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_LOG_GROUP_NAMES, 'aws.log.group.names'). -%% The Amazon Resource Name(s) (ARN) of the AWS log group(s) -%% See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_LOG_GROUP_ARNS, 'aws.log.group.arns'). -%% The name(s) of the AWS log stream(s) an application is writing to +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_LOG_STREAM_NAMES, 'aws.log.stream.names'). -%% The ARN(s) of the AWS log stream(s) -%% See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_LOG_STREAM_ARNS, 'aws.log.stream.arns'). -%% Container name used by container runtime +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CONTAINER_NAME, 'container.name'). -%% Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CONTAINER_ID, 'container.id'). -%% The container runtime managing this container +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CONTAINER_RUNTIME, 'container.runtime'). -%% Name of the image the container was built on +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CONTAINER_IMAGE_NAME, 'container.image.name'). -%% Container image tag +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CONTAINER_IMAGE_TAG, 'container.image.tag'). -%% Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DEPLOYMENT_ENVIRONMENT, 'deployment.environment'). -%% A unique identifier representing the device -%% The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DEVICE_ID, 'device.id'). -%% The model identifier for the device -%% It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DEVICE_MODEL_IDENTIFIER, 'device.model.identifier'). -%% The marketing name for the device model -%% It's recommended this value represents a human readable version of the device model rather than a machine readable alternative +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DEVICE_MODEL_NAME, 'device.model.name'). -%% The name of the device manufacturer -%% The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DEVICE_MANUFACTURER, 'device.manufacturer'). -%% The name of the single function that this runtime instance executes -%% This is the name of the function as configured/deployed on the FaaS -%% platform and is usually different from the name of the callback -%% function (which may be stored in the -%% [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) -%% span attributes). -%% -%% For some cloud providers, the above definition is ambiguous. The following -%% definition of function name MUST be used for this attribute -%% (and consequently the span name) for the listed cloud providers/products: -%% -%% * **Azure:** The full name `/`, i.e., function app name -%% followed by a forward slash followed by the function name (this form -%% can also be seen in the resource JSON for the function). -%% This means that a span attribute MUST be used, as an Azure function -%% app can host multiple functions that would usually share -%% a TracerProvider (see also the `faas.id` attribute) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_NAME, 'faas.name'). -%% The unique ID of the single function that this runtime instance executes -%% On some cloud providers, it may not be possible to determine the full ID at startup, -%% so consider setting `faas.id` as a span attribute instead. -%% -%% The exact value to use for `faas.id` depends on the cloud provider: -%% -%% * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). -%% Take care not to use the "invoked ARN" directly but replace any -%% [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) -%% with the resolved function version, as the same runtime instance may be invocable with -%% multiple different aliases. -%% * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) -%% * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) of the invoked function, -%% *not* the function app, having the form -%% `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. -%% This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share -%% a TracerProvider +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_ID, 'faas.id'). -%% The immutable version of the function being executed -%% Depending on the cloud provider and platform, use: -%% -%% * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) -%% (an integer represented as a decimal string). -%% * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) -%% (i.e., the function name plus the revision suffix). -%% * **Google Cloud Functions:** The value of the -%% [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). -%% * **Azure Functions:** Not applicable. Do not set this attribute +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_VERSION, 'faas.version'). -%% The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version -%% * **AWS Lambda:** Use the (full) log stream name +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_INSTANCE, 'faas.instance'). -%% The amount of memory available to the serverless function in MiB -%% It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_MAX_MEMORY, 'faas.max_memory'). -%% Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HOST_ID, 'host.id'). -%% Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HOST_NAME, 'host.name'). -%% Type of host. For Cloud, this must be the machine type +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HOST_TYPE, 'host.type'). -%% The CPU architecture the host system is running on +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HOST_ARCH, 'host.arch'). -%% Name of the VM image or OS install the host was instantiated from +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HOST_IMAGE_NAME, 'host.image.name'). -%% VM image ID. For Cloud, this value is from the provider +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HOST_IMAGE_ID, 'host.image.id'). -%% The version string of the VM image as defined in [Version Attributes](README.md#version-attributes) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HOST_IMAGE_VERSION, 'host.image.version'). -%% The name of the cluster +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_CLUSTER_NAME, 'k8s.cluster.name'). -%% The name of the Node +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_NODE_NAME, 'k8s.node.name'). -%% The UID of the Node +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_NODE_UID, 'k8s.node.uid'). -%% The name of the namespace that the pod is running in +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_NAMESPACE_NAME, 'k8s.namespace.name'). -%% The UID of the Pod +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_POD_UID, 'k8s.pod.uid'). -%% The name of the Pod +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_POD_NAME, 'k8s.pod.name'). -%% The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_CONTAINER_NAME, 'k8s.container.name'). -%% Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_CONTAINER_RESTART_COUNT, 'k8s.container.restart_count'). -%% The UID of the ReplicaSet +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_REPLICASET_UID, 'k8s.replicaset.uid'). -%% The name of the ReplicaSet +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_REPLICASET_NAME, 'k8s.replicaset.name'). -%% The UID of the Deployment +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_DEPLOYMENT_UID, 'k8s.deployment.uid'). -%% The name of the Deployment +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_DEPLOYMENT_NAME, 'k8s.deployment.name'). -%% The UID of the StatefulSet +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_STATEFULSET_UID, 'k8s.statefulset.uid'). -%% The name of the StatefulSet +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_STATEFULSET_NAME, 'k8s.statefulset.name'). -%% The UID of the DaemonSet +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_DAEMONSET_UID, 'k8s.daemonset.uid'). -%% The name of the DaemonSet +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_DAEMONSET_NAME, 'k8s.daemonset.name'). -%% The UID of the Job +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_JOB_UID, 'k8s.job.uid'). -%% The name of the Job +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_JOB_NAME, 'k8s.job.name'). -%% The UID of the CronJob +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_CRONJOB_UID, 'k8s.cronjob.uid'). -%% The name of the CronJob +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(K8S_CRONJOB_NAME, 'k8s.cronjob.name'). -%% The operating system type +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(OS_TYPE, 'os.type'). -%% Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(OS_DESCRIPTION, 'os.description'). -%% Human readable operating system name +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(OS_NAME, 'os.name'). -%% The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(OS_VERSION, 'os.version'). -%% Process identifier (PID) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_PID, 'process.pid'). -%% Parent Process identifier (PID) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_PARENT_PID, 'process.parent_pid'). -%% The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_EXECUTABLE_NAME, 'process.executable.name'). -%% The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_EXECUTABLE_PATH, 'process.executable.path'). -%% The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_COMMAND, 'process.command'). -%% The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_COMMAND_LINE, 'process.command_line'). -%% All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_COMMAND_ARGS, 'process.command_args'). -%% The username of the user that owns the process +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_OWNER, 'process.owner'). -%% The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_RUNTIME_NAME, 'process.runtime.name'). -%% The version of the runtime of this process, as returned by the runtime without modification +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_RUNTIME_VERSION, 'process.runtime.version'). -%% An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PROCESS_RUNTIME_DESCRIPTION, 'process.runtime.description'). -%% Logical name of the service -%% MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(SERVICE_NAME, 'service.name'). -%% A namespace for `service.name` -%% A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(SERVICE_NAMESPACE, 'service.namespace'). -%% The string ID of the service instance -%% MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(SERVICE_INSTANCE_ID, 'service.instance.id'). -%% The version string of the service API or implementation +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(SERVICE_VERSION, 'service.version'). -%% The name of the telemetry SDK as defined above +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(TELEMETRY_SDK_NAME, 'telemetry.sdk.name'). -%% The language of the telemetry SDK +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(TELEMETRY_SDK_LANGUAGE, 'telemetry.sdk.language'). -%% The version string of the telemetry SDK +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(TELEMETRY_SDK_VERSION, 'telemetry.sdk.version'). -%% The version string of the auto instrumentation agent, if used +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(TELEMETRY_AUTO_VERSION, 'telemetry.auto.version'). -%% The name of the web engine +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(WEBENGINE_NAME, 'webengine.name'). -%% The version of the web engine +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(WEBENGINE_VERSION, 'webengine.version'). -%% Additional description of the web engine (e.g. detailed version and edition information) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(WEBENGINE_DESCRIPTION, 'webengine.description'). diff --git a/apps/opentelemetry_semantic_conventions/include/schema_urls.hrl b/apps/opentelemetry_semantic_conventions/include/schema_urls.hrl new file mode 100644 index 00000000..d8db8125 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/schema_urls.hrl @@ -0,0 +1 @@ +-define('V1_27_0', <<"https://opentelemetry.io/schemas/1.27.0">>). diff --git a/apps/opentelemetry_semantic_conventions/include/trace.hrl b/apps/opentelemetry_semantic_conventions/include/trace.hrl index 3824a9eb..841c414f 100644 --- a/apps/opentelemetry_semantic_conventions/include/trace.hrl +++ b/apps/opentelemetry_semantic_conventions/include/trace.hrl @@ -1,509 +1,586 @@ -%% The schema url for telemetry resources +%% WARNING: These macros are deprecated and will be removed in a future release. +%% Migrate to >= v1.27.0 semantic conventions + +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(TRACE_SCHEMA_URL, <<"https://opentelemetry.io/schemas/1.13.0">>). -%% The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable) -%% This may be different from `faas.id` if an alias is involved +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_LAMBDA_INVOKED_ARN, 'aws.lambda.invoked_arn'). -%% The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUDEVENTS_EVENT_ID, 'cloudevents.event_id'). -%% The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUDEVENTS_EVENT_SOURCE, 'cloudevents.event_source'). -%% The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUDEVENTS_EVENT_SPEC_VERSION, 'cloudevents.event_spec_version'). -%% The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUDEVENTS_EVENT_TYPE, 'cloudevents.event_type'). -%% The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CLOUDEVENTS_EVENT_SUBJECT, 'cloudevents.event_subject'). -%% Parent-child Reference type -%% The causal relationship between a child Span and a parent Span +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(OPENTRACING_REF_TYPE, 'opentracing.ref_type'). -%% An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_SYSTEM, 'db.system'). -%% The connection string used to connect to the database. It is recommended to remove embedded credentials +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_CONNECTION_STRING, 'db.connection_string'). -%% Username for accessing the database +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_USER, 'db.user'). -%% The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_JDBC_DRIVER_CLASSNAME, 'db.jdbc.driver_classname'). -%% This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails) -%% In some SQL databases, the database name to be used is called "schema name". In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_NAME, 'db.name'). -%% The database statement being executed -%% The value may be sanitized to exclude sensitive information +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_STATEMENT, 'db.statement'). -%% The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword -%% When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_OPERATION, 'db.operation'). -%% Name of the database host -%% `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_PEER_NAME, 'net.peer.name'). -%% Logical remote port number +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_PEER_PORT, 'net.peer.port'). -%% Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_SOCK_PEER_ADDR, 'net.sock.peer.addr'). -%% Remote socket peer port +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_SOCK_PEER_PORT, 'net.sock.peer.port'). -%% Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_SOCK_FAMILY, 'net.sock.family'). -%% Remote socket peer name +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_SOCK_PEER_NAME, 'net.sock.peer.name'). -%% Transport protocol used. See note below +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_TRANSPORT, 'net.transport'). -%% The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance -%% If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_MSSQL_INSTANCE_NAME, 'db.mssql.instance_name'). -%% The fetch size used for paging, i.e. how many rows will be returned at once +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_CASSANDRA_PAGE_SIZE, 'db.cassandra.page_size'). -%% The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_CASSANDRA_CONSISTENCY_LEVEL, 'db.cassandra.consistency_level'). -%% The name of the primary table that the operation is acting upon, including the keyspace name (if applicable) -%% This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_CASSANDRA_TABLE, 'db.cassandra.table'). -%% Whether or not the query is idempotent +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_CASSANDRA_IDEMPOTENCE, 'db.cassandra.idempotence'). -%% The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT, 'db.cassandra.speculative_execution_count'). -%% The ID of the coordinating node for a query +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_CASSANDRA_COORDINATOR_ID, 'db.cassandra.coordinator.id'). -%% The data center of the coordinating node for a query +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_CASSANDRA_COORDINATOR_DC, 'db.cassandra.coordinator.dc'). -%% The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_REDIS_DATABASE_INDEX, 'db.redis.database_index'). -%% The collection being accessed within the database stated in `db.name` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_MONGODB_COLLECTION, 'db.mongodb.collection'). -%% The name of the primary table that the operation is acting upon, including the database name (if applicable) -%% It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(DB_SQL_TABLE, 'db.sql.table'). -%% The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(EXCEPTION_TYPE, 'exception.type'). -%% The exception message +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(EXCEPTION_MESSAGE, 'exception.message'). -%% A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(EXCEPTION_STACKTRACE, 'exception.stacktrace'). -%% SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span -%% An exception is considered to have escaped (or left) the scope of a span, -%% if that span is ended while the exception is still logically "in flight". -%% This may be actually "in flight" in some languages (e.g. if the exception -%% is passed to a Context manager's `__exit__` method in Python) but will -%% usually be caught at the point of recording the exception in most languages. -%% -%% It is usually not possible to determine at the point where an exception is thrown -%% whether it will escape the scope of a span. -%% However, it is trivial to know that an exception -%% will escape, if one checks for an active exception just before ending the span, -%% as done in the [example above](#recording-an-exception). -%% -%% It follows that an exception may still escape the scope of the span -%% even if the `exception.escaped` attribute was not set or set to false, -%% since the event might have been recorded at a time where it was not -%% clear whether the exception will escape +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(EXCEPTION_ESCAPED, 'exception.escaped'). -%% Type of the trigger which caused this function execution -%% For the server/consumer span on the incoming side, -%% `faas.trigger` MUST be set. -%% -%% Clients invoking FaaS instances usually cannot set `faas.trigger`, -%% since they would typically need to look in the payload to determine -%% the event type. If clients set it, it should be the same as the -%% trigger that corresponding incoming would have (i.e., this has -%% nothing to do with the underlying transport used to make the API -%% call to invoke the lambda, which is often HTTP) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_TRIGGER, 'faas.trigger'). -%% The execution ID of the current function execution +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_EXECUTION, 'faas.execution'). -%% The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_DOCUMENT_COLLECTION, 'faas.document.collection'). -%% Describes the type of the operation that was performed on the data +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_DOCUMENT_OPERATION, 'faas.document.operation'). -%% A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_DOCUMENT_TIME, 'faas.document.time'). -%% The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_DOCUMENT_NAME, 'faas.document.name'). -%% HTTP request method +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_METHOD, 'http.method'). -%% [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_STATUS_CODE, 'http.status_code'). -%% Kind of HTTP protocol used -%% If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_FLAVOR, 'http.flavor'). -%% Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_USER_AGENT, 'http.user_agent'). -%% The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_REQUEST_CONTENT_LENGTH, 'http.request_content_length'). -%% The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_RESPONSE_CONTENT_LENGTH, 'http.response_content_length'). -%% The URI scheme identifying the used protocol +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_SCHEME, 'http.scheme'). -%% The full request target as passed in a HTTP request line or equivalent +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_TARGET, 'http.target'). -%% The matched route (path template in the format used by the respective server framework). See note below -%% 'http.route' MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_ROUTE, 'http.route'). -%% The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)) -%% This is not necessarily the same as `net.sock.peer.addr`, which would -%% identify the network-level peer, which may be a proxy. -%% -%% This attribute should be set when a source of information different -%% from the one used for `net.sock.peer.addr`, is available even if that other -%% source just confirms the same value as `net.sock.peer.addr`. -%% Rationale: For `net.sock.peer.addr`, one typically does not know if it -%% comes from a proxy, reverse proxy, or the actual client. Setting -%% `http.client_ip` when it's the same as `net.sock.peer.addr` means that -%% one is at least somewhat confident that the address is not that of -%% the closest proxy +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_CLIENT_IP, 'http.client_ip'). -%% Name of the local HTTP server that received the request -%% Determined by using the first of the following that applies -%% -%% - The [primary server name](#http-server-definitions) of the matched virtual host. MUST only -%% include host identifier. -%% - Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) -%% if it's sent in absolute-form. -%% - Host identifier of the `Host` header -%% -%% SHOULD NOT be set if only IP address is available and capturing name would require a reverse DNS lookup +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_HOST_NAME, 'net.host.name'). -%% Port of the local HTTP server that received the request -%% Determined by using the first of the following that applies -%% -%% - Port identifier of the [primary server host](#http-server-definitions) of the matched virtual host. -%% - Port identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) -%% if it's sent in absolute-form. -%% - Port identifier of the `Host` header +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_HOST_PORT, 'net.host.port'). -%% Local socket address. Useful in case of a multi-IP host +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_SOCK_HOST_ADDR, 'net.sock.host.addr'). -%% Local socket port number +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_SOCK_HOST_PORT, 'net.sock.host.port'). -%% Application layer protocol used. The value SHOULD be normalized to lowercase +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_APP_PROTOCOL_NAME, 'net.app.protocol.name'). -%% Version of the application layer protocol used. See note below -%% `net.app.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_APP_PROTOCOL_VERSION, 'net.app.protocol.version'). -%% The internet connection type currently being used by the host +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_HOST_CONNECTION_TYPE, 'net.host.connection.type'). -%% This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_HOST_CONNECTION_SUBTYPE, 'net.host.connection.subtype'). -%% The name of the mobile carrier +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_HOST_CARRIER_NAME, 'net.host.carrier.name'). -%% The mobile carrier country code +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_HOST_CARRIER_MCC, 'net.host.carrier.mcc'). -%% The mobile carrier network code +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_HOST_CARRIER_MNC, 'net.host.carrier.mnc'). -%% The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(NET_HOST_CARRIER_ICC, 'net.host.carrier.icc'). -%% A string identifying the messaging system +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_SYSTEM, 'messaging.system'). -%% The message destination name. This might be equal to the span name but is required nevertheless +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_DESTINATION, 'messaging.destination'). -%% The kind of message destination +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_DESTINATION_KIND, 'messaging.destination_kind'). -%% A boolean that is true if the message destination is temporary +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_TEMP_DESTINATION, 'messaging.temp_destination'). -%% The name of the transport protocol +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_PROTOCOL, 'messaging.protocol'). -%% The version of the transport protocol +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_PROTOCOL_VERSION, 'messaging.protocol_version'). -%% Connection string +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_URL, 'messaging.url'). -%% A value used by the messaging system as an identifier for the message, represented as a string +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_MESSAGE_ID, 'messaging.message_id'). -%% The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID" +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_CONVERSATION_ID, 'messaging.conversation_id'). -%% The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES, 'messaging.message_payload_size_bytes'). -%% The compressed size of the message payload in bytes +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES, 'messaging.message_payload_compressed_size_bytes'). -%% A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_TIME, 'faas.time'). -%% A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_CRON, 'faas.cron'). -%% A boolean that is true if the serverless function is executed for the first time (aka cold-start) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_COLDSTART, 'faas.coldstart'). -%% The name of the invoked function -%% SHOULD be equal to the `faas.name` resource attribute of the invoked function +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_INVOKED_NAME, 'faas.invoked_name'). -%% The cloud provider of the invoked function -%% SHOULD be equal to the `cloud.provider` resource attribute of the invoked function +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_INVOKED_PROVIDER, 'faas.invoked_provider'). -%% The cloud region of the invoked function -%% SHOULD be equal to the `cloud.region` resource attribute of the invoked function +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(FAAS_INVOKED_REGION, 'faas.invoked_region'). -%% The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(PEER_SERVICE, 'peer.service'). -%% Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(ENDUSER_ID, 'enduser.id'). -%% Actual/assumed role the client is making the request under extracted from token or application security context +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(ENDUSER_ROLE, 'enduser.role'). -%% Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(ENDUSER_SCOPE, 'enduser.scope'). -%% Current "managed" thread ID (as opposed to OS thread ID) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(THREAD_ID, 'thread.id'). -%% Current thread name +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(THREAD_NAME, 'thread.name'). -%% The method or function name, or equivalent (usually rightmost part of the code unit's name) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CODE_FUNCTION, 'code.function'). -%% The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CODE_NAMESPACE, 'code.namespace'). -%% The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CODE_FILEPATH, 'code.filepath'). -%% The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(CODE_LINENO, 'code.lineno'). -%% Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless -%% `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_URL, 'http.url'). -%% The ordinal number of request re-sending attempt +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(HTTP_RETRY_COUNT, 'http.retry_count'). -%% The value `aws-api` +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RPC_SYSTEM, 'rpc.system'). -%% The name of the service to which a request is made, as returned by the AWS SDK -%% This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RPC_SERVICE, 'rpc.service'). -%% The name of the operation corresponding to the request, as returned by the AWS SDK -%% This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side) +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RPC_METHOD, 'rpc.method'). -%% The keys in the `RequestItems` object field +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_TABLE_NAMES, 'aws.dynamodb.table_names'). -%% The JSON-serialized value of each item in the `ConsumedCapacity` response field +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_CONSUMED_CAPACITY, 'aws.dynamodb.consumed_capacity'). -%% The JSON-serialized value of the `ItemCollectionMetrics` response field +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_ITEM_COLLECTION_METRICS, 'aws.dynamodb.item_collection_metrics'). -%% The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_PROVISIONED_READ_CAPACITY, 'aws.dynamodb.provisioned_read_capacity'). -%% The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY, 'aws.dynamodb.provisioned_write_capacity'). -%% The value of the `ConsistentRead` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_CONSISTENT_READ, 'aws.dynamodb.consistent_read'). -%% The value of the `ProjectionExpression` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_PROJECTION, 'aws.dynamodb.projection'). -%% The value of the `Limit` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_LIMIT, 'aws.dynamodb.limit'). -%% The value of the `AttributesToGet` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_ATTRIBUTES_TO_GET, 'aws.dynamodb.attributes_to_get'). -%% The value of the `IndexName` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_INDEX_NAME, 'aws.dynamodb.index_name'). -%% The value of the `Select` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_SELECT, 'aws.dynamodb.select'). -%% The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES, 'aws.dynamodb.global_secondary_indexes'). -%% The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES, 'aws.dynamodb.local_secondary_indexes'). -%% The value of the `ExclusiveStartTableName` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_EXCLUSIVE_START_TABLE, 'aws.dynamodb.exclusive_start_table'). -%% The the number of items in the `TableNames` response parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_TABLE_COUNT, 'aws.dynamodb.table_count'). -%% The value of the `ScanIndexForward` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_SCAN_FORWARD, 'aws.dynamodb.scan_forward'). -%% The value of the `Segment` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_SEGMENT, 'aws.dynamodb.segment'). -%% The value of the `TotalSegments` request parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_TOTAL_SEGMENTS, 'aws.dynamodb.total_segments'). -%% The value of the `Count` response parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_COUNT, 'aws.dynamodb.count'). -%% The value of the `ScannedCount` response parameter +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_SCANNED_COUNT, 'aws.dynamodb.scanned_count'). -%% The JSON-serialized value of each item in the `AttributeDefinitions` request field +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, 'aws.dynamodb.attribute_definitions'). -%% The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES, 'aws.dynamodb.global_secondary_index_updates'). -%% The name of the operation being executed +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(GRAPHQL_OPERATION_NAME, 'graphql.operation.name'). -%% The type of the operation being executed +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(GRAPHQL_OPERATION_TYPE, 'graphql.operation.type'). -%% The GraphQL document being executed -%% The value may be sanitized to exclude sensitive information +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(GRAPHQL_DOCUMENT, 'graphql.document'). -%% A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_OPERATION, 'messaging.operation'). -%% The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_CONSUMER_ID, 'messaging.consumer_id'). -%% RabbitMQ message routing key +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_RABBITMQ_ROUTING_KEY, 'messaging.rabbitmq.routing_key'). -%% Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set -%% If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_KAFKA_MESSAGE_KEY, 'messaging.kafka.message_key'). -%% Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_KAFKA_CONSUMER_GROUP, 'messaging.kafka.consumer_group'). -%% Client Id for the Consumer or Producer that is handling the message +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_KAFKA_CLIENT_ID, 'messaging.kafka.client_id'). -%% Partition the message is sent to +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_KAFKA_PARTITION, 'messaging.kafka.partition'). -%% A boolean that is true if the message is a tombstone +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_KAFKA_TOMBSTONE, 'messaging.kafka.tombstone'). -%% Namespace of RocketMQ resources, resources in different namespaces are individual +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_ROCKETMQ_NAMESPACE, 'messaging.rocketmq.namespace'). -%% Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_ROCKETMQ_CLIENT_GROUP, 'messaging.rocketmq.client_group'). -%% The unique identifier for each client +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_ROCKETMQ_CLIENT_ID, 'messaging.rocketmq.client_id'). -%% Type of message +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_ROCKETMQ_MESSAGE_TYPE, 'messaging.rocketmq.message_type'). -%% The secondary classifier of message besides topic +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_ROCKETMQ_MESSAGE_TAG, 'messaging.rocketmq.message_tag'). -%% Key(s) of message, another way to mark message besides message id +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_ROCKETMQ_MESSAGE_KEYS, 'messaging.rocketmq.message_keys'). -%% Model of message consumption. This only applies to consumer spans +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGING_ROCKETMQ_CONSUMPTION_MODEL, 'messaging.rocketmq.consumption_model'). -%% The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RPC_GRPC_STATUS_CODE, 'rpc.grpc.status_code'). -%% Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RPC_JSONRPC_VERSION, 'rpc.jsonrpc.version'). -%% `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RPC_JSONRPC_REQUEST_ID, 'rpc.jsonrpc.request_id'). -%% `error.code` property of response if it is an error response +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RPC_JSONRPC_ERROR_CODE, 'rpc.jsonrpc.error_code'). -%% `error.message` property of response if it is an error response +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(RPC_JSONRPC_ERROR_MESSAGE, 'rpc.jsonrpc.error_message'). -%% Whether this is a received or sent message +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGE_TYPE, 'message.type'). -%% MUST be calculated as two different counters starting from `1` one for sent messages and one for received message -%% This way we guarantee that the values will be consistent between different implementations +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGE_ID, 'message.id'). -%% Compressed size of the message in bytes +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGE_COMPRESSED_SIZE, 'message.compressed_size'). -%% Uncompressed size of the message in bytes +%% @deprecated Migrate to >= v1.27.0 semantic conventions +%% Deprecated Migrate to >= v1.27.0 semantic conventions -define(MESSAGE_UNCOMPRESSED_SIZE, 'message.uncompressed_size'). diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/client_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/client_attributes.ex new file mode 100644 index 00000000..bcedc924 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/client_attributes.ex @@ -0,0 +1,78 @@ +defmodule OpenTelemetry.SemConv.ClientAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Client attributes. + """ + + @doc """ + Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + When observed from the server side, and when communicating through an intermediary, `client.address` **SHOULD** represent the client address behind any intermediaries, for example proxies, if it's available. + + ### Examples + + ``` + ["client.example.com", "10.1.2.80", "/tmp/my.sock"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ClientAttributes.client_address() + :"client.address" + + ### Erlang + + ```erlang + ?CLIENT_ADDRESS. + 'client.address' + ``` + + + """ + @spec client_address :: :"client.address" + def client_address do + :"client.address" + end + + @doc """ + Client port number. + ### Value type + + Value must be of type `integer()`. + ### Notes + + When observed from the server side, and when communicating through an intermediary, `client.port` **SHOULD** represent the client port behind any intermediaries, for example proxies, if it's available. + + ### Examples + + ``` + [65123] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ClientAttributes.client_port() + :"client.port" + + ### Erlang + + ```erlang + ?CLIENT_PORT. + 'client.port' + ``` + + + """ + @spec client_port :: :"client.port" + def client_port do + :"client.port" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex new file mode 100644 index 00000000..be7cbd23 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex @@ -0,0 +1,89 @@ +defmodule OpenTelemetry.SemConv.ErrorAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Error attributes. + """ + + @typedoc """ + Describes a class of error the operation ended with. + + + ### Enum Values + * `:other` - A fallback error value to be used when the instrumentation doesn't define a custom value. + + """ + @type error_type_values() :: %{ + :other => :_OTHER + } + @doc """ + Describes a class of error the operation ended with. + + + ### Notes + + The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality. + + When `error.type` is set to a type (e.g., an exception type), its + canonical class name identifying the type within the artifact **SHOULD** be used. + + Instrumentations **SHOULD** document the list of errors they report. + + The cardinality of `error.type` within one instrumentation library **SHOULD** be low. + Telemetry consumers that aggregate data from multiple instrumentation libraries and applications + should be prepared for `error.type` to have high cardinality at query time when no + additional filters are applied. + + If the operation has completed successfully, instrumentations **SHOULD** **NOT** set `error.type`. + + If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), + it's RECOMMENDED to: + + * Use a domain-specific attribute + * Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. + + ### Examples + + ``` + ["timeout", "java.net.UnknownHostException", "server_certificate_invalid", "500"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ErrorAttributes.error_type() + :"error.type" + + iex> OpenTelemetry.SemConv.ErrorAttributes.error_type_values().other + :_OTHER + + iex> %{OpenTelemetry.SemConv.ErrorAttributes.error_type() => OpenTelemetry.SemConv.ErrorAttributes.error_type_values().other} + %{:"error.type" => :_OTHER} + + ### Erlang + + ```erlang + ?ERROR_TYPE. + 'error.type' + + ?ERROR_TYPE_VALUES_OTHER. + '_OTHER' + + \#{?ERROR_TYPE => ?ERROR_TYPE_VALUES_OTHER}. + \#{'error.type' => '_OTHER'} + ``` + + + """ + @spec error_type :: :"error.type" + def error_type do + :"error.type" + end + + @spec error_type_values() :: error_type_values() + def error_type_values() do + %{ + :other => :_OTHER + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex new file mode 100644 index 00000000..7bb01402 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex @@ -0,0 +1,150 @@ +defmodule OpenTelemetry.SemConv.ExceptionAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Exception attributes. + """ + + @doc """ + SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. + + ### Value type + + Value must be of type `boolean()`. + ### Notes + + An exception is considered to have escaped (or left) the scope of a span, + if that span is ended while the exception is still logically "in flight". + This may be actually "in flight" in some languages (e.g. if the exception + is passed to a Context manager's `__exit__` method in Python) but will + usually be caught at the point of recording the exception in most languages. + + It is usually not possible to determine at the point where an exception is thrown + whether it will escape the scope of a span. + However, it is trivial to know that an exception + will escape, if one checks for an active exception just before ending the span, + as done in the [example for recording span exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception). + + It follows that an exception may still escape the scope of the span + even if the `exception.escaped` attribute was not set or set to false, + since the event might have been recorded at a time where it was not + clear whether the exception will escape. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ExceptionAttributes.exception_escaped() + :"exception.escaped" + + ### Erlang + + ```erlang + ?EXCEPTION_ESCAPED. + 'exception.escaped' + ``` + + + """ + @spec exception_escaped :: :"exception.escaped" + def exception_escaped do + :"exception.escaped" + end + + @doc """ + The exception message. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Division by zero", "Can't convert 'int' object to str implicitly"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ExceptionAttributes.exception_message() + :"exception.message" + + ### Erlang + + ```erlang + ?EXCEPTION_MESSAGE. + 'exception.message' + ``` + + + """ + @spec exception_message :: :"exception.message" + def exception_message do + :"exception.message" + end + + @doc """ + A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5) + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ExceptionAttributes.exception_stacktrace() + :"exception.stacktrace" + + ### Erlang + + ```erlang + ?EXCEPTION_STACKTRACE. + 'exception.stacktrace' + ``` + + + """ + @spec exception_stacktrace :: :"exception.stacktrace" + def exception_stacktrace do + :"exception.stacktrace" + end + + @doc """ + The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["java.net.ConnectException", "OSError"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ExceptionAttributes.exception_type() + :"exception.type" + + ### Erlang + + ```erlang + ?EXCEPTION_TYPE. + 'exception.type' + ``` + + + """ + @spec exception_type :: :"exception.type" + def exception_type do + :"exception.type" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/http_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/http_attributes.ex new file mode 100644 index 00000000..2264b2a9 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/http_attributes.ex @@ -0,0 +1,325 @@ +defmodule OpenTelemetry.SemConv.HTTPAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for HTTP attributes. + """ + + @doc """ + HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information. + The `User-Agent` header is already captured in the `user_agent.original` attribute. Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. + The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. + + ### Examples + + ``` + ["http.request.header.content-type=[\"application/json\"]", "http.request.header.x-forwarded-for=[\"1.2.3.4\", \"1.2.3.5\"]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.HTTPAttributes.http_request_header() + :"http.request.header" + + ### Erlang + + ```erlang + ?HTTP_REQUEST_HEADER. + 'http.request.header' + ``` + + + """ + @spec http_request_header :: :"http.request.header" + def http_request_header do + :"http.request.header" + end + + @typedoc """ + HTTP request method. + + ### Enum Values + * `:connect` - CONNECT method. + * `:delete` - DELETE method. + * `:get` - GET method. + * `:head` - HEAD method. + * `:options` - OPTIONS method. + * `:patch` - PATCH method. + * `:post` - POST method. + * `:put` - PUT method. + * `:trace` - TRACE method. + * `:other` - Any HTTP method that the instrumentation has no prior knowledge of. + """ + @type http_request_method_values() :: %{ + :connect => :CONNECT, + :delete => :DELETE, + :get => :GET, + :head => :HEAD, + :options => :OPTIONS, + :patch => :PATCH, + :post => :POST, + :put => :PUT, + :trace => :TRACE, + :other => :_OTHER + } + @doc """ + HTTP request method. + + ### Notes + + HTTP request method value **SHOULD** be "known" to the instrumentation. + By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) + and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). + + If the HTTP request method is not known to instrumentation, it **MUST** set the `http.request.method` attribute to `_OTHER`. + + If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it **MUST** provide a way to override + the list of known HTTP methods. If this override is done via environment variable, then the environment variable **MUST** be named + OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods + (this list **MUST** be a full override of the default known method, it is not a list of known methods in addition to the defaults). + + HTTP method names are case-sensitive and `http.request.method` attribute value **MUST** match a known HTTP method name exactly. + Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, **SHOULD** populate a canonical equivalent. + Tracing instrumentations that do so, **MUST** also set `http.request.method_original` to the original value. + + ### Examples + + ``` + ["GET", "POST", "HEAD"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.HTTPAttributes.http_request_method() + :"http.request.method" + + iex> OpenTelemetry.SemConv.HTTPAttributes.http_request_method_values().connect + :CONNECT + + iex> %{OpenTelemetry.SemConv.HTTPAttributes.http_request_method() => OpenTelemetry.SemConv.HTTPAttributes.http_request_method_values().connect} + %{:"http.request.method" => :CONNECT} + + ### Erlang + + ```erlang + ?HTTP_REQUEST_METHOD. + 'http.request.method' + + ?HTTP_REQUEST_METHOD_VALUES_CONNECT. + 'CONNECT' + + \#{?HTTP_REQUEST_METHOD => ?HTTP_REQUEST_METHOD_VALUES_CONNECT}. + \#{'http.request.method' => 'CONNECT'} + ``` + + + """ + @spec http_request_method :: :"http.request.method" + def http_request_method do + :"http.request.method" + end + + @spec http_request_method_values() :: http_request_method_values() + def http_request_method_values() do + %{ + :connect => :CONNECT, + :delete => :DELETE, + :get => :GET, + :head => :HEAD, + :options => :OPTIONS, + :patch => :PATCH, + :post => :POST, + :put => :PUT, + :trace => :TRACE, + :other => :_OTHER + } + end + + @doc """ + Original HTTP method sent by the client in the request line. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["GeT", "ACL", "foo"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.HTTPAttributes.http_request_method_original() + :"http.request.method_original" + + ### Erlang + + ```erlang + ?HTTP_REQUEST_METHOD_ORIGINAL. + 'http.request.method_original' + ``` + + + """ + @spec http_request_method_original :: :"http.request.method_original" + def http_request_method_original do + :"http.request.method_original" + end + + @doc """ + The ordinal number of request resending attempt (for any reason, including redirects). + + ### Value type + + Value must be of type `integer()`. + ### Notes + + The resend count **SHOULD** be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other). + + ### Examples + + ``` + 3 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.HTTPAttributes.http_request_resend_count() + :"http.request.resend_count" + + ### Erlang + + ```erlang + ?HTTP_REQUEST_RESEND_COUNT. + 'http.request.resend_count' + ``` + + + """ + @spec http_request_resend_count :: :"http.request.resend_count" + def http_request_resend_count do + :"http.request.resend_count" + end + + @doc """ + HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information. + Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. + The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. + + ### Examples + + ``` + ["http.response.header.content-type=[\"application/json\"]", "http.response.header.my-custom-header=[\"abc\", \"def\"]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.HTTPAttributes.http_response_header() + :"http.response.header" + + ### Erlang + + ```erlang + ?HTTP_RESPONSE_HEADER. + 'http.response.header' + ``` + + + """ + @spec http_response_header :: :"http.response.header" + def http_response_header do + :"http.response.header" + end + + @doc """ + [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [200] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.HTTPAttributes.http_response_status_code() + :"http.response.status_code" + + ### Erlang + + ```erlang + ?HTTP_RESPONSE_STATUS_CODE. + 'http.response.status_code' + ``` + + + """ + @spec http_response_status_code :: :"http.response.status_code" + def http_response_status_code do + :"http.response.status_code" + end + + @doc """ + The matched route, that is, the path template in the format used by the respective server framework. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + MUST **NOT** be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can **NOT** substitute it. + **SHOULD** include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. + + ### Examples + + ``` + ["/users/:userID?", "{controller}/{action}/{id?}"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.HTTPAttributes.http_route() + :"http.route" + + ### Erlang + + ```erlang + ?HTTP_ROUTE. + 'http.route' + ``` + + + """ + @spec http_route :: :"http.route" + def http_route do + :"http.route" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex new file mode 100644 index 00000000..75aa42f4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex @@ -0,0 +1,349 @@ +defmodule OpenTelemetry.SemConv.NetworkAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Network attributes. + """ + + @doc """ + Local address of the network connection - IP address or Unix domain socket name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["10.1.2.80", "/tmp/my.sock"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_local_address() + :"network.local.address" + + ### Erlang + + ```erlang + ?NETWORK_LOCAL_ADDRESS. + 'network.local.address' + ``` + + + """ + @spec network_local_address :: :"network.local.address" + def network_local_address do + :"network.local.address" + end + + @doc """ + Local port number of the network connection. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [65123] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_local_port() + :"network.local.port" + + ### Erlang + + ```erlang + ?NETWORK_LOCAL_PORT. + 'network.local.port' + ``` + + + """ + @spec network_local_port :: :"network.local.port" + def network_local_port do + :"network.local.port" + end + + @doc """ + Peer address of the network connection - IP address or Unix domain socket name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["10.1.2.80", "/tmp/my.sock"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_peer_address() + :"network.peer.address" + + ### Erlang + + ```erlang + ?NETWORK_PEER_ADDRESS. + 'network.peer.address' + ``` + + + """ + @spec network_peer_address :: :"network.peer.address" + def network_peer_address do + :"network.peer.address" + end + + @doc """ + Peer port number of the network connection. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [65123] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_peer_port() + :"network.peer.port" + + ### Erlang + + ```erlang + ?NETWORK_PEER_PORT. + 'network.peer.port' + ``` + + + """ + @spec network_peer_port :: :"network.peer.port" + def network_peer_port do + :"network.peer.port" + end + + @doc """ + [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The value **SHOULD** be normalized to lowercase. + ### Examples + + ``` + ["amqp", "http", "mqtt"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_protocol_name() + :"network.protocol.name" + + ### Erlang + + ```erlang + ?NETWORK_PROTOCOL_NAME. + 'network.protocol.name' + ``` + + + """ + @spec network_protocol_name :: :"network.protocol.name" + def network_protocol_name do + :"network.protocol.name" + end + + @doc """ + The actual version of the protocol used for network communication. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute **SHOULD** be set to the negotiated version. If the actual protocol version is not known, this attribute **SHOULD** **NOT** be set. + + ### Examples + + ``` + ["1.1", "2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_protocol_version() + :"network.protocol.version" + + ### Erlang + + ```erlang + ?NETWORK_PROTOCOL_VERSION. + 'network.protocol.version' + ``` + + + """ + @spec network_protocol_version :: :"network.protocol.version" + def network_protocol_version do + :"network.protocol.version" + end + + @typedoc """ + [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). + + + ### Enum Values + * `:tcp` - TCP + * `:udp` - UDP + * `:pipe` - Named or anonymous pipe. + * `:unix` - Unix domain socket + * `:quic` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - QUIC + """ + @type network_transport_values() :: %{ + :tcp => :tcp, + :udp => :udp, + :pipe => :pipe, + :unix => :unix, + :quic => :quic + } + @doc """ + [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). + + + ### Notes + + The value **SHOULD** be normalized to lowercase. + + Consider always setting the transport when setting a port number, since + a port number is ambiguous without knowing the transport. For example + different processes could be listening on TCP port 12345 and UDP port 12345. + + ### Examples + + ``` + ["tcp", "udp"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_transport() + :"network.transport" + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_transport_values().tcp + :tcp + + iex> %{OpenTelemetry.SemConv.NetworkAttributes.network_transport() => OpenTelemetry.SemConv.NetworkAttributes.network_transport_values().tcp} + %{:"network.transport" => :tcp} + + ### Erlang + + ```erlang + ?NETWORK_TRANSPORT. + 'network.transport' + + ?NETWORK_TRANSPORT_VALUES_TCP. + 'tcp' + + \#{?NETWORK_TRANSPORT => ?NETWORK_TRANSPORT_VALUES_TCP}. + \#{'network.transport' => 'tcp'} + ``` + + + """ + @spec network_transport :: :"network.transport" + def network_transport do + :"network.transport" + end + + @spec network_transport_values() :: network_transport_values() + def network_transport_values() do + %{ + :tcp => :tcp, + :udp => :udp, + :pipe => :pipe, + :unix => :unix, + :quic => :quic + } + end + + @typedoc """ + [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. + + ### Enum Values + * `:ipv4` - IPv4 + * `:ipv6` - IPv6 + """ + @type network_type_values() :: %{ + :ipv4 => :ipv4, + :ipv6 => :ipv6 + } + @doc """ + [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. + + ### Notes + + The value **SHOULD** be normalized to lowercase. + ### Examples + + ``` + ["ipv4", "ipv6"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_type() + :"network.type" + + iex> OpenTelemetry.SemConv.NetworkAttributes.network_type_values().ipv4 + :ipv4 + + iex> %{OpenTelemetry.SemConv.NetworkAttributes.network_type() => OpenTelemetry.SemConv.NetworkAttributes.network_type_values().ipv4} + %{:"network.type" => :ipv4} + + ### Erlang + + ```erlang + ?NETWORK_TYPE. + 'network.type' + + ?NETWORK_TYPE_VALUES_IPV4. + 'ipv4' + + \#{?NETWORK_TYPE => ?NETWORK_TYPE_VALUES_IPV4}. + \#{'network.type' => 'ipv4'} + ``` + + + """ + @spec network_type :: :"network.type" + def network_type do + :"network.type" + end + + @spec network_type_values() :: network_type_values() + def network_type_values() do + %{ + :ipv4 => :ipv4, + :ipv6 => :ipv6 + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/otel_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/otel_attributes.ex new file mode 100644 index 00000000..6f07f4a1 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/otel_attributes.ex @@ -0,0 +1,158 @@ +defmodule OpenTelemetry.SemConv.OtelAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Otel attributes. + """ + + @doc """ + The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["io.opentelemetry.contrib.mongodb"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.OtelAttributes.otel_scope_name() + :"otel.scope.name" + + ### Erlang + + ```erlang + ?OTEL_SCOPE_NAME. + 'otel.scope.name' + ``` + + + """ + @spec otel_scope_name :: :"otel.scope.name" + def otel_scope_name do + :"otel.scope.name" + end + + @doc """ + The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1.0.0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.OtelAttributes.otel_scope_version() + :"otel.scope.version" + + ### Erlang + + ```erlang + ?OTEL_SCOPE_VERSION. + 'otel.scope.version' + ``` + + + """ + @spec otel_scope_version :: :"otel.scope.version" + def otel_scope_version do + :"otel.scope.version" + end + + @typedoc """ + Name of the code, either "OK" or "ERROR". **MUST** **NOT** be set if the status code is UNSET. + + ### Enum Values + * `:ok` - The operation has been validated by an Application developer or Operator to have completed successfully. + * `:error` - The operation contains an error. + """ + @type otel_status_code_values() :: %{ + :ok => :OK, + :error => :ERROR + } + @doc """ + Name of the code, either "OK" or "ERROR". **MUST** **NOT** be set if the status code is UNSET. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.OtelAttributes.otel_status_code() + :"otel.status_code" + + iex> OpenTelemetry.SemConv.OtelAttributes.otel_status_code_values().ok + :OK + + iex> %{OpenTelemetry.SemConv.OtelAttributes.otel_status_code() => OpenTelemetry.SemConv.OtelAttributes.otel_status_code_values().ok} + %{:"otel.status_code" => :OK} + + ### Erlang + + ```erlang + ?OTEL_STATUS_CODE. + 'otel.status_code' + + ?OTEL_STATUS_CODE_VALUES_OK. + 'OK' + + \#{?OTEL_STATUS_CODE => ?OTEL_STATUS_CODE_VALUES_OK}. + \#{'otel.status_code' => 'OK'} + ``` + + + """ + @spec otel_status_code :: :"otel.status_code" + def otel_status_code do + :"otel.status_code" + end + + @spec otel_status_code_values() :: otel_status_code_values() + def otel_status_code_values() do + %{ + :ok => :OK, + :error => :ERROR + } + end + + @doc """ + Description of the Status if it has a value, otherwise not set. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["resource not found"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.OtelAttributes.otel_status_description() + :"otel.status_description" + + ### Erlang + + ```erlang + ?OTEL_STATUS_DESCRIPTION. + 'otel.status_description' + ``` + + + """ + @spec otel_status_description :: :"otel.status_description" + def otel_status_description do + :"otel.status_description" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/server_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/server_attributes.ex new file mode 100644 index 00000000..65bf7803 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/server_attributes.ex @@ -0,0 +1,78 @@ +defmodule OpenTelemetry.SemConv.ServerAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Server attributes. + """ + + @doc """ + Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available. + + ### Examples + + ``` + ["example.com", "10.1.2.80", "/tmp/my.sock"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ServerAttributes.server_address() + :"server.address" + + ### Erlang + + ```erlang + ?SERVER_ADDRESS. + 'server.address' + ``` + + + """ + @spec server_address :: :"server.address" + def server_address do + :"server.address" + end + + @doc """ + Server port number. + ### Value type + + Value must be of type `integer()`. + ### Notes + + When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available. + + ### Examples + + ``` + [80, 8080, 443] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ServerAttributes.server_port() + :"server.port" + + ### Erlang + + ```erlang + ?SERVER_PORT. + 'server.port' + ``` + + + """ + @spec server_port :: :"server.port" + def server_port do + :"server.port" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/service_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/service_attributes.ex new file mode 100644 index 00000000..6605df53 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/service_attributes.ex @@ -0,0 +1,76 @@ +defmodule OpenTelemetry.SemConv.ServiceAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Service attributes. + """ + + @doc """ + Logical name of the service. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs **MUST** fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value **MUST** be set to `unknown_service`. + + ### Examples + + ``` + ["shoppingcart"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ServiceAttributes.service_name() + :"service.name" + + ### Erlang + + ```erlang + ?SERVICE_NAME. + 'service.name' + ``` + + + """ + @spec service_name :: :"service.name" + def service_name do + :"service.name" + end + + @doc """ + The version string of the service API or implementation. The format is not defined by these conventions. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2.0.0", "a01dbef8a"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ServiceAttributes.service_version() + :"service.version" + + ### Erlang + + ```erlang + ?SERVICE_VERSION. + 'service.version' + ``` + + + """ + @spec service_version :: :"service.version" + def service_version do + :"service.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/telemetry_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/telemetry_attributes.ex new file mode 100644 index 00000000..32c76e32 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/telemetry_attributes.ex @@ -0,0 +1,169 @@ +defmodule OpenTelemetry.SemConv.TelemetryAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Telemetry attributes. + """ + + @typedoc """ + The language of the telemetry SDK. + + + ### Enum Values + * `:cpp` + * `:dotnet` + * `:erlang` + * `:go` + * `:java` + * `:nodejs` + * `:php` + * `:python` + * `:ruby` + * `:rust` + * `:swift` + * `:webjs` + """ + @type telemetry_sdk_language_values() :: %{ + :cpp => :cpp, + :dotnet => :dotnet, + :erlang => :erlang, + :go => :go, + :java => :java, + :nodejs => :nodejs, + :php => :php, + :python => :python, + :ruby => :ruby, + :rust => :rust, + :swift => :swift, + :webjs => :webjs + } + @doc """ + The language of the telemetry SDK. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.TelemetryAttributes.telemetry_sdk_language() + :"telemetry.sdk.language" + + iex> OpenTelemetry.SemConv.TelemetryAttributes.telemetry_sdk_language_values().cpp + :cpp + + iex> %{OpenTelemetry.SemConv.TelemetryAttributes.telemetry_sdk_language() => OpenTelemetry.SemConv.TelemetryAttributes.telemetry_sdk_language_values().cpp} + %{:"telemetry.sdk.language" => :cpp} + + ### Erlang + + ```erlang + ?TELEMETRY_SDK_LANGUAGE. + 'telemetry.sdk.language' + + ?TELEMETRY_SDK_LANGUAGE_VALUES_CPP. + 'cpp' + + \#{?TELEMETRY_SDK_LANGUAGE => ?TELEMETRY_SDK_LANGUAGE_VALUES_CPP}. + \#{'telemetry.sdk.language' => 'cpp'} + ``` + + + """ + @spec telemetry_sdk_language :: :"telemetry.sdk.language" + def telemetry_sdk_language do + :"telemetry.sdk.language" + end + + @spec telemetry_sdk_language_values() :: telemetry_sdk_language_values() + def telemetry_sdk_language_values() do + %{ + :cpp => :cpp, + :dotnet => :dotnet, + :erlang => :erlang, + :go => :go, + :java => :java, + :nodejs => :nodejs, + :php => :php, + :python => :python, + :ruby => :ruby, + :rust => :rust, + :swift => :swift, + :webjs => :webjs + } + end + + @doc """ + The name of the telemetry SDK as defined above. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The OpenTelemetry SDK **MUST** set the `telemetry.sdk.name` attribute to `opentelemetry`. + If another SDK, like a fork or a vendor-provided implementation, is used, this SDK **MUST** set the + `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point + or another suitable identifier depending on the language. + The identifier `opentelemetry` is reserved and **MUST** **NOT** be used in this case. + All custom identifiers **SHOULD** be stable across different versions of an implementation. + + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.TelemetryAttributes.telemetry_sdk_name() + :"telemetry.sdk.name" + + ### Erlang + + ```erlang + ?TELEMETRY_SDK_NAME. + 'telemetry.sdk.name' + ``` + + + """ + @spec telemetry_sdk_name :: :"telemetry.sdk.name" + def telemetry_sdk_name do + :"telemetry.sdk.name" + end + + @doc """ + The version string of the telemetry SDK. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1.2.3"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.TelemetryAttributes.telemetry_sdk_version() + :"telemetry.sdk.version" + + ### Erlang + + ```erlang + ?TELEMETRY_SDK_VERSION. + 'telemetry.sdk.version' + ``` + + + """ + @spec telemetry_sdk_version :: :"telemetry.sdk.version" + def telemetry_sdk_version do + :"telemetry.sdk.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex new file mode 100644 index 00000000..a5fa0b6c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex @@ -0,0 +1,184 @@ +defmodule OpenTelemetry.SemConv.URLAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for URL attributes. + """ + + @doc """ + The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["SemConv"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.URLAttributes.url_fragment() + :"url.fragment" + + ### Erlang + + ```erlang + ?URL_FRAGMENT. + 'url.fragment' + ``` + + + """ + @spec url_fragment :: :"url.fragment" + def url_fragment do + :"url.fragment" + end + + @doc """ + Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it **SHOULD** be included nevertheless. + `url.full` **MUST** **NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`. + `url.full` **SHOULD** capture the absolute URL when it is available (or can be reconstructed). Sensitive content provided in `url.full` **SHOULD** be scrubbed when instrumentations can identify it. + + ### Examples + + ``` + ["https://www.foo.bar/search?q=OpenTelemetry#SemConv", "//localhost"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.URLAttributes.url_full() + :"url.full" + + ### Erlang + + ```erlang + ?URL_FULL. + 'url.full' + ``` + + + """ + @spec url_full :: :"url.full" + def url_full do + :"url.full" + end + + @doc """ + The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Sensitive content provided in `url.path` **SHOULD** be scrubbed when instrumentations can identify it. + + ### Examples + + ``` + ["/search"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.URLAttributes.url_path() + :"url.path" + + ### Erlang + + ```erlang + ?URL_PATH. + 'url.path' + ``` + + + """ + @spec url_path :: :"url.path" + def url_path do + :"url.path" + end + + @doc """ + The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Sensitive content provided in `url.query` **SHOULD** be scrubbed when instrumentations can identify it. + + ### Examples + + ``` + ["q=OpenTelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.URLAttributes.url_query() + :"url.query" + + ### Erlang + + ```erlang + ?URL_QUERY. + 'url.query' + ``` + + + """ + @spec url_query :: :"url.query" + def url_query do + :"url.query" + end + + @doc """ + The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["https", "ftp", "telnet"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.URLAttributes.url_scheme() + :"url.scheme" + + ### Erlang + + ```erlang + ?URL_SCHEME. + 'url.scheme' + ``` + + + """ + @spec url_scheme :: :"url.scheme" + def url_scheme do + :"url.scheme" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/user_agent_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/user_agent_attributes.ex new file mode 100644 index 00000000..70106c8b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/user_agent_attributes.ex @@ -0,0 +1,39 @@ +defmodule OpenTelemetry.SemConv.UserAgentAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for User_Agent attributes. + """ + + @doc """ + Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["CERN-LineMode/2.15 libwww/2.17b3", "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1", "YourApp/1.0.0 grpc-java-okhttp/1.27.2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.UserAgentAttributes.user_agent_original() + :"user_agent.original" + + ### Erlang + + ```erlang + ?USER_AGENT_ORIGINAL. + 'user_agent.original' + ``` + + + """ + @spec user_agent_original :: :"user_agent.original" + def user_agent_original do + :"user_agent.original" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex new file mode 100644 index 00000000..e7b7ce2c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex @@ -0,0 +1,107 @@ +defmodule OpenTelemetry.SemConv.Incubating.AndroidAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Android attributes. + """ + + @doc """ + Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["33", "32"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_os_api_level() + :"android.os.api_level" + + ### Erlang + + ```erlang + ?ANDROID_OS_API_LEVEL. + 'android.os.api_level' + ``` + + + """ + @spec android_os_api_level :: :"android.os.api_level" + def android_os_api_level do + :"android.os.api_level" + end + + @typedoc """ + Deprecated use the `device.app.lifecycle` event definition including `android.state` as a payload field instead. + + + ### Enum Values + * `:created` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time. + + * `:background` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state. + + * `:foreground` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states. + + """ + @type android_state_values() :: %{ + :created => :created, + :background => :background, + :foreground => :foreground + } + @doc """ + Deprecated use the `device.app.lifecycle` event definition including `android.state` as a payload field instead. + + + ### Notes + + The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_state() + :"android.state" + + iex> OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_state_values().created + :created + + iex> %{OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_state() => OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_state_values().created} + %{:"android.state" => :created} + + ### Erlang + + ```erlang + ?ANDROID_STATE. + 'android.state' + + ?ANDROID_STATE_VALUES_CREATED. + 'created' + + \#{?ANDROID_STATE => ?ANDROID_STATE_VALUES_CREATED}. + \#{'android.state' => 'created'} + ``` + + + """ + @spec android_state :: :"android.state" + def android_state do + :"android.state" + end + + @spec android_state_values() :: android_state_values() + def android_state_values() do + %{ + :created => :created, + :background => :background, + :foreground => :foreground + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/artifact_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/artifact_attributes.ex new file mode 100644 index 00000000..dcabd888 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/artifact_attributes.ex @@ -0,0 +1,255 @@ +defmodule OpenTelemetry.SemConv.Incubating.ArtifactAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Artifact attributes. + """ + + @doc """ + The provenance filename of the built attestation which directly relates to the build artifact filename. This filename **SHOULD** accompany the artifact at publish time. See the [SLSA Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) specification for more information. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["golang-binary-amd64-v0.1.0.attestation", "docker-image-amd64-v0.1.0.intoto.json1", "release-1.tar.gz.attestation", "file-name-package.tar.gz.intoto.json1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ArtifactAttributes.artifact_attestation_filename() + :"artifact.attestation.filename" + + ### Erlang + + ```erlang + ?ARTIFACT_ATTESTATION_FILENAME. + 'artifact.attestation.filename' + ``` + + + """ + @spec artifact_attestation_filename :: :"artifact.attestation.filename" + def artifact_attestation_filename do + :"artifact.attestation.filename" + end + + @doc """ + The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the software attestation space also refer to this as the [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ArtifactAttributes.artifact_attestation_hash() + :"artifact.attestation.hash" + + ### Erlang + + ```erlang + ?ARTIFACT_ATTESTATION_HASH. + 'artifact.attestation.hash' + ``` + + + """ + @spec artifact_attestation_hash :: :"artifact.attestation.hash" + def artifact_attestation_hash do + :"artifact.attestation.hash" + end + + @doc """ + The id of the build [software attestation](https://slsa.dev/attestation-model). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["123"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ArtifactAttributes.artifact_attestation_id() + :"artifact.attestation.id" + + ### Erlang + + ```erlang + ?ARTIFACT_ATTESTATION_ID. + 'artifact.attestation.id' + ``` + + + """ + @spec artifact_attestation_id :: :"artifact.attestation.id" + def artifact_attestation_id do + :"artifact.attestation.id" + end + + @doc """ + The human readable file name of the artifact, typically generated during build and release processes. Often includes the package name and version in the file name. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This file name can also act as the [Package Name](https://slsa.dev/spec/v1.0/terminology#package-model) + in cases where the package ecosystem maps accordingly. + Additionally, the artifact [can be published](https://slsa.dev/spec/v1.0/terminology#software-supply-chain) + for others, but that is not a guarantee. + + ### Examples + + ``` + ["golang-binary-amd64-v0.1.0", "docker-image-amd64-v0.1.0", "release-1.tar.gz", "file-name-package.tar.gz"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ArtifactAttributes.artifact_filename() + :"artifact.filename" + + ### Erlang + + ```erlang + ?ARTIFACT_FILENAME. + 'artifact.filename' + ``` + + + """ + @spec artifact_filename :: :"artifact.filename" + def artifact_filename do + :"artifact.filename" + end + + @doc """ + The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), often found in checksum.txt on a release of the artifact and used to verify package integrity. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The specific algorithm used to create the cryptographic hash value is + not defined. In situations where an artifact has multiple + cryptographic hashes, it is up to the implementer to choose which + hash value to set here; this should be the most secure hash algorithm + that is suitable for the situation and consistent with the + corresponding attestation. The implementer can then provide the other + hash values through an additional set of attribute extensions as they + deem necessary. + + ### Examples + + ``` + ["9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ArtifactAttributes.artifact_hash() + :"artifact.hash" + + ### Erlang + + ```erlang + ?ARTIFACT_HASH. + 'artifact.hash' + ``` + + + """ + @spec artifact_hash :: :"artifact.hash" + def artifact_hash do + :"artifact.hash" + end + + @doc """ + The [Package URL](https://github.com/package-url/purl-spec) of the [package artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides a standard way to identify and locate the packaged artifact. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["pkg:github/package-url/purl-spec@1209109710924", "pkg:npm/foo@12.12.3"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ArtifactAttributes.artifact_purl() + :"artifact.purl" + + ### Erlang + + ```erlang + ?ARTIFACT_PURL. + 'artifact.purl' + ``` + + + """ + @spec artifact_purl :: :"artifact.purl" + def artifact_purl do + :"artifact.purl" + end + + @doc """ + The version of the artifact. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["v0.1.0", "1.2.1", "122691-build"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ArtifactAttributes.artifact_version() + :"artifact.version" + + ### Erlang + + ```erlang + ?ARTIFACT_VERSION. + 'artifact.version' + ``` + + + """ + @spec artifact_version :: :"artifact.version" + def artifact_version do + :"artifact.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex new file mode 100644 index 00000000..4adf3a02 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex @@ -0,0 +1,1452 @@ +defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for AWS attributes. + """ + + @doc """ + The JSON-serialized value of each item in the `AttributeDefinitions` request field. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_attribute_definitions() + :"aws.dynamodb.attribute_definitions" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS. + 'aws.dynamodb.attribute_definitions' + ``` + + + """ + @spec aws_dynamodb_attribute_definitions :: :"aws.dynamodb.attribute_definitions" + def aws_dynamodb_attribute_definitions do + :"aws.dynamodb.attribute_definitions" + end + + @doc """ + The value of the `AttributesToGet` request parameter. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["lives", "id"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_attributes_to_get() + :"aws.dynamodb.attributes_to_get" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_ATTRIBUTES_TO_GET. + 'aws.dynamodb.attributes_to_get' + ``` + + + """ + @spec aws_dynamodb_attributes_to_get :: :"aws.dynamodb.attributes_to_get" + def aws_dynamodb_attributes_to_get do + :"aws.dynamodb.attributes_to_get" + end + + @doc """ + The value of the `ConsistentRead` request parameter. + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_consistent_read() + :"aws.dynamodb.consistent_read" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_CONSISTENT_READ. + 'aws.dynamodb.consistent_read' + ``` + + + """ + @spec aws_dynamodb_consistent_read :: :"aws.dynamodb.consistent_read" + def aws_dynamodb_consistent_read do + :"aws.dynamodb.consistent_read" + end + + @doc """ + The JSON-serialized value of each item in the `ConsumedCapacity` response field. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["{ \"CapacityUnits\": number, \"GlobalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"LocalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"ReadCapacityUnits\": number, \"Table\": { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number }, \"TableName\": \"string\", \"WriteCapacityUnits\": number }"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_consumed_capacity() + :"aws.dynamodb.consumed_capacity" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_CONSUMED_CAPACITY. + 'aws.dynamodb.consumed_capacity' + ``` + + + """ + @spec aws_dynamodb_consumed_capacity :: :"aws.dynamodb.consumed_capacity" + def aws_dynamodb_consumed_capacity do + :"aws.dynamodb.consumed_capacity" + end + + @doc """ + The value of the `Count` response parameter. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [10] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_count() + :"aws.dynamodb.count" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_COUNT. + 'aws.dynamodb.count' + ``` + + + """ + @spec aws_dynamodb_count :: :"aws.dynamodb.count" + def aws_dynamodb_count do + :"aws.dynamodb.count" + end + + @doc """ + The value of the `ExclusiveStartTableName` request parameter. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Users", "CatsTable"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_exclusive_start_table() + :"aws.dynamodb.exclusive_start_table" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_EXCLUSIVE_START_TABLE. + 'aws.dynamodb.exclusive_start_table' + ``` + + + """ + @spec aws_dynamodb_exclusive_start_table :: :"aws.dynamodb.exclusive_start_table" + def aws_dynamodb_exclusive_start_table do + :"aws.dynamodb.exclusive_start_table" + end + + @doc """ + The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["{ \"Create\": { \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_global_secondary_index_updates() + :"aws.dynamodb.global_secondary_index_updates" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES. + 'aws.dynamodb.global_secondary_index_updates' + ``` + + + """ + @spec aws_dynamodb_global_secondary_index_updates :: + :"aws.dynamodb.global_secondary_index_updates" + def aws_dynamodb_global_secondary_index_updates do + :"aws.dynamodb.global_secondary_index_updates" + end + + @doc """ + The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["{ \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_global_secondary_indexes() + :"aws.dynamodb.global_secondary_indexes" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES. + 'aws.dynamodb.global_secondary_indexes' + ``` + + + """ + @spec aws_dynamodb_global_secondary_indexes :: :"aws.dynamodb.global_secondary_indexes" + def aws_dynamodb_global_secondary_indexes do + :"aws.dynamodb.global_secondary_indexes" + end + + @doc """ + The value of the `IndexName` request parameter. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["name_to_group"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_index_name() + :"aws.dynamodb.index_name" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_INDEX_NAME. + 'aws.dynamodb.index_name' + ``` + + + """ + @spec aws_dynamodb_index_name :: :"aws.dynamodb.index_name" + def aws_dynamodb_index_name do + :"aws.dynamodb.index_name" + end + + @doc """ + The JSON-serialized value of the `ItemCollectionMetrics` response field. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["{ \"string\" : [ { \"ItemCollectionKey\": { \"string\" : { \"B\": blob, \"BOOL\": boolean, \"BS\": [ blob ], \"L\": [ \"AttributeValue\" ], \"M\": { \"string\" : \"AttributeValue\" }, \"N\": \"string\", \"NS\": [ \"string\" ], \"NULL\": boolean, \"S\": \"string\", \"SS\": [ \"string\" ] } }, \"SizeEstimateRangeGB\": [ number ] } ] }"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_item_collection_metrics() + :"aws.dynamodb.item_collection_metrics" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_ITEM_COLLECTION_METRICS. + 'aws.dynamodb.item_collection_metrics' + ``` + + + """ + @spec aws_dynamodb_item_collection_metrics :: :"aws.dynamodb.item_collection_metrics" + def aws_dynamodb_item_collection_metrics do + :"aws.dynamodb.item_collection_metrics" + end + + @doc """ + The value of the `Limit` request parameter. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [10] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_limit() + :"aws.dynamodb.limit" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_LIMIT. + 'aws.dynamodb.limit' + ``` + + + """ + @spec aws_dynamodb_limit :: :"aws.dynamodb.limit" + def aws_dynamodb_limit do + :"aws.dynamodb.limit" + end + + @doc """ + The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["{ \"IndexArn\": \"string\", \"IndexName\": \"string\", \"IndexSizeBytes\": number, \"ItemCount\": number, \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" } }"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_local_secondary_indexes() + :"aws.dynamodb.local_secondary_indexes" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES. + 'aws.dynamodb.local_secondary_indexes' + ``` + + + """ + @spec aws_dynamodb_local_secondary_indexes :: :"aws.dynamodb.local_secondary_indexes" + def aws_dynamodb_local_secondary_indexes do + :"aws.dynamodb.local_secondary_indexes" + end + + @doc """ + The value of the `ProjectionExpression` request parameter. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Title", "Title, Price, Color", "Title, Description, RelatedItems, ProductReviews"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_projection() + :"aws.dynamodb.projection" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_PROJECTION. + 'aws.dynamodb.projection' + ``` + + + """ + @spec aws_dynamodb_projection :: :"aws.dynamodb.projection" + def aws_dynamodb_projection do + :"aws.dynamodb.projection" + end + + @doc """ + The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [1.0, 2.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_provisioned_read_capacity() + :"aws.dynamodb.provisioned_read_capacity" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_PROVISIONED_READ_CAPACITY. + 'aws.dynamodb.provisioned_read_capacity' + ``` + + + """ + @spec aws_dynamodb_provisioned_read_capacity :: :"aws.dynamodb.provisioned_read_capacity" + def aws_dynamodb_provisioned_read_capacity do + :"aws.dynamodb.provisioned_read_capacity" + end + + @doc """ + The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [1.0, 2.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_provisioned_write_capacity() + :"aws.dynamodb.provisioned_write_capacity" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY. + 'aws.dynamodb.provisioned_write_capacity' + ``` + + + """ + @spec aws_dynamodb_provisioned_write_capacity :: :"aws.dynamodb.provisioned_write_capacity" + def aws_dynamodb_provisioned_write_capacity do + :"aws.dynamodb.provisioned_write_capacity" + end + + @doc """ + The value of the `ScanIndexForward` request parameter. + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_scan_forward() + :"aws.dynamodb.scan_forward" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_SCAN_FORWARD. + 'aws.dynamodb.scan_forward' + ``` + + + """ + @spec aws_dynamodb_scan_forward :: :"aws.dynamodb.scan_forward" + def aws_dynamodb_scan_forward do + :"aws.dynamodb.scan_forward" + end + + @doc """ + The value of the `ScannedCount` response parameter. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [50] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_scanned_count() + :"aws.dynamodb.scanned_count" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_SCANNED_COUNT. + 'aws.dynamodb.scanned_count' + ``` + + + """ + @spec aws_dynamodb_scanned_count :: :"aws.dynamodb.scanned_count" + def aws_dynamodb_scanned_count do + :"aws.dynamodb.scanned_count" + end + + @doc """ + The value of the `Segment` request parameter. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [10] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_segment() + :"aws.dynamodb.segment" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_SEGMENT. + 'aws.dynamodb.segment' + ``` + + + """ + @spec aws_dynamodb_segment :: :"aws.dynamodb.segment" + def aws_dynamodb_segment do + :"aws.dynamodb.segment" + end + + @doc """ + The value of the `Select` request parameter. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["ALL_ATTRIBUTES", "COUNT"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_select() + :"aws.dynamodb.select" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_SELECT. + 'aws.dynamodb.select' + ``` + + + """ + @spec aws_dynamodb_select :: :"aws.dynamodb.select" + def aws_dynamodb_select do + :"aws.dynamodb.select" + end + + @doc """ + The number of items in the `TableNames` response parameter. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [20] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_table_count() + :"aws.dynamodb.table_count" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_TABLE_COUNT. + 'aws.dynamodb.table_count' + ``` + + + """ + @spec aws_dynamodb_table_count :: :"aws.dynamodb.table_count" + def aws_dynamodb_table_count do + :"aws.dynamodb.table_count" + end + + @doc """ + The keys in the `RequestItems` object field. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["Users", "Cats"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_table_names() + :"aws.dynamodb.table_names" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_TABLE_NAMES. + 'aws.dynamodb.table_names' + ``` + + + """ + @spec aws_dynamodb_table_names :: :"aws.dynamodb.table_names" + def aws_dynamodb_table_names do + :"aws.dynamodb.table_names" + end + + @doc """ + The value of the `TotalSegments` request parameter. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [100] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_dynamodb_total_segments() + :"aws.dynamodb.total_segments" + + ### Erlang + + ```erlang + ?AWS_DYNAMODB_TOTAL_SEGMENTS. + 'aws.dynamodb.total_segments' + ``` + + + """ + @spec aws_dynamodb_total_segments :: :"aws.dynamodb.total_segments" + def aws_dynamodb_total_segments do + :"aws.dynamodb.total_segments" + end + + @doc """ + The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_cluster_arn() + :"aws.ecs.cluster.arn" + + ### Erlang + + ```erlang + ?AWS_ECS_CLUSTER_ARN. + 'aws.ecs.cluster.arn' + ``` + + + """ + @spec aws_ecs_cluster_arn :: :"aws.ecs.cluster.arn" + def aws_ecs_cluster_arn do + :"aws.ecs.cluster.arn" + end + + @doc """ + The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_container_arn() + :"aws.ecs.container.arn" + + ### Erlang + + ```erlang + ?AWS_ECS_CONTAINER_ARN. + 'aws.ecs.container.arn' + ``` + + + """ + @spec aws_ecs_container_arn :: :"aws.ecs.container.arn" + def aws_ecs_container_arn do + :"aws.ecs.container.arn" + end + + @typedoc """ + The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + + + ### Enum Values + * `:ec2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:fargate` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type aws_ecs_launchtype_values() :: %{ + :ec2 => :ec2, + :fargate => :fargate + } + @doc """ + The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_launchtype() + :"aws.ecs.launchtype" + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_launchtype_values().ec2 + :ec2 + + iex> %{OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_launchtype() => OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_launchtype_values().ec2} + %{:"aws.ecs.launchtype" => :ec2} + + ### Erlang + + ```erlang + ?AWS_ECS_LAUNCHTYPE. + 'aws.ecs.launchtype' + + ?AWS_ECS_LAUNCHTYPE_VALUES_EC2. + 'ec2' + + \#{?AWS_ECS_LAUNCHTYPE => ?AWS_ECS_LAUNCHTYPE_VALUES_EC2}. + \#{'aws.ecs.launchtype' => 'ec2'} + ``` + + + """ + @spec aws_ecs_launchtype :: :"aws.ecs.launchtype" + def aws_ecs_launchtype do + :"aws.ecs.launchtype" + end + + @spec aws_ecs_launchtype_values() :: aws_ecs_launchtype_values() + def aws_ecs_launchtype_values() do + %{ + :ec2 => :ec2, + :fargate => :fargate + } + end + + @doc """ + The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b", "arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_task_arn() + :"aws.ecs.task.arn" + + ### Erlang + + ```erlang + ?AWS_ECS_TASK_ARN. + 'aws.ecs.task.arn' + ``` + + + """ + @spec aws_ecs_task_arn :: :"aws.ecs.task.arn" + def aws_ecs_task_arn do + :"aws.ecs.task.arn" + end + + @doc """ + The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry-family"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_task_family() + :"aws.ecs.task.family" + + ### Erlang + + ```erlang + ?AWS_ECS_TASK_FAMILY. + 'aws.ecs.task.family' + ``` + + + """ + @spec aws_ecs_task_family :: :"aws.ecs.task.family" + def aws_ecs_task_family do + :"aws.ecs.task.family" + end + + @doc """ + The ID of a running ECS task. The ID **MUST** be extracted from `task.arn`. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["10838bed-421f-43ef-870a-f43feacbbb5b", "23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_task_id() + :"aws.ecs.task.id" + + ### Erlang + + ```erlang + ?AWS_ECS_TASK_ID. + 'aws.ecs.task.id' + ``` + + + """ + @spec aws_ecs_task_id :: :"aws.ecs.task.id" + def aws_ecs_task_id do + :"aws.ecs.task.id" + end + + @doc """ + The revision for the task definition used to create the ECS task. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["8", "26"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_ecs_task_revision() + :"aws.ecs.task.revision" + + ### Erlang + + ```erlang + ?AWS_ECS_TASK_REVISION. + 'aws.ecs.task.revision' + ``` + + + """ + @spec aws_ecs_task_revision :: :"aws.ecs.task.revision" + def aws_ecs_task_revision do + :"aws.ecs.task.revision" + end + + @doc """ + The ARN of an EKS cluster. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_eks_cluster_arn() + :"aws.eks.cluster.arn" + + ### Erlang + + ```erlang + ?AWS_EKS_CLUSTER_ARN. + 'aws.eks.cluster.arn' + ``` + + + """ + @spec aws_eks_cluster_arn :: :"aws.eks.cluster.arn" + def aws_eks_cluster_arn do + :"aws.eks.cluster.arn" + end + + @doc """ + The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This may be different from `cloud.resource_id` if an alias is involved. + ### Examples + + ``` + ["arn:aws:lambda:us-east-1:123456:function:myfunction:myalias"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_lambda_invoked_arn() + :"aws.lambda.invoked_arn" + + ### Erlang + + ```erlang + ?AWS_LAMBDA_INVOKED_ARN. + 'aws.lambda.invoked_arn' + ``` + + + """ + @spec aws_lambda_invoked_arn :: :"aws.lambda.invoked_arn" + def aws_lambda_invoked_arn do + :"aws.lambda.invoked_arn" + end + + @doc """ + The Amazon Resource Name(s) (ARN) of the AWS log group(s). + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + + ### Examples + + ``` + ["arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_log_group_arns() + :"aws.log.group.arns" + + ### Erlang + + ```erlang + ?AWS_LOG_GROUP_ARNS. + 'aws.log.group.arns' + ``` + + + """ + @spec aws_log_group_arns :: :"aws.log.group.arns" + def aws_log_group_arns do + :"aws.log.group.arns" + end + + @doc """ + The name(s) of the AWS log group(s) an application is writing to. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. + + ### Examples + + ``` + ["/aws/lambda/my-function", "opentelemetry-service"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_log_group_names() + :"aws.log.group.names" + + ### Erlang + + ```erlang + ?AWS_LOG_GROUP_NAMES. + 'aws.log.group.names' + ``` + + + """ + @spec aws_log_group_names :: :"aws.log.group.names" + def aws_log_group_names do + :"aws.log.group.names" + end + + @doc """ + The ARN(s) of the AWS log stream(s). + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. + + ### Examples + + ``` + ["arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_log_stream_arns() + :"aws.log.stream.arns" + + ### Erlang + + ```erlang + ?AWS_LOG_STREAM_ARNS. + 'aws.log.stream.arns' + ``` + + + """ + @spec aws_log_stream_arns :: :"aws.log.stream.arns" + def aws_log_stream_arns do + :"aws.log.stream.arns" + end + + @doc """ + The name(s) of the AWS log stream(s) an application is writing to. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_log_stream_names() + :"aws.log.stream.names" + + ### Erlang + + ```erlang + ?AWS_LOG_STREAM_NAMES. + 'aws.log.stream.names' + ``` + + + """ + @spec aws_log_stream_names :: :"aws.log.stream.names" + def aws_log_stream_names do + :"aws.log.stream.names" + end + + @doc """ + The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["79b9da39-b7ae-508a-a6bc-864b2829c622", "C9ER4AJX75574TDJ"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_request_id() + :"aws.request_id" + + ### Erlang + + ```erlang + ?AWS_REQUEST_ID. + 'aws.request_id' + ``` + + + """ + @spec aws_request_id :: :"aws.request_id" + def aws_request_id do + :"aws.request_id" + end + + @doc """ + The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter. + This applies to almost all S3 operations except `list-buckets`. + + ### Examples + + ``` + ["some-bucket-name"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_s3_bucket() + :"aws.s3.bucket" + + ### Erlang + + ```erlang + ?AWS_S3_BUCKET. + 'aws.s3.bucket' + ``` + + + """ + @spec aws_s3_bucket :: :"aws.s3.bucket" + def aws_s3_bucket do + :"aws.s3.bucket" + end + + @doc """ + The source object (in the form `bucket`/`key`) for the copy operation. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter + of the [copy-object operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). + This applies in particular to the following operations: + + - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + + ### Examples + + ``` + ["someFile.yml"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_s3_copy_source() + :"aws.s3.copy_source" + + ### Erlang + + ```erlang + ?AWS_S3_COPY_SOURCE. + 'aws.s3.copy_source' + ``` + + + """ + @spec aws_s3_copy_source :: :"aws.s3.copy_source" + def aws_s3_copy_source do + :"aws.s3.copy_source" + end + + @doc """ + The delete request container that specifies the objects to be deleted. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation. + The `delete` attribute corresponds to the `--delete` parameter of the + [delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). + + ### Examples + + ``` + ["Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_s3_delete() + :"aws.s3.delete" + + ### Erlang + + ```erlang + ?AWS_S3_DELETE. + 'aws.s3.delete' + ``` + + + """ + @spec aws_s3_delete :: :"aws.s3.delete" + def aws_s3_delete do + :"aws.s3.delete" + end + + @doc """ + The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter. + This applies in particular to the following operations: + + - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + - [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + - [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) + - [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) + - [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) + - [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) + - [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) + - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + - [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) + - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + + ### Examples + + ``` + ["someFile.yml"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_s3_key() + :"aws.s3.key" + + ### Erlang + + ```erlang + ?AWS_S3_KEY. + 'aws.s3.key' + ``` + + + """ + @spec aws_s3_key :: :"aws.s3.key" + def aws_s3_key do + :"aws.s3.key" + end + + @doc """ + The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000. + ### Value type + + Value must be of type `integer()`. + ### Notes + + The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + and [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) operations. + The `part_number` attribute corresponds to the `--part-number` parameter of the + [upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). + + ### Examples + + ``` + [3456] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_s3_part_number() + :"aws.s3.part_number" + + ### Erlang + + ```erlang + ?AWS_S3_PART_NUMBER. + 'aws.s3.part_number' + ``` + + + """ + @spec aws_s3_part_number :: :"aws.s3.part_number" + def aws_s3_part_number do + :"aws.s3.part_number" + end + + @doc """ + Upload ID that identifies the multipart upload. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter + of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) multipart operations. + This applies in particular to the following operations: + + - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + + ### Examples + + ``` + ["dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_s3_upload_id() + :"aws.s3.upload_id" + + ### Erlang + + ```erlang + ?AWS_S3_UPLOAD_ID. + 'aws.s3.upload_id' + ``` + + + """ + @spec aws_s3_upload_id :: :"aws.s3.upload_id" + def aws_s3_upload_id do + :"aws.s3.upload_id" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex new file mode 100644 index 00000000..e7ef58e0 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex @@ -0,0 +1,38 @@ +defmodule OpenTelemetry.SemConv.Incubating.AzureAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Azure attributes. + """ + + @doc """ + The unique identifier of the service request. It's generated by the Azure service and returned with the response. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["00000000-0000-0000-0000-000000000000"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.az_service_request_id() + :"az.service_request_id" + + ### Erlang + + ```erlang + ?AZ_SERVICE_REQUEST_ID. + 'az.service_request_id' + ``` + + + """ + @spec az_service_request_id :: :"az.service_request_id" + def az_service_request_id do + :"az.service_request_id" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/browser_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/browser_attributes.ex new file mode 100644 index 00000000..63b85baf --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/browser_attributes.ex @@ -0,0 +1,146 @@ +defmodule OpenTelemetry.SemConv.Incubating.BrowserAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Browser attributes. + """ + + @doc """ + Array of brand name and version separated by a space + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`). + + ### Examples + + ``` + [" Not A;Brand 99", "Chromium 99", "Chrome 99"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.BrowserAttributes.browser_brands() + :"browser.brands" + + ### Erlang + + ```erlang + ?BROWSER_BRANDS. + 'browser.brands' + ``` + + + """ + @spec browser_brands :: :"browser.brands" + def browser_brands do + :"browser.brands" + end + + @doc """ + Preferred language of the user using the browser + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This value is intended to be taken from the Navigator API `navigator.language`. + + ### Examples + + ``` + ["en", "en-US", "fr", "fr-FR"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.BrowserAttributes.browser_language() + :"browser.language" + + ### Erlang + + ```erlang + ?BROWSER_LANGUAGE. + 'browser.language' + ``` + + + """ + @spec browser_language :: :"browser.language" + def browser_language do + :"browser.language" + end + + @doc """ + A boolean that is true if the browser is running on a mobile device + ### Value type + + Value must be of type `boolean()`. + ### Notes + + This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute **SHOULD** be left unset. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.BrowserAttributes.browser_mobile() + :"browser.mobile" + + ### Erlang + + ```erlang + ?BROWSER_MOBILE. + 'browser.mobile' + ``` + + + """ + @spec browser_mobile :: :"browser.mobile" + def browser_mobile do + :"browser.mobile" + end + + @doc """ + The platform on which the browser is running + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API **SHOULD** **NOT** be used instead and this attribute **SHOULD** be left unset in order for the values to be consistent. + The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides. + + ### Examples + + ``` + ["Windows", "macOS", "Android"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.BrowserAttributes.browser_platform() + :"browser.platform" + + ### Erlang + + ```erlang + ?BROWSER_PLATFORM. + 'browser.platform' + ``` + + + """ + @spec browser_platform :: :"browser.platform" + def browser_platform do + :"browser.platform" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex new file mode 100644 index 00000000..af727996 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex @@ -0,0 +1,237 @@ +defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cicd attributes. + """ + + @doc """ + The human readable name of the pipeline within a CI/CD system. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Build and Test", "Lint", "Deploy Go Project", "deploy_to_environment"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_name() + :"cicd.pipeline.name" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_NAME. + 'cicd.pipeline.name' + ``` + + + """ + @spec cicd_pipeline_name :: :"cicd.pipeline.name" + def cicd_pipeline_name do + :"cicd.pipeline.name" + end + + @doc """ + The unique identifier of a pipeline run within a CI/CD system. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["120912"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_run_id() + :"cicd.pipeline.run.id" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_RUN_ID. + 'cicd.pipeline.run.id' + ``` + + + """ + @spec cicd_pipeline_run_id :: :"cicd.pipeline.run.id" + def cicd_pipeline_run_id do + :"cicd.pipeline.run.id" + end + + @doc """ + The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Run GoLang Linter", "Go Build", "go-test", "deploy_binary"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_name() + :"cicd.pipeline.task.name" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_TASK_NAME. + 'cicd.pipeline.task.name' + ``` + + + """ + @spec cicd_pipeline_task_name :: :"cicd.pipeline.task.name" + def cicd_pipeline_task_name do + :"cicd.pipeline.task.name" + end + + @doc """ + The unique identifier of a task run within a pipeline. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["12097"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_run_id() + :"cicd.pipeline.task.run.id" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_TASK_RUN_ID. + 'cicd.pipeline.task.run.id' + ``` + + + """ + @spec cicd_pipeline_task_run_id :: :"cicd.pipeline.task.run.id" + def cicd_pipeline_task_run_id do + :"cicd.pipeline.task.run.id" + end + + @doc """ + The [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run providing the complete address in order to locate and identify the pipeline run. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_run_url_full() + :"cicd.pipeline.task.run.url.full" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_TASK_RUN_URL_FULL. + 'cicd.pipeline.task.run.url.full' + ``` + + + """ + @spec cicd_pipeline_task_run_url_full :: :"cicd.pipeline.task.run.url.full" + def cicd_pipeline_task_run_url_full do + :"cicd.pipeline.task.run.url.full" + end + + @typedoc """ + The type of the task within a pipeline. + + + ### Enum Values + * `:build` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - build + * `:test` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - test + * `:deploy` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - deploy + """ + @type cicd_pipeline_task_type_values() :: %{ + :build => :build, + :test => :test, + :deploy => :deploy + } + @doc """ + The type of the task within a pipeline. + + + ### Examples + + ``` + ["build", "test", "deploy"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_type() + :"cicd.pipeline.task.type" + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_type_values().build + :build + + iex> %{OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_type() => OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_type_values().build} + %{:"cicd.pipeline.task.type" => :build} + + ### Erlang + + ```erlang + ?CICD_PIPELINE_TASK_TYPE. + 'cicd.pipeline.task.type' + + ?CICD_PIPELINE_TASK_TYPE_VALUES_BUILD. + 'build' + + \#{?CICD_PIPELINE_TASK_TYPE => ?CICD_PIPELINE_TASK_TYPE_VALUES_BUILD}. + \#{'cicd.pipeline.task.type' => 'build'} + ``` + + + """ + @spec cicd_pipeline_task_type :: :"cicd.pipeline.task.type" + def cicd_pipeline_task_type do + :"cicd.pipeline.task.type" + end + + @spec cicd_pipeline_task_type_values() :: cicd_pipeline_task_type_values() + def cicd_pipeline_task_type_values() do + %{ + :build => :build, + :test => :test, + :deploy => :deploy + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex new file mode 100644 index 00000000..9301dfce --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex @@ -0,0 +1,379 @@ +defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cloud attributes. + """ + + @doc """ + The cloud account ID the resource is assigned to. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["111111111111", "opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_account_id() + :"cloud.account.id" + + ### Erlang + + ```erlang + ?CLOUD_ACCOUNT_ID. + 'cloud.account.id' + ``` + + + """ + @spec cloud_account_id :: :"cloud.account.id" + def cloud_account_id do + :"cloud.account.id" + end + + @doc """ + Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Availability zones are called "zones" on Alibaba Cloud and Google Cloud. + + ### Examples + + ``` + ["us-east-1c"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_availability_zone() + :"cloud.availability_zone" + + ### Erlang + + ```erlang + ?CLOUD_AVAILABILITY_ZONE. + 'cloud.availability_zone' + ``` + + + """ + @spec cloud_availability_zone :: :"cloud.availability_zone" + def cloud_availability_zone do + :"cloud.availability_zone" + end + + @typedoc """ + The cloud platform in use. + + + ### Enum Values + * `:alibaba_cloud_ecs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Alibaba Cloud Elastic Compute Service + * `:alibaba_cloud_fc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Alibaba Cloud Function Compute + * `:alibaba_cloud_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Red Hat OpenShift on Alibaba Cloud + * `:aws_ec2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS Elastic Compute Cloud + * `:aws_ecs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS Elastic Container Service + * `:aws_eks` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS Elastic Kubernetes Service + * `:aws_lambda` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS Lambda + * `:aws_elastic_beanstalk` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS Elastic Beanstalk + * `:aws_app_runner` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS App Runner + * `:aws_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Red Hat OpenShift on AWS (ROSA) + * `:azure_vm` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Virtual Machines + * `:azure_container_apps` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Container Apps + * `:azure_container_instances` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Container Instances + * `:azure_aks` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Kubernetes Service + * `:azure_functions` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Functions + * `:azure_app_service` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure App Service + * `:azure_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Red Hat OpenShift + * `:gcp_bare_metal_solution` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Bare Metal Solution (BMS) + * `:gcp_compute_engine` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Compute Engine (GCE) + * `:gcp_cloud_run` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Run + * `:gcp_kubernetes_engine` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Kubernetes Engine (GKE) + * `:gcp_cloud_functions` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Functions (GCF) + * `:gcp_app_engine` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud App Engine (GAE) + * `:gcp_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Red Hat OpenShift on Google Cloud + * `:ibm_cloud_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Red Hat OpenShift on IBM Cloud + * `:tencent_cloud_cvm` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud Cloud Virtual Machine (CVM) + * `:tencent_cloud_eks` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud Elastic Kubernetes Service (EKS) + * `:tencent_cloud_scf` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud Serverless Cloud Function (SCF) + """ + @type cloud_platform_values() :: %{ + :alibaba_cloud_ecs => :alibaba_cloud_ecs, + :alibaba_cloud_fc => :alibaba_cloud_fc, + :alibaba_cloud_openshift => :alibaba_cloud_openshift, + :aws_ec2 => :aws_ec2, + :aws_ecs => :aws_ecs, + :aws_eks => :aws_eks, + :aws_lambda => :aws_lambda, + :aws_elastic_beanstalk => :aws_elastic_beanstalk, + :aws_app_runner => :aws_app_runner, + :aws_openshift => :aws_openshift, + :azure_vm => :azure_vm, + :azure_container_apps => :azure_container_apps, + :azure_container_instances => :azure_container_instances, + :azure_aks => :azure_aks, + :azure_functions => :azure_functions, + :azure_app_service => :azure_app_service, + :azure_openshift => :azure_openshift, + :gcp_bare_metal_solution => :gcp_bare_metal_solution, + :gcp_compute_engine => :gcp_compute_engine, + :gcp_cloud_run => :gcp_cloud_run, + :gcp_kubernetes_engine => :gcp_kubernetes_engine, + :gcp_cloud_functions => :gcp_cloud_functions, + :gcp_app_engine => :gcp_app_engine, + :gcp_openshift => :gcp_openshift, + :ibm_cloud_openshift => :ibm_cloud_openshift, + :tencent_cloud_cvm => :tencent_cloud_cvm, + :tencent_cloud_eks => :tencent_cloud_eks, + :tencent_cloud_scf => :tencent_cloud_scf + } + @doc """ + The cloud platform in use. + + + ### Notes + + The prefix of the service **SHOULD** match the one specified in `cloud.provider`. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform() + :"cloud.platform" + + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform_values().alibaba_cloud_ecs + :alibaba_cloud_ecs + + iex> %{OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform() => OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform_values().alibaba_cloud_ecs} + %{:"cloud.platform" => :alibaba_cloud_ecs} + + ### Erlang + + ```erlang + ?CLOUD_PLATFORM. + 'cloud.platform' + + ?CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_ECS. + 'alibaba_cloud_ecs' + + \#{?CLOUD_PLATFORM => ?CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_ECS}. + \#{'cloud.platform' => 'alibaba_cloud_ecs'} + ``` + + + """ + @spec cloud_platform :: :"cloud.platform" + def cloud_platform do + :"cloud.platform" + end + + @spec cloud_platform_values() :: cloud_platform_values() + def cloud_platform_values() do + %{ + :alibaba_cloud_ecs => :alibaba_cloud_ecs, + :alibaba_cloud_fc => :alibaba_cloud_fc, + :alibaba_cloud_openshift => :alibaba_cloud_openshift, + :aws_ec2 => :aws_ec2, + :aws_ecs => :aws_ecs, + :aws_eks => :aws_eks, + :aws_lambda => :aws_lambda, + :aws_elastic_beanstalk => :aws_elastic_beanstalk, + :aws_app_runner => :aws_app_runner, + :aws_openshift => :aws_openshift, + :azure_vm => :azure_vm, + :azure_container_apps => :azure_container_apps, + :azure_container_instances => :azure_container_instances, + :azure_aks => :azure_aks, + :azure_functions => :azure_functions, + :azure_app_service => :azure_app_service, + :azure_openshift => :azure_openshift, + :gcp_bare_metal_solution => :gcp_bare_metal_solution, + :gcp_compute_engine => :gcp_compute_engine, + :gcp_cloud_run => :gcp_cloud_run, + :gcp_kubernetes_engine => :gcp_kubernetes_engine, + :gcp_cloud_functions => :gcp_cloud_functions, + :gcp_app_engine => :gcp_app_engine, + :gcp_openshift => :gcp_openshift, + :ibm_cloud_openshift => :ibm_cloud_openshift, + :tencent_cloud_cvm => :tencent_cloud_cvm, + :tencent_cloud_eks => :tencent_cloud_eks, + :tencent_cloud_scf => :tencent_cloud_scf + } + end + + @typedoc """ + Name of the cloud provider. + + + ### Enum Values + * `:alibaba_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Alibaba Cloud + * `:aws` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon Web Services + * `:azure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Microsoft Azure + * `:gcp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Platform + * `:heroku` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Heroku Platform as a Service + * `:ibm_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IBM Cloud + * `:tencent_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud + """ + @type cloud_provider_values() :: %{ + :alibaba_cloud => :alibaba_cloud, + :aws => :aws, + :azure => :azure, + :gcp => :gcp, + :heroku => :heroku, + :ibm_cloud => :ibm_cloud, + :tencent_cloud => :tencent_cloud + } + @doc """ + Name of the cloud provider. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider() + :"cloud.provider" + + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider_values().alibaba_cloud + :alibaba_cloud + + iex> %{OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider() => OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider_values().alibaba_cloud} + %{:"cloud.provider" => :alibaba_cloud} + + ### Erlang + + ```erlang + ?CLOUD_PROVIDER. + 'cloud.provider' + + ?CLOUD_PROVIDER_VALUES_ALIBABA_CLOUD. + 'alibaba_cloud' + + \#{?CLOUD_PROVIDER => ?CLOUD_PROVIDER_VALUES_ALIBABA_CLOUD}. + \#{'cloud.provider' => 'alibaba_cloud'} + ``` + + + """ + @spec cloud_provider :: :"cloud.provider" + def cloud_provider do + :"cloud.provider" + end + + @spec cloud_provider_values() :: cloud_provider_values() + def cloud_provider_values() do + %{ + :alibaba_cloud => :alibaba_cloud, + :aws => :aws, + :azure => :azure, + :gcp => :gcp, + :heroku => :heroku, + :ibm_cloud => :ibm_cloud, + :tencent_cloud => :tencent_cloud + } + end + + @doc """ + The geographical region the resource is running. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). + + ### Examples + + ``` + ["us-central1", "us-east-1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_region() + :"cloud.region" + + ### Erlang + + ```erlang + ?CLOUD_REGION. + 'cloud.region' + ``` + + + """ + @spec cloud_region :: :"cloud.region" + def cloud_region do + :"cloud.region" + end + + @doc """ + Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP) + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + On some cloud providers, it may not be possible to determine the full ID at startup, + so it may be necessary to set `cloud.resource_id` as a span attribute instead. + + The exact value to use for `cloud.resource_id` depends on the cloud provider. + The following well-known definitions **MUST** be used if you set this attribute and they apply: + + * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + Take care not to use the "invoked ARN" directly but replace any + [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) + with the resolved function version, as the same runtime instance may be invocable with + multiple different aliases. + * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) + * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function, + *not* the function app, having the form + `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. + This means that a span attribute **MUST** be used, as an Azure function app can host multiple functions that would usually share + a TracerProvider. + + ### Examples + + ``` + ["arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function", "//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID", "/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_resource_id() + :"cloud.resource_id" + + ### Erlang + + ```erlang + ?CLOUD_RESOURCE_ID. + 'cloud.resource_id' + ``` + + + """ + @spec cloud_resource_id :: :"cloud.resource_id" + def cloud_resource_id do + :"cloud.resource_id" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloudevents_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloudevents_attributes.ex new file mode 100644 index 00000000..a4501492 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloudevents_attributes.ex @@ -0,0 +1,171 @@ +defmodule OpenTelemetry.SemConv.Incubating.CloudeventsAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cloudevents attributes. + """ + + @doc """ + The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["123e4567-e89b-12d3-a456-426614174000", "0001"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudeventsAttributes.cloudevents_event_id() + :"cloudevents.event_id" + + ### Erlang + + ```erlang + ?CLOUDEVENTS_EVENT_ID. + 'cloudevents.event_id' + ``` + + + """ + @spec cloudevents_event_id :: :"cloudevents.event_id" + def cloudevents_event_id do + :"cloudevents.event_id" + end + + @doc """ + The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["https://github.com/cloudevents", "/cloudevents/spec/pull/123", "my-service"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudeventsAttributes.cloudevents_event_source() + :"cloudevents.event_source" + + ### Erlang + + ```erlang + ?CLOUDEVENTS_EVENT_SOURCE. + 'cloudevents.event_source' + ``` + + + """ + @spec cloudevents_event_source :: :"cloudevents.event_source" + def cloudevents_event_source do + :"cloudevents.event_source" + end + + @doc """ + The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 1.0 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudeventsAttributes.cloudevents_event_spec_version() + :"cloudevents.event_spec_version" + + ### Erlang + + ```erlang + ?CLOUDEVENTS_EVENT_SPEC_VERSION. + 'cloudevents.event_spec_version' + ``` + + + """ + @spec cloudevents_event_spec_version :: :"cloudevents.event_spec_version" + def cloudevents_event_spec_version do + :"cloudevents.event_spec_version" + end + + @doc """ + The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + mynewfile.jpg + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudeventsAttributes.cloudevents_event_subject() + :"cloudevents.event_subject" + + ### Erlang + + ```erlang + ?CLOUDEVENTS_EVENT_SUBJECT. + 'cloudevents.event_subject' + ``` + + + """ + @spec cloudevents_event_subject :: :"cloudevents.event_subject" + def cloudevents_event_subject do + :"cloudevents.event_subject" + end + + @doc """ + The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["com.github.pull_request.opened", "com.example.object.deleted.v2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudeventsAttributes.cloudevents_event_type() + :"cloudevents.event_type" + + ### Erlang + + ```erlang + ?CLOUDEVENTS_EVENT_TYPE. + 'cloudevents.event_type' + ``` + + + """ + @spec cloudevents_event_type :: :"cloudevents.event_type" + def cloudevents_event_type do + :"cloudevents.event_type" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex new file mode 100644 index 00000000..154e989a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex @@ -0,0 +1,204 @@ +defmodule OpenTelemetry.SemConv.Incubating.CodeAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Code attributes. + """ + + @doc """ + The column number in `code.filepath` best representing the operation. It **SHOULD** point within the code unit named in `code.function`. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 16 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_column() + :"code.column" + + ### Erlang + + ```erlang + ?CODE_COLUMN. + 'code.column' + ``` + + + """ + @spec code_column :: :"code.column" + def code_column do + :"code.column" + end + + @doc """ + The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + /usr/local/MyApplication/content_root/app/index.php + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_filepath() + :"code.filepath" + + ### Erlang + + ```erlang + ?CODE_FILEPATH. + 'code.filepath' + ``` + + + """ + @spec code_filepath :: :"code.filepath" + def code_filepath do + :"code.filepath" + end + + @doc """ + The method or function name, or equivalent (usually rightmost part of the code unit's name). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + serveRequest + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_function() + :"code.function" + + ### Erlang + + ```erlang + ?CODE_FUNCTION. + 'code.function' + ``` + + + """ + @spec code_function :: :"code.function" + def code_function do + :"code.function" + end + + @doc """ + The line number in `code.filepath` best representing the operation. It **SHOULD** point within the code unit named in `code.function`. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 42 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_lineno() + :"code.lineno" + + ### Erlang + + ```erlang + ?CODE_LINENO. + 'code.lineno' + ``` + + + """ + @spec code_lineno :: :"code.lineno" + def code_lineno do + :"code.lineno" + end + + @doc """ + The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + com.example.MyHttpService + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_namespace() + :"code.namespace" + + ### Erlang + + ```erlang + ?CODE_NAMESPACE. + 'code.namespace' + ``` + + + """ + @spec code_namespace :: :"code.namespace" + def code_namespace do + :"code.namespace" + end + + @doc """ + A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5) + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_stacktrace() + :"code.stacktrace" + + ### Erlang + + ```erlang + ?CODE_STACKTRACE. + 'code.stacktrace' + ``` + + + """ + @spec code_stacktrace :: :"code.stacktrace" + def code_stacktrace do + :"code.stacktrace" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/container_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/container_attributes.ex new file mode 100644 index 00000000..531bd0fb --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/container_attributes.ex @@ -0,0 +1,421 @@ +defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Container attributes. + """ + + @doc """ + The command used to run the container (i.e. the command name). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. + + ### Examples + + ``` + ["otelcontribcol"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_command() + :"container.command" + + ### Erlang + + ```erlang + ?CONTAINER_COMMAND. + 'container.command' + ``` + + + """ + @spec container_command :: :"container.command" + def container_command do + :"container.command" + end + + @doc """ + All the command arguments (including the command/executable itself) run by the container. [2] + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["otelcontribcol, --config, config.yaml"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_command_args() + :"container.command_args" + + ### Erlang + + ```erlang + ?CONTAINER_COMMAND_ARGS. + 'container.command_args' + ``` + + + """ + @spec container_command_args :: :"container.command_args" + def container_command_args do + :"container.command_args" + end + + @doc """ + The full command run by the container as a single string representing the full command. [2] + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["otelcontribcol --config config.yaml"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_command_line() + :"container.command_line" + + ### Erlang + + ```erlang + ?CONTAINER_COMMAND_LINE. + 'container.command_line' + ``` + + + """ + @spec container_command_line :: :"container.command_line" + def container_command_line do + :"container.command_line" + end + + @typedoc """ + Deprecated, use `cpu.mode` instead. + + ### Enum Values + * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows). + * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - When CPU is used by the system (host OS) + * `:kernel` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows). + """ + @type container_cpu_state_values() :: %{ + :user => :user, + :system => :system, + :kernel => :kernel + } + @deprecated """ + Replaced by `cpu.mode` + """ + @spec container_cpu_state :: :"container.cpu.state" + def container_cpu_state do + :"container.cpu.state" + end + + @spec container_cpu_state_values() :: container_cpu_state_values() + def container_cpu_state_values() do + %{ + :user => :user, + :system => :system, + :kernel => :kernel + } + end + + @doc """ + Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["a3bf90e006b2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_id() + :"container.id" + + ### Erlang + + ```erlang + ?CONTAINER_ID. + 'container.id' + ``` + + + """ + @spec container_id :: :"container.id" + def container_id do + :"container.id" + end + + @doc """ + Runtime specific image identifier. Usually a hash algorithm followed by a UUID. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. + K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. + The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes. + + ### Examples + + ``` + ["sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_image_id() + :"container.image.id" + + ### Erlang + + ```erlang + ?CONTAINER_IMAGE_ID. + 'container.image.id' + ``` + + + """ + @spec container_image_id :: :"container.image.id" + def container_image_id do + :"container.image.id" + end + + @doc """ + Name of the image the container was built on. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["gcr.io/opentelemetry/operator"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_image_name() + :"container.image.name" + + ### Erlang + + ```erlang + ?CONTAINER_IMAGE_NAME. + 'container.image.name' + ``` + + + """ + @spec container_image_name :: :"container.image.name" + def container_image_name do + :"container.image.name" + end + + @doc """ + Repo digests of the container image as provided by the container runtime. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. + + ### Examples + + ``` + ["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_image_repo_digests() + :"container.image.repo_digests" + + ### Erlang + + ```erlang + ?CONTAINER_IMAGE_REPO_DIGESTS. + 'container.image.repo_digests' + ``` + + + """ + @spec container_image_repo_digests :: :"container.image.repo_digests" + def container_image_repo_digests do + :"container.image.repo_digests" + end + + @doc """ + Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["v1.27.1", "3.5.7-0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_image_tags() + :"container.image.tags" + + ### Erlang + + ```erlang + ?CONTAINER_IMAGE_TAGS. + 'container.image.tags' + ``` + + + """ + @spec container_image_tags :: :"container.image.tags" + def container_image_tags do + :"container.image.tags" + end + + @doc """ + Container labels, `` being the label name, the value being the label value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["container.label.app=nginx"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_label() + :"container.label" + + ### Erlang + + ```erlang + ?CONTAINER_LABEL. + 'container.label' + ``` + + + """ + @spec container_label :: :"container.label" + def container_label do + :"container.label" + end + + @deprecated """ + Replaced by `container.label`. + """ + @spec container_labels :: :"container.labels" + def container_labels do + :"container.labels" + end + + @doc """ + Container name used by container runtime. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry-autoconf"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_name() + :"container.name" + + ### Erlang + + ```erlang + ?CONTAINER_NAME. + 'container.name' + ``` + + + """ + @spec container_name :: :"container.name" + def container_name do + :"container.name" + end + + @doc """ + The container runtime managing this container. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["docker", "containerd", "rkt"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_runtime() + :"container.runtime" + + ### Erlang + + ```erlang + ?CONTAINER_RUNTIME. + 'container.runtime' + ``` + + + """ + @spec container_runtime :: :"container.runtime" + def container_runtime do + :"container.runtime" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex new file mode 100644 index 00000000..b953cb15 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex @@ -0,0 +1,85 @@ +defmodule OpenTelemetry.SemConv.Incubating.CpuAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cpu attributes. + """ + + @typedoc """ + The mode of the CPU + + ### Enum Values + * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:nice` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:iowait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:interrupt` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:steal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:kernel` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type cpu_mode_values() :: %{ + :user => :user, + :system => :system, + :nice => :nice, + :idle => :idle, + :iowait => :iowait, + :interrupt => :interrupt, + :steal => :steal, + :kernel => :kernel + } + @doc """ + The mode of the CPU + + ### Examples + + ``` + ["user", "system"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_mode() + :"cpu.mode" + + iex> OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_mode_values().user + :user + + iex> %{OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_mode() => OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_mode_values().user} + %{:"cpu.mode" => :user} + + ### Erlang + + ```erlang + ?CPU_MODE. + 'cpu.mode' + + ?CPU_MODE_VALUES_USER. + 'user' + + \#{?CPU_MODE => ?CPU_MODE_VALUES_USER}. + \#{'cpu.mode' => 'user'} + ``` + + + """ + @spec cpu_mode :: :"cpu.mode" + def cpu_mode do + :"cpu.mode" + end + + @spec cpu_mode_values() :: cpu_mode_values() + def cpu_mode_values() do + %{ + :user => :user, + :system => :system, + :nice => :nice, + :idle => :idle, + :iowait => :iowait, + :interrupt => :interrupt, + :steal => :steal, + :kernel => :kernel + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex new file mode 100644 index 00000000..7cc22a87 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex @@ -0,0 +1,1349 @@ +defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for DB attributes. + """ + + @typedoc """ + The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + + + ### Enum Values + * `:all` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:each_quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:local_quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:one` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:two` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:three` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:local_one` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:any` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:serial` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:local_serial` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type db_cassandra_consistency_level_values() :: %{ + :all => :all, + :each_quorum => :each_quorum, + :quorum => :quorum, + :local_quorum => :local_quorum, + :one => :one, + :two => :two, + :three => :three, + :local_one => :local_one, + :any => :any, + :serial => :serial, + :local_serial => :local_serial + } + @doc """ + The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_consistency_level() + :"db.cassandra.consistency_level" + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_consistency_level_values().all + :all + + iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_consistency_level() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_consistency_level_values().all} + %{:"db.cassandra.consistency_level" => :all} + + ### Erlang + + ```erlang + ?DB_CASSANDRA_CONSISTENCY_LEVEL. + 'db.cassandra.consistency_level' + + ?DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL. + 'all' + + \#{?DB_CASSANDRA_CONSISTENCY_LEVEL => ?DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL}. + \#{'db.cassandra.consistency_level' => 'all'} + ``` + + + """ + @spec db_cassandra_consistency_level :: :"db.cassandra.consistency_level" + def db_cassandra_consistency_level do + :"db.cassandra.consistency_level" + end + + @spec db_cassandra_consistency_level_values() :: db_cassandra_consistency_level_values() + def db_cassandra_consistency_level_values() do + %{ + :all => :all, + :each_quorum => :each_quorum, + :quorum => :quorum, + :local_quorum => :local_quorum, + :one => :one, + :two => :two, + :three => :three, + :local_one => :local_one, + :any => :any, + :serial => :serial, + :local_serial => :local_serial + } + end + + @doc """ + The data center of the coordinating node for a query. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + us-west-2 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_coordinator_dc() + :"db.cassandra.coordinator.dc" + + ### Erlang + + ```erlang + ?DB_CASSANDRA_COORDINATOR_DC. + 'db.cassandra.coordinator.dc' + ``` + + + """ + @spec db_cassandra_coordinator_dc :: :"db.cassandra.coordinator.dc" + def db_cassandra_coordinator_dc do + :"db.cassandra.coordinator.dc" + end + + @doc """ + The ID of the coordinating node for a query. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + be13faa2-8574-4d71-926d-27f16cf8a7af + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_coordinator_id() + :"db.cassandra.coordinator.id" + + ### Erlang + + ```erlang + ?DB_CASSANDRA_COORDINATOR_ID. + 'db.cassandra.coordinator.id' + ``` + + + """ + @spec db_cassandra_coordinator_id :: :"db.cassandra.coordinator.id" + def db_cassandra_coordinator_id do + :"db.cassandra.coordinator.id" + end + + @doc """ + Whether or not the query is idempotent. + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_idempotence() + :"db.cassandra.idempotence" + + ### Erlang + + ```erlang + ?DB_CASSANDRA_IDEMPOTENCE. + 'db.cassandra.idempotence' + ``` + + + """ + @spec db_cassandra_idempotence :: :"db.cassandra.idempotence" + def db_cassandra_idempotence do + :"db.cassandra.idempotence" + end + + @doc """ + The fetch size used for paging, i.e. how many rows will be returned at once. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [5000] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_page_size() + :"db.cassandra.page_size" + + ### Erlang + + ```erlang + ?DB_CASSANDRA_PAGE_SIZE. + 'db.cassandra.page_size' + ``` + + + """ + @spec db_cassandra_page_size :: :"db.cassandra.page_size" + def db_cassandra_page_size do + :"db.cassandra.page_size" + end + + @doc """ + The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [0, 2] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_speculative_execution_count() + :"db.cassandra.speculative_execution_count" + + ### Erlang + + ```erlang + ?DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT. + 'db.cassandra.speculative_execution_count' + ``` + + + """ + @spec db_cassandra_speculative_execution_count :: :"db.cassandra.speculative_execution_count" + def db_cassandra_speculative_execution_count do + :"db.cassandra.speculative_execution_count" + end + + @deprecated """ + Replaced by `db.collection.name`. + """ + @spec db_cassandra_table :: :"db.cassandra.table" + def db_cassandra_table do + :"db.cassandra.table" + end + + @doc """ + The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation **SHOULD** use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns **SHOULD** document it. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["myDataSource"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_client_connection_pool_name() + :"db.client.connection.pool.name" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_POOL_NAME. + 'db.client.connection.pool.name' + ``` + + + """ + @spec db_client_connection_pool_name :: :"db.client.connection.pool.name" + def db_client_connection_pool_name do + :"db.client.connection.pool.name" + end + + @typedoc """ + The state of a connection in the pool + + ### Enum Values + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type db_client_connection_state_values() :: %{ + :idle => :idle, + :used => :used + } + @doc """ + The state of a connection in the pool + + ### Examples + + ``` + ["idle"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_client_connection_state() + :"db.client.connection.state" + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_client_connection_state_values().idle + :idle + + iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_client_connection_state() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_client_connection_state_values().idle} + %{:"db.client.connection.state" => :idle} + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_STATE. + 'db.client.connection.state' + + ?DB_CLIENT_CONNECTION_STATE_VALUES_IDLE. + 'idle' + + \#{?DB_CLIENT_CONNECTION_STATE => ?DB_CLIENT_CONNECTION_STATE_VALUES_IDLE}. + \#{'db.client.connection.state' => 'idle'} + ``` + + + """ + @spec db_client_connection_state :: :"db.client.connection.state" + def db_client_connection_state do + :"db.client.connection.state" + end + + @spec db_client_connection_state_values() :: db_client_connection_state_values() + def db_client_connection_state_values() do + %{ + :idle => :idle, + :used => :used + } + end + + @deprecated """ + Replaced by `db.client.connection.pool.name`. + """ + @spec db_client_connections_pool_name :: :"db.client.connections.pool.name" + def db_client_connections_pool_name do + :"db.client.connections.pool.name" + end + + @typedoc """ + Deprecated, use `db.client.connection.state` instead. + + ### Enum Values + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type db_client_connections_state_values() :: %{ + :idle => :idle, + :used => :used + } + @deprecated """ + Replaced by `db.client.connection.state`. + """ + @spec db_client_connections_state :: :"db.client.connections.state" + def db_client_connections_state do + :"db.client.connections.state" + end + + @spec db_client_connections_state_values() :: db_client_connections_state_values() + def db_client_connections_state_values() do + %{ + :idle => :idle, + :used => :used + } + end + + @doc """ + The name of a collection (table, container) within the database. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. + If the collection name is parsed from the query text, it **SHOULD** be the first collection name found in the query and it **SHOULD** match the value provided in the query text including any schema and database name prefix. + For batch operations, if the individual operations are known to have the same collection name then that collection name **SHOULD** be used, otherwise `db.collection.name` **SHOULD** **NOT** be captured. + + ### Examples + + ``` + ["public.users", "customers"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_collection_name() + :"db.collection.name" + + ### Erlang + + ```erlang + ?DB_COLLECTION_NAME. + 'db.collection.name' + ``` + + + """ + @spec db_collection_name :: :"db.collection.name" + def db_collection_name do + :"db.collection.name" + end + + @deprecated """ + "Replaced by `server.address` and `server.port`." + + """ + @spec db_connection_string :: :"db.connection_string" + def db_connection_string do + :"db.connection_string" + end + + @doc """ + Unique Cosmos client instance id. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 3ba4827d-4422-483f-b59f-85b74211c11d + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_client_id() + :"db.cosmosdb.client_id" + + ### Erlang + + ```erlang + ?DB_COSMOSDB_CLIENT_ID. + 'db.cosmosdb.client_id' + ``` + + + """ + @spec db_cosmosdb_client_id :: :"db.cosmosdb.client_id" + def db_cosmosdb_client_id do + :"db.cosmosdb.client_id" + end + + @typedoc """ + Cosmos client connection mode. + + ### Enum Values + * `:gateway` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Gateway (HTTP) connections mode + * `:direct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Direct connection. + """ + @type db_cosmosdb_connection_mode_values() :: %{ + :gateway => :gateway, + :direct => :direct + } + @doc """ + Cosmos client connection mode. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_connection_mode() + :"db.cosmosdb.connection_mode" + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_connection_mode_values().gateway + :gateway + + iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_connection_mode() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_connection_mode_values().gateway} + %{:"db.cosmosdb.connection_mode" => :gateway} + + ### Erlang + + ```erlang + ?DB_COSMOSDB_CONNECTION_MODE. + 'db.cosmosdb.connection_mode' + + ?DB_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY. + 'gateway' + + \#{?DB_COSMOSDB_CONNECTION_MODE => ?DB_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY}. + \#{'db.cosmosdb.connection_mode' => 'gateway'} + ``` + + + """ + @spec db_cosmosdb_connection_mode :: :"db.cosmosdb.connection_mode" + def db_cosmosdb_connection_mode do + :"db.cosmosdb.connection_mode" + end + + @spec db_cosmosdb_connection_mode_values() :: db_cosmosdb_connection_mode_values() + def db_cosmosdb_connection_mode_values() do + %{ + :gateway => :gateway, + :direct => :direct + } + end + + @deprecated """ + Replaced by `db.collection.name`. + """ + @spec db_cosmosdb_container :: :"db.cosmosdb.container" + def db_cosmosdb_container do + :"db.cosmosdb.container" + end + + @typedoc """ + CosmosDB Operation Type. + + ### Enum Values + * `:invalid` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:create` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:patch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:read` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:read_feed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:delete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:replace` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:execute` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:query` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:head` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:head_feed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:upsert` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:batch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:query_plan` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:execute_javascript` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type db_cosmosdb_operation_type_values() :: %{ + :invalid => :Invalid, + :create => :Create, + :patch => :Patch, + :read => :Read, + :read_feed => :ReadFeed, + :delete => :Delete, + :replace => :Replace, + :execute => :Execute, + :query => :Query, + :head => :Head, + :head_feed => :HeadFeed, + :upsert => :Upsert, + :batch => :Batch, + :query_plan => :QueryPlan, + :execute_javascript => :ExecuteJavaScript + } + @doc """ + CosmosDB Operation Type. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_operation_type() + :"db.cosmosdb.operation_type" + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_operation_type_values().invalid + :Invalid + + iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_operation_type() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_operation_type_values().invalid} + %{:"db.cosmosdb.operation_type" => :Invalid} + + ### Erlang + + ```erlang + ?DB_COSMOSDB_OPERATION_TYPE. + 'db.cosmosdb.operation_type' + + ?DB_COSMOSDB_OPERATION_TYPE_VALUES_INVALID. + 'Invalid' + + \#{?DB_COSMOSDB_OPERATION_TYPE => ?DB_COSMOSDB_OPERATION_TYPE_VALUES_INVALID}. + \#{'db.cosmosdb.operation_type' => 'Invalid'} + ``` + + + """ + @spec db_cosmosdb_operation_type :: :"db.cosmosdb.operation_type" + def db_cosmosdb_operation_type do + :"db.cosmosdb.operation_type" + end + + @spec db_cosmosdb_operation_type_values() :: db_cosmosdb_operation_type_values() + def db_cosmosdb_operation_type_values() do + %{ + :invalid => :Invalid, + :create => :Create, + :patch => :Patch, + :read => :Read, + :read_feed => :ReadFeed, + :delete => :Delete, + :replace => :Replace, + :execute => :Execute, + :query => :Query, + :head => :Head, + :head_feed => :HeadFeed, + :upsert => :Upsert, + :batch => :Batch, + :query_plan => :QueryPlan, + :execute_javascript => :ExecuteJavaScript + } + end + + @doc """ + RU consumed for that operation + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [46.18, 1.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_request_charge() + :"db.cosmosdb.request_charge" + + ### Erlang + + ```erlang + ?DB_COSMOSDB_REQUEST_CHARGE. + 'db.cosmosdb.request_charge' + ``` + + + """ + @spec db_cosmosdb_request_charge :: :"db.cosmosdb.request_charge" + def db_cosmosdb_request_charge do + :"db.cosmosdb.request_charge" + end + + @doc """ + Request payload size in bytes + ### Value type + + Value must be of type `integer()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_request_content_length() + :"db.cosmosdb.request_content_length" + + ### Erlang + + ```erlang + ?DB_COSMOSDB_REQUEST_CONTENT_LENGTH. + 'db.cosmosdb.request_content_length' + ``` + + + """ + @spec db_cosmosdb_request_content_length :: :"db.cosmosdb.request_content_length" + def db_cosmosdb_request_content_length do + :"db.cosmosdb.request_content_length" + end + + @doc """ + Cosmos DB status code. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [200, 201] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_status_code() + :"db.cosmosdb.status_code" + + ### Erlang + + ```erlang + ?DB_COSMOSDB_STATUS_CODE. + 'db.cosmosdb.status_code' + ``` + + + """ + @spec db_cosmosdb_status_code :: :"db.cosmosdb.status_code" + def db_cosmosdb_status_code do + :"db.cosmosdb.status_code" + end + + @doc """ + Cosmos DB sub status code. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [1000, 1002] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_sub_status_code() + :"db.cosmosdb.sub_status_code" + + ### Erlang + + ```erlang + ?DB_COSMOSDB_SUB_STATUS_CODE. + 'db.cosmosdb.sub_status_code' + ``` + + + """ + @spec db_cosmosdb_sub_status_code :: :"db.cosmosdb.sub_status_code" + def db_cosmosdb_sub_status_code do + :"db.cosmosdb.sub_status_code" + end + + @deprecated """ + Replaced by `db.namespace`. + """ + @spec db_elasticsearch_cluster_name :: :"db.elasticsearch.cluster.name" + def db_elasticsearch_cluster_name do + :"db.elasticsearch.cluster.name" + end + + @doc """ + Represents the human-readable identifier of the node/instance to which a request was routed. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["instance-0000000001"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_elasticsearch_node_name() + :"db.elasticsearch.node.name" + + ### Erlang + + ```erlang + ?DB_ELASTICSEARCH_NODE_NAME. + 'db.elasticsearch.node.name' + ``` + + + """ + @spec db_elasticsearch_node_name :: :"db.elasticsearch.node.name" + def db_elasticsearch_node_name do + :"db.elasticsearch.node.name" + end + + @doc """ + A dynamic value in the url path. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Many Elasticsearch url paths allow dynamic values. These **SHOULD** be recorded in span attributes in the format `db.elasticsearch.path_parts.`, where `` is the url path part name. The implementation **SHOULD** reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. + + ### Examples + + ``` + ["db.elasticsearch.path_parts.index=test-index", "db.elasticsearch.path_parts.doc_id=123"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_elasticsearch_path_parts() + :"db.elasticsearch.path_parts" + + ### Erlang + + ```erlang + ?DB_ELASTICSEARCH_PATH_PARTS. + 'db.elasticsearch.path_parts' + ``` + + + """ + @spec db_elasticsearch_path_parts :: :"db.elasticsearch.path_parts" + def db_elasticsearch_path_parts do + :"db.elasticsearch.path_parts" + end + + @deprecated """ + Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. + """ + @spec db_instance_id :: :"db.instance.id" + def db_instance_id do + :"db.instance.id" + end + + @deprecated """ + Removed as not used. + """ + @spec db_jdbc_driver_classname :: :"db.jdbc.driver_classname" + def db_jdbc_driver_classname do + :"db.jdbc.driver_classname" + end + + @deprecated """ + Replaced by `db.collection.name`. + """ + @spec db_mongodb_collection :: :"db.mongodb.collection" + def db_mongodb_collection do + :"db.mongodb.collection" + end + + @deprecated """ + Deprecated, no replacement at this time. + """ + @spec db_mssql_instance_name :: :"db.mssql.instance_name" + def db_mssql_instance_name do + :"db.mssql.instance_name" + end + + @deprecated """ + Replaced by `db.namespace`. + """ + @spec db_name :: :"db.name" + def db_name do + :"db.name" + end + + @doc """ + The name of the database, fully qualified within the server address and port. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + If a database system has multiple namespace components, they **SHOULD** be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces **SHOULD** **NOT** be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid. + Semantic conventions for individual database systems **SHOULD** document what `db.namespace` means in the context of that system. + It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. + + ### Examples + + ``` + ["customers", "test.users"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_namespace() + :"db.namespace" + + ### Erlang + + ```erlang + ?DB_NAMESPACE. + 'db.namespace' + ``` + + + """ + @spec db_namespace :: :"db.namespace" + def db_namespace do + :"db.namespace" + end + + @deprecated """ + Replaced by `db.operation.name`. + """ + @spec db_operation :: :"db.operation" + def db_operation do + :"db.operation" + end + + @doc """ + The number of queries included in a [batch operation](/docs/database/database-spans.md#batch-operations). + ### Value type + + Value must be of type `integer()`. + ### Notes + + Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` **SHOULD** never be `1`. + + ### Examples + + ``` + [2, 3, 4] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_operation_batch_size() + :"db.operation.batch.size" + + ### Erlang + + ```erlang + ?DB_OPERATION_BATCH_SIZE. + 'db.operation.batch.size' + ``` + + + """ + @spec db_operation_batch_size :: :"db.operation.batch.size" + def db_operation_batch_size do + :"db.operation.batch.size" + end + + @doc """ + The name of the operation or command being executed. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. + If the operation name is parsed from the query text, it **SHOULD** be the first operation name found in the query. + For batch operations, if the individual operations are known to have the same operation name then that operation name **SHOULD** be used prepended by `BATCH `, otherwise `db.operation.name` **SHOULD** be `BATCH` or some other database system specific term if more applicable. + + ### Examples + + ``` + ["findAndModify", "HMSET", "SELECT"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_operation_name() + :"db.operation.name" + + ### Erlang + + ```erlang + ?DB_OPERATION_NAME. + 'db.operation.name' + ``` + + + """ + @spec db_operation_name :: :"db.operation.name" + def db_operation_name do + :"db.operation.name" + end + + @doc """ + A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Query parameters should only be captured when `db.query.text` is parameterized with placeholders. + If a parameter has no name and instead is referenced only by index, then `` **SHOULD** be the 0-based index. + + ### Examples + + ``` + ["someval", "55"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_query_parameter() + :"db.query.parameter" + + ### Erlang + + ```erlang + ?DB_QUERY_PARAMETER. + 'db.query.parameter' + ``` + + + """ + @spec db_query_parameter :: :"db.query.parameter" + def db_query_parameter do + :"db.query.parameter" + end + + @doc """ + The database query being executed. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). + For batch operations, if the individual operations are known to have the same query text then that query text **SHOULD** be used, otherwise all of the individual query texts **SHOULD** be concatenated with separator `; ` or some other database system specific separator if more applicable. + Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. + + ### Examples + + ``` + ["SELECT * FROM wuser_table where username = ?", "SET mykey \"WuValue\""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_query_text() + :"db.query.text" + + ### Erlang + + ```erlang + ?DB_QUERY_TEXT. + 'db.query.text' + ``` + + + """ + @spec db_query_text :: :"db.query.text" + def db_query_text do + :"db.query.text" + end + + @deprecated """ + Replaced by `db.namespace`. + """ + @spec db_redis_database_index :: :"db.redis.database_index" + def db_redis_database_index do + :"db.redis.database_index" + end + + @deprecated """ + Replaced by `db.collection.name`. + """ + @spec db_sql_table :: :"db.sql.table" + def db_sql_table do + :"db.sql.table" + end + + @deprecated """ + Replaced by `db.query.text`. + """ + @spec db_statement :: :"db.statement" + def db_statement do + :"db.statement" + end + + @typedoc """ + The database management system (DBMS) product as identified by the client instrumentation. + + ### Enum Values + * `:other_sql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Some other SQL database. Fallback only. See notes. + * `:adabas` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Adabas (Adaptable Database System) + * `:cache` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, use `intersystems_cache` instead.~~ + * `:intersystems_cache` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - InterSystems Caché + * `:cassandra` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Cassandra + * `:clickhouse` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - ClickHouse + * `:cloudscape` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, use `other_sql` instead.~~ + * `:cockroachdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - CockroachDB + * `:coldfusion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, no replacement at this time.~~ + * `:cosmosdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Microsoft Azure Cosmos DB + * `:couchbase` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Couchbase + * `:couchdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - CouchDB + * `:db2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IBM Db2 + * `:derby` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Derby + * `:dynamodb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon DynamoDB + * `:edb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - EnterpriseDB + * `:elasticsearch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Elasticsearch + * `:filemaker` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - FileMaker + * `:firebird` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Firebird + * `:firstsql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, use `other_sql` instead.~~ + * `:geode` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Geode + * `:h2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - H2 + * `:hanadb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - SAP HANA + * `:hbase` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache HBase + * `:hive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Hive + * `:hsqldb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HyperSQL DataBase + * `:influxdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - InfluxDB + * `:informix` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Informix + * `:ingres` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Ingres + * `:instantdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - InstantDB + * `:interbase` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - InterBase + * `:mariadb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - MariaDB + * `:maxdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - SAP MaxDB + * `:memcached` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Memcached + * `:mongodb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - MongoDB + * `:mssql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Microsoft SQL Server + * `:mssqlcompact` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, Microsoft SQL Server Compact is discontinued.~~ + * `:mysql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - MySQL + * `:neo4j` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Neo4j + * `:netezza` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Netezza + * `:opensearch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OpenSearch + * `:oracle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Oracle Database + * `:pervasive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Pervasive PSQL + * `:pointbase` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - PointBase + * `:postgresql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - PostgreSQL + * `:progress` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Progress Database + * `:redis` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Redis + * `:redshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon Redshift + * `:spanner` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Cloud Spanner + * `:sqlite` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - SQLite + * `:sybase` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Sybase + * `:teradata` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Teradata + * `:trino` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Trino + * `:vertica` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Vertica + """ + @type db_system_values() :: %{ + :other_sql => :other_sql, + :adabas => :adabas, + :cache => :cache, + :intersystems_cache => :intersystems_cache, + :cassandra => :cassandra, + :clickhouse => :clickhouse, + :cloudscape => :cloudscape, + :cockroachdb => :cockroachdb, + :coldfusion => :coldfusion, + :cosmosdb => :cosmosdb, + :couchbase => :couchbase, + :couchdb => :couchdb, + :db2 => :db2, + :derby => :derby, + :dynamodb => :dynamodb, + :edb => :edb, + :elasticsearch => :elasticsearch, + :filemaker => :filemaker, + :firebird => :firebird, + :firstsql => :firstsql, + :geode => :geode, + :h2 => :h2, + :hanadb => :hanadb, + :hbase => :hbase, + :hive => :hive, + :hsqldb => :hsqldb, + :influxdb => :influxdb, + :informix => :informix, + :ingres => :ingres, + :instantdb => :instantdb, + :interbase => :interbase, + :mariadb => :mariadb, + :maxdb => :maxdb, + :memcached => :memcached, + :mongodb => :mongodb, + :mssql => :mssql, + :mssqlcompact => :mssqlcompact, + :mysql => :mysql, + :neo4j => :neo4j, + :netezza => :netezza, + :opensearch => :opensearch, + :oracle => :oracle, + :pervasive => :pervasive, + :pointbase => :pointbase, + :postgresql => :postgresql, + :progress => :progress, + :redis => :redis, + :redshift => :redshift, + :spanner => :spanner, + :sqlite => :sqlite, + :sybase => :sybase, + :teradata => :teradata, + :trino => :trino, + :vertica => :vertica + } + @doc """ + The database management system (DBMS) product as identified by the client instrumentation. + + ### Notes + + The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system` is set to `postgresql` based on the instrumentation's best knowledge. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_system() + :"db.system" + + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_system_values().other_sql + :other_sql + + iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_system() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_system_values().other_sql} + %{:"db.system" => :other_sql} + + ### Erlang + + ```erlang + ?DB_SYSTEM. + 'db.system' + + ?DB_SYSTEM_VALUES_OTHER_SQL. + 'other_sql' + + \#{?DB_SYSTEM => ?DB_SYSTEM_VALUES_OTHER_SQL}. + \#{'db.system' => 'other_sql'} + ``` + + + """ + @spec db_system :: :"db.system" + def db_system do + :"db.system" + end + + @spec db_system_values() :: db_system_values() + def db_system_values() do + %{ + :other_sql => :other_sql, + :adabas => :adabas, + :cache => :cache, + :intersystems_cache => :intersystems_cache, + :cassandra => :cassandra, + :clickhouse => :clickhouse, + :cloudscape => :cloudscape, + :cockroachdb => :cockroachdb, + :coldfusion => :coldfusion, + :cosmosdb => :cosmosdb, + :couchbase => :couchbase, + :couchdb => :couchdb, + :db2 => :db2, + :derby => :derby, + :dynamodb => :dynamodb, + :edb => :edb, + :elasticsearch => :elasticsearch, + :filemaker => :filemaker, + :firebird => :firebird, + :firstsql => :firstsql, + :geode => :geode, + :h2 => :h2, + :hanadb => :hanadb, + :hbase => :hbase, + :hive => :hive, + :hsqldb => :hsqldb, + :influxdb => :influxdb, + :informix => :informix, + :ingres => :ingres, + :instantdb => :instantdb, + :interbase => :interbase, + :mariadb => :mariadb, + :maxdb => :maxdb, + :memcached => :memcached, + :mongodb => :mongodb, + :mssql => :mssql, + :mssqlcompact => :mssqlcompact, + :mysql => :mysql, + :neo4j => :neo4j, + :netezza => :netezza, + :opensearch => :opensearch, + :oracle => :oracle, + :pervasive => :pervasive, + :pointbase => :pointbase, + :postgresql => :postgresql, + :progress => :progress, + :redis => :redis, + :redshift => :redshift, + :spanner => :spanner, + :sqlite => :sqlite, + :sybase => :sybase, + :teradata => :teradata, + :trino => :trino, + :vertica => :vertica + } + end + + @deprecated """ + No replacement at this time. + """ + @spec db_user :: :"db.user" + def db_user do + :"db.user" + end + + @deprecated """ + Replaced by `db.client.connection.pool.name`. + """ + @spec pool_name :: :"pool.name" + def pool_name do + :"pool.name" + end + + @typedoc """ + Deprecated, use `db.client.connection.state` instead. + + ### Enum Values + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type state_values() :: %{ + :idle => :idle, + :used => :used + } + @deprecated """ + Replaced by `db.client.connection.state`. + """ + @spec state :: :state + def state do + :state + end + + @spec state_values() :: state_values() + def state_values() do + %{ + :idle => :idle, + :used => :used + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex new file mode 100644 index 00000000..daf364bf --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex @@ -0,0 +1,181 @@ +defmodule OpenTelemetry.SemConv.Incubating.DeploymentAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Deployment attributes. + """ + + @deprecated """ + Deprecated, use `deployment.environment.name` instead. + """ + @spec deployment_environment :: :"deployment.environment" + def deployment_environment do + :"deployment.environment" + end + + @doc """ + Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + `deployment.environment.name` does not affect the uniqueness constraints defined through + the `service.namespace`, `service.name` and `service.instance.id` resource attributes. + This implies that resources carrying the following attribute combinations **MUST** be + considered to be identifying the same service: + + * `service.name=frontend`, `deployment.environment.name=production` + * `service.name=frontend`, `deployment.environment.name=staging`. + + ### Examples + + ``` + ["staging", "production"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DeploymentAttributes.deployment_environment_name() + :"deployment.environment.name" + + ### Erlang + + ```erlang + ?DEPLOYMENT_ENVIRONMENT_NAME. + 'deployment.environment.name' + ``` + + + """ + @spec deployment_environment_name :: :"deployment.environment.name" + def deployment_environment_name do + :"deployment.environment.name" + end + + @doc """ + The id of the deployment. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1208"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DeploymentAttributes.deployment_id() + :"deployment.id" + + ### Erlang + + ```erlang + ?DEPLOYMENT_ID. + 'deployment.id' + ``` + + + """ + @spec deployment_id :: :"deployment.id" + def deployment_id do + :"deployment.id" + end + + @doc """ + The name of the deployment. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["deploy my app", "deploy-frontend"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DeploymentAttributes.deployment_name() + :"deployment.name" + + ### Erlang + + ```erlang + ?DEPLOYMENT_NAME. + 'deployment.name' + ``` + + + """ + @spec deployment_name :: :"deployment.name" + def deployment_name do + :"deployment.name" + end + + @typedoc """ + The status of the deployment. + + + ### Enum Values + * `:failed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - failed + * `:succeeded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - succeeded + """ + @type deployment_status_values() :: %{ + :failed => :failed, + :succeeded => :succeeded + } + @doc """ + The status of the deployment. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DeploymentAttributes.deployment_status() + :"deployment.status" + + iex> OpenTelemetry.SemConv.Incubating.DeploymentAttributes.deployment_status_values().failed + :failed + + iex> %{OpenTelemetry.SemConv.Incubating.DeploymentAttributes.deployment_status() => OpenTelemetry.SemConv.Incubating.DeploymentAttributes.deployment_status_values().failed} + %{:"deployment.status" => :failed} + + ### Erlang + + ```erlang + ?DEPLOYMENT_STATUS. + 'deployment.status' + + ?DEPLOYMENT_STATUS_VALUES_FAILED. + 'failed' + + \#{?DEPLOYMENT_STATUS => ?DEPLOYMENT_STATUS_VALUES_FAILED}. + \#{'deployment.status' => 'failed'} + ``` + + + """ + @spec deployment_status :: :"deployment.status" + def deployment_status do + :"deployment.status" + end + + @spec deployment_status_values() :: deployment_status_values() + def deployment_status_values() do + %{ + :failed => :failed, + :succeeded => :succeeded + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/destination_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/destination_attributes.ex new file mode 100644 index 00000000..79f50f43 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/destination_attributes.ex @@ -0,0 +1,74 @@ +defmodule OpenTelemetry.SemConv.Incubating.DestinationAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Destination attributes. + """ + + @doc """ + Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + When observed from the source side, and when communicating through an intermediary, `destination.address` **SHOULD** represent the destination address behind any intermediaries, for example proxies, if it's available. + + ### Examples + + ``` + ["destination.example.com", "10.1.2.80", "/tmp/my.sock"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DestinationAttributes.destination_address() + :"destination.address" + + ### Erlang + + ```erlang + ?DESTINATION_ADDRESS. + 'destination.address' + ``` + + + """ + @spec destination_address :: :"destination.address" + def destination_address do + :"destination.address" + end + + @doc """ + Destination port number + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [3389, 2888] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DestinationAttributes.destination_port() + :"destination.port" + + ### Erlang + + ```erlang + ?DESTINATION_PORT. + 'destination.port' + ``` + + + """ + @spec destination_port :: :"destination.port" + def destination_port do + :"destination.port" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/device_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/device_attributes.ex new file mode 100644 index 00000000..3e77f70f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/device_attributes.ex @@ -0,0 +1,154 @@ +defmodule OpenTelemetry.SemConv.Incubating.DeviceAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Device attributes. + """ + + @doc """ + A unique identifier representing the device + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The device identifier **MUST** only be defined using the values outlined below. This value is not an advertising identifier and **MUST** **NOT** be used as such. On iOS (Swift or Objective-C), this value **MUST** be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value **MUST** be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. + + ### Examples + + ``` + ["2ab2916d-a51f-4ac8-80ee-45ac31a28092"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DeviceAttributes.device_id() + :"device.id" + + ### Erlang + + ```erlang + ?DEVICE_ID. + 'device.id' + ``` + + + """ + @spec device_id :: :"device.id" + def device_id do + :"device.id" + end + + @doc """ + The name of the device manufacturer + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps **SHOULD** hardcode the value `Apple`. + + ### Examples + + ``` + ["Apple", "Samsung"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DeviceAttributes.device_manufacturer() + :"device.manufacturer" + + ### Erlang + + ```erlang + ?DEVICE_MANUFACTURER. + 'device.manufacturer' + ``` + + + """ + @spec device_manufacturer :: :"device.manufacturer" + def device_manufacturer do + :"device.manufacturer" + end + + @doc """ + The model identifier for the device + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It's recommended this value represents a machine-readable version of the model identifier rather than the market or consumer-friendly name of the device. + + ### Examples + + ``` + ["iPhone3,4", "SM-G920F"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DeviceAttributes.device_model_identifier() + :"device.model.identifier" + + ### Erlang + + ```erlang + ?DEVICE_MODEL_IDENTIFIER. + 'device.model.identifier' + ``` + + + """ + @spec device_model_identifier :: :"device.model.identifier" + def device_model_identifier do + :"device.model.identifier" + end + + @doc """ + The marketing name for the device model + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative. + + ### Examples + + ``` + ["iPhone 6s Plus", "Samsung Galaxy S6"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DeviceAttributes.device_model_name() + :"device.model.name" + + ### Erlang + + ```erlang + ?DEVICE_MODEL_NAME. + 'device.model.name' + ``` + + + """ + @spec device_model_name :: :"device.model.name" + def device_model_name do + :"device.model.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/disk_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/disk_attributes.ex new file mode 100644 index 00000000..cc70bbd1 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/disk_attributes.ex @@ -0,0 +1,67 @@ +defmodule OpenTelemetry.SemConv.Incubating.DiskAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Disk attributes. + """ + + @typedoc """ + The disk IO operation direction. + + ### Enum Values + * `:read` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:write` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type disk_io_direction_values() :: %{ + :read => :read, + :write => :write + } + @doc """ + The disk IO operation direction. + + ### Examples + + ``` + ["read"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DiskAttributes.disk_io_direction() + :"disk.io.direction" + + iex> OpenTelemetry.SemConv.Incubating.DiskAttributes.disk_io_direction_values().read + :read + + iex> %{OpenTelemetry.SemConv.Incubating.DiskAttributes.disk_io_direction() => OpenTelemetry.SemConv.Incubating.DiskAttributes.disk_io_direction_values().read} + %{:"disk.io.direction" => :read} + + ### Erlang + + ```erlang + ?DISK_IO_DIRECTION. + 'disk.io.direction' + + ?DISK_IO_DIRECTION_VALUES_READ. + 'read' + + \#{?DISK_IO_DIRECTION => ?DISK_IO_DIRECTION_VALUES_READ}. + \#{'disk.io.direction' => 'read'} + ``` + + + """ + @spec disk_io_direction :: :"disk.io.direction" + def disk_io_direction do + :"disk.io.direction" + end + + @spec disk_io_direction_values() :: disk_io_direction_values() + def disk_io_direction_values() do + %{ + :read => :read, + :write => :write + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/dns_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/dns_attributes.ex new file mode 100644 index 00000000..0931ca23 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/dns_attributes.ex @@ -0,0 +1,42 @@ +defmodule OpenTelemetry.SemConv.Incubating.DNSAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for DNS attributes. + """ + + @doc """ + The name being queried. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively. + + ### Examples + + ``` + ["www.example.com", "opentelemetry.io"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DNSAttributes.dns_question_name() + :"dns.question.name" + + ### Erlang + + ```erlang + ?DNS_QUESTION_NAME. + 'dns.question.name' + ``` + + + """ + @spec dns_question_name :: :"dns.question.name" + def dns_question_name do + :"dns.question.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex new file mode 100644 index 00000000..6afd155d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex @@ -0,0 +1,30 @@ +defmodule OpenTelemetry.SemConv.Incubating.EnduserAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Enduser attributes. + """ + + @deprecated """ + Replaced by `user.id` attribute. + """ + @spec enduser_id :: :"enduser.id" + def enduser_id do + :"enduser.id" + end + + @deprecated """ + Replaced by `user.roles` attribute. + """ + @spec enduser_role :: :"enduser.role" + def enduser_role do + :"enduser.role" + end + + @deprecated """ + Removed. + """ + @spec enduser_scope :: :"enduser.scope" + def enduser_scope do + :"enduser.scope" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/event_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/event_attributes.ex new file mode 100644 index 00000000..521f4aeb --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/event_attributes.ex @@ -0,0 +1,43 @@ +defmodule OpenTelemetry.SemConv.Incubating.EventAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Event attributes. + """ + + @doc """ + Identifies the class / type of event. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes. + + ### Examples + + ``` + ["browser.mouse.click", "device.app.lifecycle"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.EventAttributes.event_name() + :"event.name" + + ### Erlang + + ```erlang + ?EVENT_NAME. + 'event.name' + ``` + + + """ + @spec event_name :: :"event.name" + def event_name do + :"event.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/faas_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/faas_attributes.ex new file mode 100644 index 00000000..d8b01347 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/faas_attributes.ex @@ -0,0 +1,673 @@ +defmodule OpenTelemetry.SemConv.Incubating.FAASAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for FAAS attributes. + """ + + @doc """ + A boolean that is true if the serverless function is executed for the first time (aka cold-start). + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_coldstart() + :"faas.coldstart" + + ### Erlang + + ```erlang + ?FAAS_COLDSTART. + 'faas.coldstart' + ``` + + + """ + @spec faas_coldstart :: :"faas.coldstart" + def faas_coldstart do + :"faas.coldstart" + end + + @doc """ + A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 0/5 * * * ? * + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_cron() + :"faas.cron" + + ### Erlang + + ```erlang + ?FAAS_CRON. + 'faas.cron' + ``` + + + """ + @spec faas_cron :: :"faas.cron" + def faas_cron do + :"faas.cron" + end + + @doc """ + The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["myBucketName", "myDbName"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_collection() + :"faas.document.collection" + + ### Erlang + + ```erlang + ?FAAS_DOCUMENT_COLLECTION. + 'faas.document.collection' + ``` + + + """ + @spec faas_document_collection :: :"faas.document.collection" + def faas_document_collection do + :"faas.document.collection" + end + + @doc """ + The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["myFile.txt", "myTableName"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_name() + :"faas.document.name" + + ### Erlang + + ```erlang + ?FAAS_DOCUMENT_NAME. + 'faas.document.name' + ``` + + + """ + @spec faas_document_name :: :"faas.document.name" + def faas_document_name do + :"faas.document.name" + end + + @typedoc """ + Describes the type of the operation that was performed on the data. + + ### Enum Values + * `:insert` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - When a new object is created. + * `:edit` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - When an object is modified. + * `:delete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - When an object is deleted. + """ + @type faas_document_operation_values() :: %{ + :insert => :insert, + :edit => :edit, + :delete => :delete + } + @doc """ + Describes the type of the operation that was performed on the data. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_operation() + :"faas.document.operation" + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_operation_values().insert + :insert + + iex> %{OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_operation() => OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_operation_values().insert} + %{:"faas.document.operation" => :insert} + + ### Erlang + + ```erlang + ?FAAS_DOCUMENT_OPERATION. + 'faas.document.operation' + + ?FAAS_DOCUMENT_OPERATION_VALUES_INSERT. + 'insert' + + \#{?FAAS_DOCUMENT_OPERATION => ?FAAS_DOCUMENT_OPERATION_VALUES_INSERT}. + \#{'faas.document.operation' => 'insert'} + ``` + + + """ + @spec faas_document_operation :: :"faas.document.operation" + def faas_document_operation do + :"faas.document.operation" + end + + @spec faas_document_operation_values() :: faas_document_operation_values() + def faas_document_operation_values() do + %{ + :insert => :insert, + :edit => :edit, + :delete => :delete + } + end + + @doc """ + A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 2020-01-23T13:47:06Z + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_time() + :"faas.document.time" + + ### Erlang + + ```erlang + ?FAAS_DOCUMENT_TIME. + 'faas.document.time' + ``` + + + """ + @spec faas_document_time :: :"faas.document.time" + def faas_document_time do + :"faas.document.time" + end + + @doc """ + The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + * **AWS Lambda:** Use the (full) log stream name. + + ### Examples + + ``` + ["2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_instance() + :"faas.instance" + + ### Erlang + + ```erlang + ?FAAS_INSTANCE. + 'faas.instance' + ``` + + + """ + @spec faas_instance :: :"faas.instance" + def faas_instance do + :"faas.instance" + end + + @doc """ + The invocation ID of the current function invocation. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + af9d5aa4-a685-4c5f-a22b-444f80b3cc28 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invocation_id() + :"faas.invocation_id" + + ### Erlang + + ```erlang + ?FAAS_INVOCATION_ID. + 'faas.invocation_id' + ``` + + + """ + @spec faas_invocation_id :: :"faas.invocation_id" + def faas_invocation_id do + :"faas.invocation_id" + end + + @doc """ + The name of the invoked function. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + SHOULD be equal to the `faas.name` resource attribute of the invoked function. + + ### Examples + + ``` + my-function + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_name() + :"faas.invoked_name" + + ### Erlang + + ```erlang + ?FAAS_INVOKED_NAME. + 'faas.invoked_name' + ``` + + + """ + @spec faas_invoked_name :: :"faas.invoked_name" + def faas_invoked_name do + :"faas.invoked_name" + end + + @typedoc """ + The cloud provider of the invoked function. + + + ### Enum Values + * `:alibaba_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Alibaba Cloud + * `:aws` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon Web Services + * `:azure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Microsoft Azure + * `:gcp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Platform + * `:tencent_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud + """ + @type faas_invoked_provider_values() :: %{ + :alibaba_cloud => :alibaba_cloud, + :aws => :aws, + :azure => :azure, + :gcp => :gcp, + :tencent_cloud => :tencent_cloud + } + @doc """ + The cloud provider of the invoked function. + + + ### Notes + + SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_provider() + :"faas.invoked_provider" + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_provider_values().alibaba_cloud + :alibaba_cloud + + iex> %{OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_provider() => OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_provider_values().alibaba_cloud} + %{:"faas.invoked_provider" => :alibaba_cloud} + + ### Erlang + + ```erlang + ?FAAS_INVOKED_PROVIDER. + 'faas.invoked_provider' + + ?FAAS_INVOKED_PROVIDER_VALUES_ALIBABA_CLOUD. + 'alibaba_cloud' + + \#{?FAAS_INVOKED_PROVIDER => ?FAAS_INVOKED_PROVIDER_VALUES_ALIBABA_CLOUD}. + \#{'faas.invoked_provider' => 'alibaba_cloud'} + ``` + + + """ + @spec faas_invoked_provider :: :"faas.invoked_provider" + def faas_invoked_provider do + :"faas.invoked_provider" + end + + @spec faas_invoked_provider_values() :: faas_invoked_provider_values() + def faas_invoked_provider_values() do + %{ + :alibaba_cloud => :alibaba_cloud, + :aws => :aws, + :azure => :azure, + :gcp => :gcp, + :tencent_cloud => :tencent_cloud + } + end + + @doc """ + The cloud region of the invoked function. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + SHOULD be equal to the `cloud.region` resource attribute of the invoked function. + + ### Examples + + ``` + eu-central-1 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_region() + :"faas.invoked_region" + + ### Erlang + + ```erlang + ?FAAS_INVOKED_REGION. + 'faas.invoked_region' + ``` + + + """ + @spec faas_invoked_region :: :"faas.invoked_region" + def faas_invoked_region do + :"faas.invoked_region" + end + + @doc """ + The amount of memory available to the serverless function converted to Bytes. + + ### Value type + + Value must be of type `integer()`. + ### Notes + + It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576). + + ### Examples + + ``` + 134217728 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_max_memory() + :"faas.max_memory" + + ### Erlang + + ```erlang + ?FAAS_MAX_MEMORY. + 'faas.max_memory' + ``` + + + """ + @spec faas_max_memory :: :"faas.max_memory" + def faas_max_memory do + :"faas.max_memory" + end + + @doc """ + The name of the single function that this runtime instance executes. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This is the name of the function as configured/deployed on the FaaS + platform and is usually different from the name of the callback + function (which may be stored in the + [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes) + span attributes). + + For some cloud providers, the above definition is ambiguous. The following + definition of function name **MUST** be used for this attribute + (and consequently the span name) for the listed cloud providers/products: + + * **Azure:** The full name `/`, i.e., function app name + followed by a forward slash followed by the function name (this form + can also be seen in the resource JSON for the function). + This means that a span attribute **MUST** be used, as an Azure function + app can host multiple functions that would usually share + a TracerProvider (see also the `cloud.resource_id` attribute). + + ### Examples + + ``` + ["my-function", "myazurefunctionapp/some-function-name"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_name() + :"faas.name" + + ### Erlang + + ```erlang + ?FAAS_NAME. + 'faas.name' + ``` + + + """ + @spec faas_name :: :"faas.name" + def faas_name do + :"faas.name" + end + + @doc """ + A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 2020-01-23T13:47:06Z + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_time() + :"faas.time" + + ### Erlang + + ```erlang + ?FAAS_TIME. + 'faas.time' + ``` + + + """ + @spec faas_time :: :"faas.time" + def faas_time do + :"faas.time" + end + + @typedoc """ + Type of the trigger which caused this function invocation. + + + ### Enum Values + * `:datasource` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A response to some data source operation such as a database or filesystem read/write + * `:http` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - To provide an answer to an inbound HTTP request + * `:pubsub` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A function is set to be executed when messages are sent to a messaging system + * `:timer` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A function is scheduled to be executed regularly + * `:other` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - If none of the others apply + """ + @type faas_trigger_values() :: %{ + :datasource => :datasource, + :http => :http, + :pubsub => :pubsub, + :timer => :timer, + :other => :other + } + @doc """ + Type of the trigger which caused this function invocation. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_trigger() + :"faas.trigger" + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_trigger_values().datasource + :datasource + + iex> %{OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_trigger() => OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_trigger_values().datasource} + %{:"faas.trigger" => :datasource} + + ### Erlang + + ```erlang + ?FAAS_TRIGGER. + 'faas.trigger' + + ?FAAS_TRIGGER_VALUES_DATASOURCE. + 'datasource' + + \#{?FAAS_TRIGGER => ?FAAS_TRIGGER_VALUES_DATASOURCE}. + \#{'faas.trigger' => 'datasource'} + ``` + + + """ + @spec faas_trigger :: :"faas.trigger" + def faas_trigger do + :"faas.trigger" + end + + @spec faas_trigger_values() :: faas_trigger_values() + def faas_trigger_values() do + %{ + :datasource => :datasource, + :http => :http, + :pubsub => :pubsub, + :timer => :timer, + :other => :other + } + end + + @doc """ + The immutable version of the function being executed. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Depending on the cloud provider and platform, use: + + * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + (an integer represented as a decimal string). + * **Google Cloud Run (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions) + (i.e., the function name plus the revision suffix). + * **Google Cloud Functions:** The value of the + [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). + * **Azure Functions:** Not applicable. Do not set this attribute. + + ### Examples + + ``` + ["26", "pinkfroid-00002"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_version() + :"faas.version" + + ### Erlang + + ```erlang + ?FAAS_VERSION. + 'faas.version' + ``` + + + """ + @spec faas_version :: :"faas.version" + def faas_version do + :"faas.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/feature_flag_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/feature_flag_attributes.ex new file mode 100644 index 00000000..b4a89310 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/feature_flag_attributes.ex @@ -0,0 +1,113 @@ +defmodule OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Feature_Flag attributes. + """ + + @doc """ + The unique identifier of the feature flag. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["logo-color"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_key() + :"feature_flag.key" + + ### Erlang + + ```erlang + ?FEATURE_FLAG_KEY. + 'feature_flag.key' + ``` + + + """ + @spec feature_flag_key :: :"feature_flag.key" + def feature_flag_key do + :"feature_flag.key" + end + + @doc """ + The name of the service provider that performs the flag evaluation. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Flag Manager"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_provider_name() + :"feature_flag.provider_name" + + ### Erlang + + ```erlang + ?FEATURE_FLAG_PROVIDER_NAME. + 'feature_flag.provider_name' + ``` + + + """ + @spec feature_flag_provider_name :: :"feature_flag.provider_name" + def feature_flag_provider_name do + :"feature_flag.provider_name" + end + + @doc """ + SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + A semantic identifier, commonly referred to as a variant, provides a means + for referring to a value without including the value itself. This can + provide additional context for understanding the meaning behind a value. + For example, the variant `red` maybe be used for the value `#c05543`. + + A stringified version of the value can be used in situations where a + semantic identifier is unavailable. String representation of the value + should be determined by the implementer. + ### Examples + + ``` + ["red", "true", "on"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_variant() + :"feature_flag.variant" + + ### Erlang + + ```erlang + ?FEATURE_FLAG_VARIANT. + 'feature_flag.variant' + ``` + + + """ + @spec feature_flag_variant :: :"feature_flag.variant" + def feature_flag_variant do + :"feature_flag.variant" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/file_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/file_attributes.ex new file mode 100644 index 00000000..8f960803 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/file_attributes.ex @@ -0,0 +1,170 @@ +defmodule OpenTelemetry.SemConv.Incubating.FileAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for File attributes. + """ + + @doc """ + Directory where the file is located. It should include the drive letter, when appropriate. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/home/user", "C:\\Program Files\\MyApp"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_directory() + :"file.directory" + + ### Erlang + + ```erlang + ?FILE_DIRECTORY. + 'file.directory' + ``` + + + """ + @spec file_directory :: :"file.directory" + def file_directory do + :"file.directory" + end + + @doc """ + File extension, excluding the leading dot. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + When the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). + + ### Examples + + ``` + ["png", "gz"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_extension() + :"file.extension" + + ### Erlang + + ```erlang + ?FILE_EXTENSION. + 'file.extension' + ``` + + + """ + @spec file_extension :: :"file.extension" + def file_extension do + :"file.extension" + end + + @doc """ + Name of the file including the extension, without the directory. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["example.png"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_name() + :"file.name" + + ### Erlang + + ```erlang + ?FILE_NAME. + 'file.name' + ``` + + + """ + @spec file_name :: :"file.name" + def file_name do + :"file.name" + end + + @doc """ + Full path to the file, including the file name. It should include the drive letter, when appropriate. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/home/alice/example.png", "C:\\Program Files\\MyApp\\myapp.exe"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_path() + :"file.path" + + ### Erlang + + ```erlang + ?FILE_PATH. + 'file.path' + ``` + + + """ + @spec file_path :: :"file.path" + def file_path do + :"file.path" + end + + @doc """ + File size in bytes. + + ### Value type + + Value must be of type `integer()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_size() + :"file.size" + + ### Erlang + + ```erlang + ?FILE_SIZE. + 'file.size' + ``` + + + """ + @spec file_size :: :"file.size" + def file_size do + :"file.size" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gcp_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gcp_attributes.ex new file mode 100644 index 00000000..7026b158 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gcp_attributes.ex @@ -0,0 +1,174 @@ +defmodule OpenTelemetry.SemConv.Incubating.GCPAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for GCP attributes. + """ + + @doc """ + Identifies the Google Cloud service for which the official client library is intended. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Intended to be a stable identifier for Google Cloud client libraries that is uniform across implementation languages. The value should be derived from the canonical service domain for the service; for example, 'foo.googleapis.com' should result in a value of 'foo'. + + ### Examples + + ``` + ["appengine", "run", "firestore", "alloydb", "spanner"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_client_service() + :"gcp.client.service" + + ### Erlang + + ```erlang + ?GCP_CLIENT_SERVICE. + 'gcp.client.service' + ``` + + + """ + @spec gcp_client_service :: :"gcp.client.service" + def gcp_client_service do + :"gcp.client.service" + end + + @doc """ + The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["job-name-xxxx", "sample-job-mdw84"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_cloud_run_job_execution() + :"gcp.cloud_run.job.execution" + + ### Erlang + + ```erlang + ?GCP_CLOUD_RUN_JOB_EXECUTION. + 'gcp.cloud_run.job.execution' + ``` + + + """ + @spec gcp_cloud_run_job_execution :: :"gcp.cloud_run.job.execution" + def gcp_cloud_run_job_execution do + :"gcp.cloud_run.job.execution" + end + + @doc """ + The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [0, 1] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_cloud_run_job_task_index() + :"gcp.cloud_run.job.task_index" + + ### Erlang + + ```erlang + ?GCP_CLOUD_RUN_JOB_TASK_INDEX. + 'gcp.cloud_run.job.task_index' + ``` + + + """ + @spec gcp_cloud_run_job_task_index :: :"gcp.cloud_run.job.task_index" + def gcp_cloud_run_job_task_index do + :"gcp.cloud_run.job.task_index" + end + + @doc """ + The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-host1234.example.com", "sample-vm.us-west1-b.c.my-project.internal"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_gce_instance_hostname() + :"gcp.gce.instance.hostname" + + ### Erlang + + ```erlang + ?GCP_GCE_INSTANCE_HOSTNAME. + 'gcp.gce.instance.hostname' + ``` + + + """ + @spec gcp_gce_instance_hostname :: :"gcp.gce.instance.hostname" + def gcp_gce_instance_hostname do + :"gcp.gce.instance.hostname" + end + + @doc """ + The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["instance-1", "my-vm-name"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_gce_instance_name() + :"gcp.gce.instance.name" + + ### Erlang + + ```erlang + ?GCP_GCE_INSTANCE_NAME. + 'gcp.gce.instance.name' + ``` + + + """ + @spec gcp_gce_instance_name :: :"gcp.gce.instance.name" + def gcp_gce_instance_name do + :"gcp.gce.instance.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gen_ai_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gen_ai_attributes.ex new file mode 100644 index 00000000..b697684d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gen_ai_attributes.ex @@ -0,0 +1,708 @@ +defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Gen_Ai attributes. + """ + + @doc """ + The full response received from the GenAI model. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It's RECOMMENDED to format completions as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) + ### Examples + + ``` + ["[{'role': 'assistant', 'content': 'The capital of France is Paris.'}]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_completion() + :"gen_ai.completion" + + ### Erlang + + ```erlang + ?GEN_AI_COMPLETION. + 'gen_ai.completion' + ``` + + + """ + @spec gen_ai_completion :: :"gen_ai.completion" + def gen_ai_completion do + :"gen_ai.completion" + end + + @typedoc """ + The name of the operation being performed. + + ### Enum Values + * `:chat` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Chat completion operation such as [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat) + * `:text_completion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions) + """ + @type gen_ai_operation_name_values() :: %{ + :chat => :chat, + :text_completion => :text_completion + } + @doc """ + The name of the operation being performed. + + ### Notes + + If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries **SHOULD** use applicable predefined value. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name() + :"gen_ai.operation.name" + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name_values().chat + :chat + + iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name_values().chat} + %{:"gen_ai.operation.name" => :chat} + + ### Erlang + + ```erlang + ?GEN_AI_OPERATION_NAME. + 'gen_ai.operation.name' + + ?GEN_AI_OPERATION_NAME_VALUES_CHAT. + 'chat' + + \#{?GEN_AI_OPERATION_NAME => ?GEN_AI_OPERATION_NAME_VALUES_CHAT}. + \#{'gen_ai.operation.name' => 'chat'} + ``` + + + """ + @spec gen_ai_operation_name :: :"gen_ai.operation.name" + def gen_ai_operation_name do + :"gen_ai.operation.name" + end + + @spec gen_ai_operation_name_values() :: gen_ai_operation_name_values() + def gen_ai_operation_name_values() do + %{ + :chat => :chat, + :text_completion => :text_completion + } + end + + @doc """ + The full prompt sent to the GenAI model. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It's RECOMMENDED to format prompts as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) + ### Examples + + ``` + ["[{'role': 'user', 'content': 'What is the capital of France?'}]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_prompt() + :"gen_ai.prompt" + + ### Erlang + + ```erlang + ?GEN_AI_PROMPT. + 'gen_ai.prompt' + ``` + + + """ + @spec gen_ai_prompt :: :"gen_ai.prompt" + def gen_ai_prompt do + :"gen_ai.prompt" + end + + @doc """ + The frequency penalty setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [0.1] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_frequency_penalty() + :"gen_ai.request.frequency_penalty" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_FREQUENCY_PENALTY. + 'gen_ai.request.frequency_penalty' + ``` + + + """ + @spec gen_ai_request_frequency_penalty :: :"gen_ai.request.frequency_penalty" + def gen_ai_request_frequency_penalty do + :"gen_ai.request.frequency_penalty" + end + + @doc """ + The maximum number of tokens the model generates for a request. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [100] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_max_tokens() + :"gen_ai.request.max_tokens" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_MAX_TOKENS. + 'gen_ai.request.max_tokens' + ``` + + + """ + @spec gen_ai_request_max_tokens :: :"gen_ai.request.max_tokens" + def gen_ai_request_max_tokens do + :"gen_ai.request.max_tokens" + end + + @doc """ + The name of the GenAI model a request is being made to. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + gpt-4 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_model() + :"gen_ai.request.model" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_MODEL. + 'gen_ai.request.model' + ``` + + + """ + @spec gen_ai_request_model :: :"gen_ai.request.model" + def gen_ai_request_model do + :"gen_ai.request.model" + end + + @doc """ + The presence penalty setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [0.1] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_presence_penalty() + :"gen_ai.request.presence_penalty" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_PRESENCE_PENALTY. + 'gen_ai.request.presence_penalty' + ``` + + + """ + @spec gen_ai_request_presence_penalty :: :"gen_ai.request.presence_penalty" + def gen_ai_request_presence_penalty do + :"gen_ai.request.presence_penalty" + end + + @doc """ + List of sequences that the model will use to stop generating further tokens. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["forest", "lived"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_stop_sequences() + :"gen_ai.request.stop_sequences" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_STOP_SEQUENCES. + 'gen_ai.request.stop_sequences' + ``` + + + """ + @spec gen_ai_request_stop_sequences :: :"gen_ai.request.stop_sequences" + def gen_ai_request_stop_sequences do + :"gen_ai.request.stop_sequences" + end + + @doc """ + The temperature setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [0.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_temperature() + :"gen_ai.request.temperature" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_TEMPERATURE. + 'gen_ai.request.temperature' + ``` + + + """ + @spec gen_ai_request_temperature :: :"gen_ai.request.temperature" + def gen_ai_request_temperature do + :"gen_ai.request.temperature" + end + + @doc """ + The top_k sampling setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [1.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_top_k() + :"gen_ai.request.top_k" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_TOP_K. + 'gen_ai.request.top_k' + ``` + + + """ + @spec gen_ai_request_top_k :: :"gen_ai.request.top_k" + def gen_ai_request_top_k do + :"gen_ai.request.top_k" + end + + @doc """ + The top_p sampling setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [1.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_top_p() + :"gen_ai.request.top_p" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_TOP_P. + 'gen_ai.request.top_p' + ``` + + + """ + @spec gen_ai_request_top_p :: :"gen_ai.request.top_p" + def gen_ai_request_top_p do + :"gen_ai.request.top_p" + end + + @doc """ + Array of reasons the model stopped generating tokens, corresponding to each generation received. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["stop"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_finish_reasons() + :"gen_ai.response.finish_reasons" + + ### Erlang + + ```erlang + ?GEN_AI_RESPONSE_FINISH_REASONS. + 'gen_ai.response.finish_reasons' + ``` + + + """ + @spec gen_ai_response_finish_reasons :: :"gen_ai.response.finish_reasons" + def gen_ai_response_finish_reasons do + :"gen_ai.response.finish_reasons" + end + + @doc """ + The unique identifier for the completion. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["chatcmpl-123"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_id() + :"gen_ai.response.id" + + ### Erlang + + ```erlang + ?GEN_AI_RESPONSE_ID. + 'gen_ai.response.id' + ``` + + + """ + @spec gen_ai_response_id :: :"gen_ai.response.id" + def gen_ai_response_id do + :"gen_ai.response.id" + end + + @doc """ + The name of the model that generated the response. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["gpt-4-0613"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_model() + :"gen_ai.response.model" + + ### Erlang + + ```erlang + ?GEN_AI_RESPONSE_MODEL. + 'gen_ai.response.model' + ``` + + + """ + @spec gen_ai_response_model :: :"gen_ai.response.model" + def gen_ai_response_model do + :"gen_ai.response.model" + end + + @typedoc """ + The Generative AI product as identified by the client or server instrumentation. + + ### Enum Values + * `:openai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OpenAI + * `:vertex_ai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Vertex AI + * `:anthropic` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Anthropic + * `:cohere` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Cohere + """ + @type gen_ai_system_values() :: %{ + :openai => :openai, + :vertex_ai => :vertex_ai, + :anthropic => :anthropic, + :cohere => :cohere + } + @doc """ + The Generative AI product as identified by the client or server instrumentation. + + ### Notes + + The `gen_ai.system` describes a family of GenAI models with specific model identified + by `gen_ai.request.model` and `gen_ai.response.model` attributes. + + The actual GenAI product may differ from the one identified by the client. + For example, when using OpenAI client libraries to communicate with Mistral, the `gen_ai.system` + is set to `openai` based on the instrumentation's best knowledge. + + For custom model, a custom friendly name **SHOULD** be used. + If none of these options apply, the `gen_ai.system` **SHOULD** be set to `_OTHER`. + + ### Examples + + ``` + openai + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system() + :"gen_ai.system" + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system_values().openai + :openai + + iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system_values().openai} + %{:"gen_ai.system" => :openai} + + ### Erlang + + ```erlang + ?GEN_AI_SYSTEM. + 'gen_ai.system' + + ?GEN_AI_SYSTEM_VALUES_OPENAI. + 'openai' + + \#{?GEN_AI_SYSTEM => ?GEN_AI_SYSTEM_VALUES_OPENAI}. + \#{'gen_ai.system' => 'openai'} + ``` + + + """ + @spec gen_ai_system :: :"gen_ai.system" + def gen_ai_system do + :"gen_ai.system" + end + + @spec gen_ai_system_values() :: gen_ai_system_values() + def gen_ai_system_values() do + %{ + :openai => :openai, + :vertex_ai => :vertex_ai, + :anthropic => :anthropic, + :cohere => :cohere + } + end + + @typedoc """ + The type of token being counted. + + ### Enum Values + * `:input` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Input tokens (prompt, input, etc.) + * `:completion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Output tokens (completion, response, etc.) + """ + @type gen_ai_token_type_values() :: %{ + :input => :input, + :completion => :output + } + @doc """ + The type of token being counted. + + ### Examples + + ``` + ["input", "output"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_token_type() + :"gen_ai.token.type" + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_token_type_values().input + :input + + iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_token_type() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_token_type_values().input} + %{:"gen_ai.token.type" => :input} + + ### Erlang + + ```erlang + ?GEN_AI_TOKEN_TYPE. + 'gen_ai.token.type' + + ?GEN_AI_TOKEN_TYPE_VALUES_INPUT. + 'input' + + \#{?GEN_AI_TOKEN_TYPE => ?GEN_AI_TOKEN_TYPE_VALUES_INPUT}. + \#{'gen_ai.token.type' => 'input'} + ``` + + + """ + @spec gen_ai_token_type :: :"gen_ai.token.type" + def gen_ai_token_type do + :"gen_ai.token.type" + end + + @spec gen_ai_token_type_values() :: gen_ai_token_type_values() + def gen_ai_token_type_values() do + %{ + :input => :input, + :completion => :output + } + end + + @deprecated """ + Replaced by `gen_ai.usage.output_tokens` attribute. + """ + @spec gen_ai_usage_completion_tokens :: :"gen_ai.usage.completion_tokens" + def gen_ai_usage_completion_tokens do + :"gen_ai.usage.completion_tokens" + end + + @doc """ + The number of tokens used in the GenAI input (prompt). + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [100] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_usage_input_tokens() + :"gen_ai.usage.input_tokens" + + ### Erlang + + ```erlang + ?GEN_AI_USAGE_INPUT_TOKENS. + 'gen_ai.usage.input_tokens' + ``` + + + """ + @spec gen_ai_usage_input_tokens :: :"gen_ai.usage.input_tokens" + def gen_ai_usage_input_tokens do + :"gen_ai.usage.input_tokens" + end + + @doc """ + The number of tokens used in the GenAI response (completion). + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [180] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_usage_output_tokens() + :"gen_ai.usage.output_tokens" + + ### Erlang + + ```erlang + ?GEN_AI_USAGE_OUTPUT_TOKENS. + 'gen_ai.usage.output_tokens' + ``` + + + """ + @spec gen_ai_usage_output_tokens :: :"gen_ai.usage.output_tokens" + def gen_ai_usage_output_tokens do + :"gen_ai.usage.output_tokens" + end + + @deprecated """ + Replaced by `gen_ai.usage.input_tokens` attribute. + """ + @spec gen_ai_usage_prompt_tokens :: :"gen_ai.usage.prompt_tokens" + def gen_ai_usage_prompt_tokens do + :"gen_ai.usage.prompt_tokens" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/graphql_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/graphql_attributes.ex new file mode 100644 index 00000000..65ec9801 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/graphql_attributes.ex @@ -0,0 +1,137 @@ +defmodule OpenTelemetry.SemConv.Incubating.GraphqlAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Graphql attributes. + """ + + @doc """ + The GraphQL document being executed. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The value may be sanitized to exclude sensitive information. + ### Examples + + ``` + query findBookById { bookById(id: ?) { name } } + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GraphqlAttributes.graphql_document() + :"graphql.document" + + ### Erlang + + ```erlang + ?GRAPHQL_DOCUMENT. + 'graphql.document' + ``` + + + """ + @spec graphql_document :: :"graphql.document" + def graphql_document do + :"graphql.document" + end + + @doc """ + The name of the operation being executed. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + findBookById + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GraphqlAttributes.graphql_operation_name() + :"graphql.operation.name" + + ### Erlang + + ```erlang + ?GRAPHQL_OPERATION_NAME. + 'graphql.operation.name' + ``` + + + """ + @spec graphql_operation_name :: :"graphql.operation.name" + def graphql_operation_name do + :"graphql.operation.name" + end + + @typedoc """ + The type of the operation being executed. + + ### Enum Values + * `:query` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - GraphQL query + * `:mutation` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - GraphQL mutation + * `:subscription` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - GraphQL subscription + """ + @type graphql_operation_type_values() :: %{ + :query => :query, + :mutation => :mutation, + :subscription => :subscription + } + @doc """ + The type of the operation being executed. + + ### Examples + + ``` + ["query", "mutation", "subscription"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GraphqlAttributes.graphql_operation_type() + :"graphql.operation.type" + + iex> OpenTelemetry.SemConv.Incubating.GraphqlAttributes.graphql_operation_type_values().query + :query + + iex> %{OpenTelemetry.SemConv.Incubating.GraphqlAttributes.graphql_operation_type() => OpenTelemetry.SemConv.Incubating.GraphqlAttributes.graphql_operation_type_values().query} + %{:"graphql.operation.type" => :query} + + ### Erlang + + ```erlang + ?GRAPHQL_OPERATION_TYPE. + 'graphql.operation.type' + + ?GRAPHQL_OPERATION_TYPE_VALUES_QUERY. + 'query' + + \#{?GRAPHQL_OPERATION_TYPE => ?GRAPHQL_OPERATION_TYPE_VALUES_QUERY}. + \#{'graphql.operation.type' => 'query'} + ``` + + + """ + @spec graphql_operation_type :: :"graphql.operation.type" + def graphql_operation_type do + :"graphql.operation.type" + end + + @spec graphql_operation_type_values() :: graphql_operation_type_values() + def graphql_operation_type_values() do + %{ + :query => :query, + :mutation => :mutation, + :subscription => :subscription + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/heroku_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/heroku_attributes.ex new file mode 100644 index 00000000..3f744824 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/heroku_attributes.ex @@ -0,0 +1,105 @@ +defmodule OpenTelemetry.SemConv.Incubating.HerokuAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Heroku attributes. + """ + + @doc """ + Unique identifier for the application + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2daa2797-e42b-4624-9322-ec3f968df4da"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HerokuAttributes.heroku_app_id() + :"heroku.app.id" + + ### Erlang + + ```erlang + ?HEROKU_APP_ID. + 'heroku.app.id' + ``` + + + """ + @spec heroku_app_id :: :"heroku.app.id" + def heroku_app_id do + :"heroku.app.id" + end + + @doc """ + Commit hash for the current release + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["e6134959463efd8966b20e75b913cafe3f5ec"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HerokuAttributes.heroku_release_commit() + :"heroku.release.commit" + + ### Erlang + + ```erlang + ?HEROKU_RELEASE_COMMIT. + 'heroku.release.commit' + ``` + + + """ + @spec heroku_release_commit :: :"heroku.release.commit" + def heroku_release_commit do + :"heroku.release.commit" + end + + @doc """ + Time and date the release was created + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2022-10-23T18:00:42Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HerokuAttributes.heroku_release_creation_timestamp() + :"heroku.release.creation_timestamp" + + ### Erlang + + ```erlang + ?HEROKU_RELEASE_CREATION_TIMESTAMP. + 'heroku.release.creation_timestamp' + ``` + + + """ + @spec heroku_release_creation_timestamp :: :"heroku.release.creation_timestamp" + def heroku_release_creation_timestamp do + :"heroku.release.creation_timestamp" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/host_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/host_attributes.ex new file mode 100644 index 00000000..a84f7612 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/host_attributes.ex @@ -0,0 +1,556 @@ +defmodule OpenTelemetry.SemConv.Incubating.HostAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Host attributes. + """ + + @typedoc """ + The CPU architecture the host system is running on. + + + ### Enum Values + * `:amd64` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AMD64 + * `:arm32` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - ARM32 + * `:arm64` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - ARM64 + * `:ia64` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Itanium + * `:ppc32` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 32-bit PowerPC + * `:ppc64` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 64-bit PowerPC + * `:s390x` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IBM z/Architecture + * `:x86` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 32-bit x86 + """ + @type host_arch_values() :: %{ + :amd64 => :amd64, + :arm32 => :arm32, + :arm64 => :arm64, + :ia64 => :ia64, + :ppc32 => :ppc32, + :ppc64 => :ppc64, + :s390x => :s390x, + :x86 => :x86 + } + @doc """ + The CPU architecture the host system is running on. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_arch() + :"host.arch" + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_arch_values().amd64 + :amd64 + + iex> %{OpenTelemetry.SemConv.Incubating.HostAttributes.host_arch() => OpenTelemetry.SemConv.Incubating.HostAttributes.host_arch_values().amd64} + %{:"host.arch" => :amd64} + + ### Erlang + + ```erlang + ?HOST_ARCH. + 'host.arch' + + ?HOST_ARCH_VALUES_AMD64. + 'amd64' + + \#{?HOST_ARCH => ?HOST_ARCH_VALUES_AMD64}. + \#{'host.arch' => 'amd64'} + ``` + + + """ + @spec host_arch :: :"host.arch" + def host_arch do + :"host.arch" + end + + @spec host_arch_values() :: host_arch_values() + def host_arch_values() do + %{ + :amd64 => :amd64, + :arm32 => :arm32, + :arm64 => :arm64, + :ia64 => :ia64, + :ppc32 => :ppc32, + :ppc64 => :ppc64, + :s390x => :s390x, + :x86 => :x86 + } + end + + @doc """ + The amount of level 2 memory cache available to the processor (in Bytes). + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [12288000] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_cpu_cache_l2_size() + :"host.cpu.cache.l2.size" + + ### Erlang + + ```erlang + ?HOST_CPU_CACHE_L2_SIZE. + 'host.cpu.cache.l2.size' + ``` + + + """ + @spec host_cpu_cache_l2_size :: :"host.cpu.cache.l2.size" + def host_cpu_cache_l2_size do + :"host.cpu.cache.l2.size" + end + + @doc """ + Family or generation of the CPU. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["6", "PA-RISC 1.1e"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_cpu_family() + :"host.cpu.family" + + ### Erlang + + ```erlang + ?HOST_CPU_FAMILY. + 'host.cpu.family' + ``` + + + """ + @spec host_cpu_family :: :"host.cpu.family" + def host_cpu_family do + :"host.cpu.family" + end + + @doc """ + Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["6", "9000/778/B180L"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_cpu_model_id() + :"host.cpu.model.id" + + ### Erlang + + ```erlang + ?HOST_CPU_MODEL_ID. + 'host.cpu.model.id' + ``` + + + """ + @spec host_cpu_model_id :: :"host.cpu.model.id" + def host_cpu_model_id do + :"host.cpu.model.id" + end + + @doc """ + Model designation of the processor. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_cpu_model_name() + :"host.cpu.model.name" + + ### Erlang + + ```erlang + ?HOST_CPU_MODEL_NAME. + 'host.cpu.model.name' + ``` + + + """ + @spec host_cpu_model_name :: :"host.cpu.model.name" + def host_cpu_model_name do + :"host.cpu.model.name" + end + + @doc """ + Stepping or core revisions. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1", "r1p1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_cpu_stepping() + :"host.cpu.stepping" + + ### Erlang + + ```erlang + ?HOST_CPU_STEPPING. + 'host.cpu.stepping' + ``` + + + """ + @spec host_cpu_stepping :: :"host.cpu.stepping" + def host_cpu_stepping do + :"host.cpu.stepping" + end + + @doc """ + Processor manufacturer identifier. A maximum 12-character string. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string. + + ### Examples + + ``` + ["GenuineIntel"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_cpu_vendor_id() + :"host.cpu.vendor.id" + + ### Erlang + + ```erlang + ?HOST_CPU_VENDOR_ID. + 'host.cpu.vendor.id' + ``` + + + """ + @spec host_cpu_vendor_id :: :"host.cpu.vendor.id" + def host_cpu_vendor_id do + :"host.cpu.vendor.id" + end + + @doc """ + Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["fdbf79e8af94cb7f9e8df36789187052"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_id() + :"host.id" + + ### Erlang + + ```erlang + ?HOST_ID. + 'host.id' + ``` + + + """ + @spec host_id :: :"host.id" + def host_id do + :"host.id" + end + + @doc """ + VM image ID or host OS image ID. For Cloud, this value is from the provider. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["ami-07b06b442921831e5"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_image_id() + :"host.image.id" + + ### Erlang + + ```erlang + ?HOST_IMAGE_ID. + 'host.image.id' + ``` + + + """ + @spec host_image_id :: :"host.image.id" + def host_image_id do + :"host.image.id" + end + + @doc """ + Name of the VM image or OS install the host was instantiated from. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["infra-ami-eks-worker-node-7d4ec78312", "CentOS-8-x86_64-1905"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_image_name() + :"host.image.name" + + ### Erlang + + ```erlang + ?HOST_IMAGE_NAME. + 'host.image.name' + ``` + + + """ + @spec host_image_name :: :"host.image.name" + def host_image_name do + :"host.image.name" + end + + @doc """ + The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["0.1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_image_version() + :"host.image.version" + + ### Erlang + + ```erlang + ?HOST_IMAGE_VERSION. + 'host.image.version' + ``` + + + """ + @spec host_image_version :: :"host.image.version" + def host_image_version do + :"host.image.version" + end + + @doc """ + Available IP addresses of the host, excluding loopback interfaces. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + IPv4 Addresses **MUST** be specified in dotted-quad notation. IPv6 addresses **MUST** be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. + + ### Examples + + ``` + ["192.168.1.140", "fe80::abc2:4a28:737a:609e"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_ip() + :"host.ip" + + ### Erlang + + ```erlang + ?HOST_IP. + 'host.ip' + ``` + + + """ + @spec host_ip :: :"host.ip" + def host_ip do + :"host.ip" + end + + @doc """ + Available MAC addresses of the host, excluding loopback interfaces. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + MAC Addresses **MUST** be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant. + + ### Examples + + ``` + ["AC-DE-48-23-45-67", "AC-DE-48-23-45-67-01-9F"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_mac() + :"host.mac" + + ### Erlang + + ```erlang + ?HOST_MAC. + 'host.mac' + ``` + + + """ + @spec host_mac :: :"host.mac" + def host_mac do + :"host.mac" + end + + @doc """ + Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry-test"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_name() + :"host.name" + + ### Erlang + + ```erlang + ?HOST_NAME. + 'host.name' + ``` + + + """ + @spec host_name :: :"host.name" + def host_name do + :"host.name" + end + + @doc """ + Type of host. For Cloud, this must be the machine type. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["n1-standard-1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HostAttributes.host_type() + :"host.type" + + ### Erlang + + ```erlang + ?HOST_TYPE. + 'host.type' + ``` + + + """ + @spec host_type :: :"host.type" + def host_type do + :"host.type" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex new file mode 100644 index 00000000..87d7789b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex @@ -0,0 +1,357 @@ +defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for HTTP attributes. + """ + defdelegate http_request_header(), to: OpenTelemetry.SemConv.HTTPAttributes + + defdelegate http_request_method(), to: OpenTelemetry.SemConv.HTTPAttributes + + defdelegate http_request_method_values(), to: OpenTelemetry.SemConv.HTTPAttributes + + defdelegate http_request_method_original(), to: OpenTelemetry.SemConv.HTTPAttributes + + defdelegate http_request_resend_count(), to: OpenTelemetry.SemConv.HTTPAttributes + + defdelegate http_response_header(), to: OpenTelemetry.SemConv.HTTPAttributes + + defdelegate http_response_status_code(), to: OpenTelemetry.SemConv.HTTPAttributes + + defdelegate http_route(), to: OpenTelemetry.SemConv.HTTPAttributes + + @deprecated """ + Replaced by `client.address`. + """ + @spec http_client_ip :: :"http.client_ip" + def http_client_ip do + :"http.client_ip" + end + + @typedoc """ + State of the HTTP connection in the HTTP connection pool. + + ### Enum Values + * `:active` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - active state. + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - idle state. + """ + @type http_connection_state_values() :: %{ + :active => :active, + :idle => :idle + } + @doc """ + State of the HTTP connection in the HTTP connection pool. + + ### Examples + + ``` + ["active", "idle"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HTTPAttributes.http_connection_state() + :"http.connection.state" + + iex> OpenTelemetry.SemConv.Incubating.HTTPAttributes.http_connection_state_values().active + :active + + iex> %{OpenTelemetry.SemConv.Incubating.HTTPAttributes.http_connection_state() => OpenTelemetry.SemConv.Incubating.HTTPAttributes.http_connection_state_values().active} + %{:"http.connection.state" => :active} + + ### Erlang + + ```erlang + ?HTTP_CONNECTION_STATE. + 'http.connection.state' + + ?HTTP_CONNECTION_STATE_VALUES_ACTIVE. + 'active' + + \#{?HTTP_CONNECTION_STATE => ?HTTP_CONNECTION_STATE_VALUES_ACTIVE}. + \#{'http.connection.state' => 'active'} + ``` + + + """ + @spec http_connection_state :: :"http.connection.state" + def http_connection_state do + :"http.connection.state" + end + + @spec http_connection_state_values() :: http_connection_state_values() + def http_connection_state_values() do + %{ + :active => :active, + :idle => :idle + } + end + + @typedoc """ + Deprecated, use `network.protocol.name` instead. + + ### Enum Values + * `:http_1_0` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HTTP/1.0 + * `:http_1_1` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HTTP/1.1 + * `:http_2_0` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HTTP/2 + * `:http_3_0` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HTTP/3 + * `:spdy` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - SPDY protocol. + * `:quic` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - QUIC protocol. + """ + @type http_flavor_values() :: %{ + :http_1_0 => :"1.0", + :http_1_1 => :"1.1", + :http_2_0 => :"2.0", + :http_3_0 => :"3.0", + :spdy => :SPDY, + :quic => :QUIC + } + @deprecated """ + Replaced by `network.protocol.name`. + """ + @spec http_flavor :: :"http.flavor" + def http_flavor do + :"http.flavor" + end + + @spec http_flavor_values() :: http_flavor_values() + def http_flavor_values() do + %{ + :http_1_0 => :"1.0", + :http_1_1 => :"1.1", + :http_2_0 => :"2.0", + :http_3_0 => :"3.0", + :spdy => :SPDY, + :quic => :QUIC + } + end + + @deprecated """ + Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage. + """ + @spec http_host :: :"http.host" + def http_host do + :"http.host" + end + + @deprecated """ + Replaced by `http.request.method`. + """ + @spec http_method :: :"http.method" + def http_method do + :"http.method" + end + + @doc """ + The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 3495 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HTTPAttributes.http_request_body_size() + :"http.request.body.size" + + ### Erlang + + ```erlang + ?HTTP_REQUEST_BODY_SIZE. + 'http.request.body.size' + ``` + + + """ + @spec http_request_body_size :: :"http.request.body.size" + def http_request_body_size do + :"http.request.body.size" + end + + @doc """ + The total size of the request in bytes. This should be the total number of bytes sent over the wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request body if any. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 1437 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HTTPAttributes.http_request_size() + :"http.request.size" + + ### Erlang + + ```erlang + ?HTTP_REQUEST_SIZE. + 'http.request.size' + ``` + + + """ + @spec http_request_size :: :"http.request.size" + def http_request_size do + :"http.request.size" + end + + @deprecated """ + Replaced by `http.request.header.content-length`. + """ + @spec http_request_content_length :: :"http.request_content_length" + def http_request_content_length do + :"http.request_content_length" + end + + @deprecated """ + Replaced by `http.request.body.size`. + """ + @spec http_request_content_length_uncompressed :: :"http.request_content_length_uncompressed" + def http_request_content_length_uncompressed do + :"http.request_content_length_uncompressed" + end + + @doc """ + The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 3495 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HTTPAttributes.http_response_body_size() + :"http.response.body.size" + + ### Erlang + + ```erlang + ?HTTP_RESPONSE_BODY_SIZE. + 'http.response.body.size' + ``` + + + """ + @spec http_response_body_size :: :"http.response.body.size" + def http_response_body_size do + :"http.response.body.size" + end + + @doc """ + The total size of the response in bytes. This should be the total number of bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and response body and trailers if any. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 1437 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HTTPAttributes.http_response_size() + :"http.response.size" + + ### Erlang + + ```erlang + ?HTTP_RESPONSE_SIZE. + 'http.response.size' + ``` + + + """ + @spec http_response_size :: :"http.response.size" + def http_response_size do + :"http.response.size" + end + + @deprecated """ + Replaced by `http.response.header.content-length`. + """ + @spec http_response_content_length :: :"http.response_content_length" + def http_response_content_length do + :"http.response_content_length" + end + + @deprecated """ + Replace by `http.response.body.size`. + """ + @spec http_response_content_length_uncompressed :: :"http.response_content_length_uncompressed" + def http_response_content_length_uncompressed do + :"http.response_content_length_uncompressed" + end + + @deprecated """ + Replaced by `url.scheme` instead. + """ + @spec http_scheme :: :"http.scheme" + def http_scheme do + :"http.scheme" + end + + @deprecated """ + Replaced by `server.address`. + """ + @spec http_server_name :: :"http.server_name" + def http_server_name do + :"http.server_name" + end + + @deprecated """ + Replaced by `http.response.status_code`. + """ + @spec http_status_code :: :"http.status_code" + def http_status_code do + :"http.status_code" + end + + @deprecated """ + Split to `url.path` and `url.query. + """ + @spec http_target :: :"http.target" + def http_target do + :"http.target" + end + + @deprecated """ + Replaced by `url.full`. + """ + @spec http_url :: :"http.url" + def http_url do + :"http.url" + end + + @deprecated """ + Replaced by `user_agent.original`. + """ + @spec http_user_agent :: :"http.user_agent" + def http_user_agent do + :"http.user_agent" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/k8s_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/k8s_attributes.ex new file mode 100644 index 00000000..e220fd82 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/k8s_attributes.ex @@ -0,0 +1,827 @@ +defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for K8S attributes. + """ + + @doc """ + The name of the cluster. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry-cluster"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cluster_name() + :"k8s.cluster.name" + + ### Erlang + + ```erlang + ?K8S_CLUSTER_NAME. + 'k8s.cluster.name' + ``` + + + """ + @spec k8s_cluster_name :: :"k8s.cluster.name" + def k8s_cluster_name do + :"k8s.cluster.name" + end + + @doc """ + A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + K8s doesn't have support for obtaining a cluster ID. If this is ever + added, we will recommend collecting the `k8s.cluster.uid` through the + official APIs. In the meantime, we are able to use the `uid` of the + `kube-system` namespace as a proxy for cluster ID. Read on for the + rationale. + + Every object created in a K8s cluster is assigned a distinct UID. The + `kube-system` namespace is used by Kubernetes itself and will exist + for the lifetime of the cluster. Using the `uid` of the `kube-system` + namespace is a reasonable proxy for the K8s ClusterID as it will only + change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are + UUIDs as standardized by + [ISO/IEC 9834-8 and ITU-T X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html). + Which states: + + > If generated according to one of the mechanisms defined in Rec. + ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + different from all other UUIDs generated before 3603 A.D., or is + extremely likely to be different (depending on the mechanism chosen). + + Therefore, UIDs between clusters should be extremely unlikely to + conflict. + + ### Examples + + ``` + ["218fc5a9-a5f1-4b54-aa05-46717d0ab26d"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cluster_uid() + :"k8s.cluster.uid" + + ### Erlang + + ```erlang + ?K8S_CLUSTER_UID. + 'k8s.cluster.uid' + ``` + + + """ + @spec k8s_cluster_uid :: :"k8s.cluster.uid" + def k8s_cluster_uid do + :"k8s.cluster.uid" + end + + @doc """ + The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["redis"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_name() + :"k8s.container.name" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_NAME. + 'k8s.container.name' + ``` + + + """ + @spec k8s_container_name :: :"k8s.container.name" + def k8s_container_name do + :"k8s.container.name" + end + + @doc """ + Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. + + ### Value type + + Value must be of type `integer()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_restart_count() + :"k8s.container.restart_count" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_RESTART_COUNT. + 'k8s.container.restart_count' + ``` + + + """ + @spec k8s_container_restart_count :: :"k8s.container.restart_count" + def k8s_container_restart_count do + :"k8s.container.restart_count" + end + + @doc """ + Last terminated reason of the Container. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Evicted", "Error"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_last_terminated_reason() + :"k8s.container.status.last_terminated_reason" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON. + 'k8s.container.status.last_terminated_reason' + ``` + + + """ + @spec k8s_container_status_last_terminated_reason :: + :"k8s.container.status.last_terminated_reason" + def k8s_container_status_last_terminated_reason do + :"k8s.container.status.last_terminated_reason" + end + + @doc """ + The name of the CronJob. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_name() + :"k8s.cronjob.name" + + ### Erlang + + ```erlang + ?K8S_CRONJOB_NAME. + 'k8s.cronjob.name' + ``` + + + """ + @spec k8s_cronjob_name :: :"k8s.cronjob.name" + def k8s_cronjob_name do + :"k8s.cronjob.name" + end + + @doc """ + The UID of the CronJob. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_uid() + :"k8s.cronjob.uid" + + ### Erlang + + ```erlang + ?K8S_CRONJOB_UID. + 'k8s.cronjob.uid' + ``` + + + """ + @spec k8s_cronjob_uid :: :"k8s.cronjob.uid" + def k8s_cronjob_uid do + :"k8s.cronjob.uid" + end + + @doc """ + The name of the DaemonSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_name() + :"k8s.daemonset.name" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_NAME. + 'k8s.daemonset.name' + ``` + + + """ + @spec k8s_daemonset_name :: :"k8s.daemonset.name" + def k8s_daemonset_name do + :"k8s.daemonset.name" + end + + @doc """ + The UID of the DaemonSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_uid() + :"k8s.daemonset.uid" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_UID. + 'k8s.daemonset.uid' + ``` + + + """ + @spec k8s_daemonset_uid :: :"k8s.daemonset.uid" + def k8s_daemonset_uid do + :"k8s.daemonset.uid" + end + + @doc """ + The name of the Deployment. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_name() + :"k8s.deployment.name" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_NAME. + 'k8s.deployment.name' + ``` + + + """ + @spec k8s_deployment_name :: :"k8s.deployment.name" + def k8s_deployment_name do + :"k8s.deployment.name" + end + + @doc """ + The UID of the Deployment. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_uid() + :"k8s.deployment.uid" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_UID. + 'k8s.deployment.uid' + ``` + + + """ + @spec k8s_deployment_uid :: :"k8s.deployment.uid" + def k8s_deployment_uid do + :"k8s.deployment.uid" + end + + @doc """ + The name of the Job. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_name() + :"k8s.job.name" + + ### Erlang + + ```erlang + ?K8S_JOB_NAME. + 'k8s.job.name' + ``` + + + """ + @spec k8s_job_name :: :"k8s.job.name" + def k8s_job_name do + :"k8s.job.name" + end + + @doc """ + The UID of the Job. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_uid() + :"k8s.job.uid" + + ### Erlang + + ```erlang + ?K8S_JOB_UID. + 'k8s.job.uid' + ``` + + + """ + @spec k8s_job_uid :: :"k8s.job.uid" + def k8s_job_uid do + :"k8s.job.uid" + end + + @doc """ + The name of the namespace that the pod is running in. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["default"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_name() + :"k8s.namespace.name" + + ### Erlang + + ```erlang + ?K8S_NAMESPACE_NAME. + 'k8s.namespace.name' + ``` + + + """ + @spec k8s_namespace_name :: :"k8s.namespace.name" + def k8s_namespace_name do + :"k8s.namespace.name" + end + + @doc """ + The name of the Node. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["node-1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_name() + :"k8s.node.name" + + ### Erlang + + ```erlang + ?K8S_NODE_NAME. + 'k8s.node.name' + ``` + + + """ + @spec k8s_node_name :: :"k8s.node.name" + def k8s_node_name do + :"k8s.node.name" + end + + @doc """ + The UID of the Node. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_uid() + :"k8s.node.uid" + + ### Erlang + + ```erlang + ?K8S_NODE_UID. + 'k8s.node.uid' + ``` + + + """ + @spec k8s_node_uid :: :"k8s.node.uid" + def k8s_node_uid do + :"k8s.node.uid" + end + + @doc """ + The annotation key-value pairs placed on the Pod, the `` being the annotation name, the value being the annotation value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true", "k8s.pod.annotation.mycompany.io/arch=x64", "k8s.pod.annotation.data="] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_annotation() + :"k8s.pod.annotation" + + ### Erlang + + ```erlang + ?K8S_POD_ANNOTATION. + 'k8s.pod.annotation' + ``` + + + """ + @spec k8s_pod_annotation :: :"k8s.pod.annotation" + def k8s_pod_annotation do + :"k8s.pod.annotation" + end + + @doc """ + The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["k8s.pod.label.app=my-app", "k8s.pod.label.mycompany.io/arch=x64", "k8s.pod.label.data="] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_label() + :"k8s.pod.label" + + ### Erlang + + ```erlang + ?K8S_POD_LABEL. + 'k8s.pod.label' + ``` + + + """ + @spec k8s_pod_label :: :"k8s.pod.label" + def k8s_pod_label do + :"k8s.pod.label" + end + + @deprecated """ + Replaced by `k8s.pod.label`. + """ + @spec k8s_pod_labels :: :"k8s.pod.labels" + def k8s_pod_labels do + :"k8s.pod.labels" + end + + @doc """ + The name of the Pod. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry-pod-autoconf"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_name() + :"k8s.pod.name" + + ### Erlang + + ```erlang + ?K8S_POD_NAME. + 'k8s.pod.name' + ``` + + + """ + @spec k8s_pod_name :: :"k8s.pod.name" + def k8s_pod_name do + :"k8s.pod.name" + end + + @doc """ + The UID of the Pod. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_uid() + :"k8s.pod.uid" + + ### Erlang + + ```erlang + ?K8S_POD_UID. + 'k8s.pod.uid' + ``` + + + """ + @spec k8s_pod_uid :: :"k8s.pod.uid" + def k8s_pod_uid do + :"k8s.pod.uid" + end + + @doc """ + The name of the ReplicaSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_name() + :"k8s.replicaset.name" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_NAME. + 'k8s.replicaset.name' + ``` + + + """ + @spec k8s_replicaset_name :: :"k8s.replicaset.name" + def k8s_replicaset_name do + :"k8s.replicaset.name" + end + + @doc """ + The UID of the ReplicaSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_uid() + :"k8s.replicaset.uid" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_UID. + 'k8s.replicaset.uid' + ``` + + + """ + @spec k8s_replicaset_uid :: :"k8s.replicaset.uid" + def k8s_replicaset_uid do + :"k8s.replicaset.uid" + end + + @doc """ + The name of the StatefulSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_name() + :"k8s.statefulset.name" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_NAME. + 'k8s.statefulset.name' + ``` + + + """ + @spec k8s_statefulset_name :: :"k8s.statefulset.name" + def k8s_statefulset_name do + :"k8s.statefulset.name" + end + + @doc """ + The UID of the StatefulSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_uid() + :"k8s.statefulset.uid" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_UID. + 'k8s.statefulset.uid' + ``` + + + """ + @spec k8s_statefulset_uid :: :"k8s.statefulset.uid" + def k8s_statefulset_uid do + :"k8s.statefulset.uid" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/linux_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/linux_attributes.ex new file mode 100644 index 00000000..c2e6e35c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/linux_attributes.ex @@ -0,0 +1,67 @@ +defmodule OpenTelemetry.SemConv.Incubating.LinuxAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Linux attributes. + """ + + @typedoc """ + The Linux Slab memory state + + ### Enum Values + * `:reclaimable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:unreclaimable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type linux_memory_slab_state_values() :: %{ + :reclaimable => :reclaimable, + :unreclaimable => :unreclaimable + } + @doc """ + The Linux Slab memory state + + ### Examples + + ``` + ["reclaimable", "unreclaimable"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.LinuxAttributes.linux_memory_slab_state() + :"linux.memory.slab.state" + + iex> OpenTelemetry.SemConv.Incubating.LinuxAttributes.linux_memory_slab_state_values().reclaimable + :reclaimable + + iex> %{OpenTelemetry.SemConv.Incubating.LinuxAttributes.linux_memory_slab_state() => OpenTelemetry.SemConv.Incubating.LinuxAttributes.linux_memory_slab_state_values().reclaimable} + %{:"linux.memory.slab.state" => :reclaimable} + + ### Erlang + + ```erlang + ?LINUX_MEMORY_SLAB_STATE. + 'linux.memory.slab.state' + + ?LINUX_MEMORY_SLAB_STATE_VALUES_RECLAIMABLE. + 'reclaimable' + + \#{?LINUX_MEMORY_SLAB_STATE => ?LINUX_MEMORY_SLAB_STATE_VALUES_RECLAIMABLE}. + \#{'linux.memory.slab.state' => 'reclaimable'} + ``` + + + """ + @spec linux_memory_slab_state :: :"linux.memory.slab.state" + def linux_memory_slab_state do + :"linux.memory.slab.state" + end + + @spec linux_memory_slab_state_values() :: linux_memory_slab_state_values() + def linux_memory_slab_state_values() do + %{ + :reclaimable => :reclaimable, + :unreclaimable => :unreclaimable + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/log_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/log_attributes.ex new file mode 100644 index 00000000..4e896783 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/log_attributes.ex @@ -0,0 +1,271 @@ +defmodule OpenTelemetry.SemConv.Incubating.LogAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Log attributes. + """ + + @doc """ + The basename of the file. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["audit.log"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.LogAttributes.log_file_name() + :"log.file.name" + + ### Erlang + + ```erlang + ?LOG_FILE_NAME. + 'log.file.name' + ``` + + + """ + @spec log_file_name :: :"log.file.name" + def log_file_name do + :"log.file.name" + end + + @doc """ + The basename of the file, with symlinks resolved. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["uuid.log"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.LogAttributes.log_file_name_resolved() + :"log.file.name_resolved" + + ### Erlang + + ```erlang + ?LOG_FILE_NAME_RESOLVED. + 'log.file.name_resolved' + ``` + + + """ + @spec log_file_name_resolved :: :"log.file.name_resolved" + def log_file_name_resolved do + :"log.file.name_resolved" + end + + @doc """ + The full path to the file. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/var/log/mysql/audit.log"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.LogAttributes.log_file_path() + :"log.file.path" + + ### Erlang + + ```erlang + ?LOG_FILE_PATH. + 'log.file.path' + ``` + + + """ + @spec log_file_path :: :"log.file.path" + def log_file_path do + :"log.file.path" + end + + @doc """ + The full path to the file, with symlinks resolved. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/var/lib/docker/uuid.log"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.LogAttributes.log_file_path_resolved() + :"log.file.path_resolved" + + ### Erlang + + ```erlang + ?LOG_FILE_PATH_RESOLVED. + 'log.file.path_resolved' + ``` + + + """ + @spec log_file_path_resolved :: :"log.file.path_resolved" + def log_file_path_resolved do + :"log.file.path_resolved" + end + + @typedoc """ + The stream associated with the log. See below for a list of well-known values. + + + ### Enum Values + * `:stdout` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Logs from stdout stream + * `:stderr` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Events from stderr stream + """ + @type log_iostream_values() :: %{ + :stdout => :stdout, + :stderr => :stderr + } + @doc """ + The stream associated with the log. See below for a list of well-known values. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.LogAttributes.log_iostream() + :"log.iostream" + + iex> OpenTelemetry.SemConv.Incubating.LogAttributes.log_iostream_values().stdout + :stdout + + iex> %{OpenTelemetry.SemConv.Incubating.LogAttributes.log_iostream() => OpenTelemetry.SemConv.Incubating.LogAttributes.log_iostream_values().stdout} + %{:"log.iostream" => :stdout} + + ### Erlang + + ```erlang + ?LOG_IOSTREAM. + 'log.iostream' + + ?LOG_IOSTREAM_VALUES_STDOUT. + 'stdout' + + \#{?LOG_IOSTREAM => ?LOG_IOSTREAM_VALUES_STDOUT}. + \#{'log.iostream' => 'stdout'} + ``` + + + """ + @spec log_iostream :: :"log.iostream" + def log_iostream do + :"log.iostream" + end + + @spec log_iostream_values() :: log_iostream_values() + def log_iostream_values() do + %{ + :stdout => :stdout, + :stderr => :stderr + } + end + + @doc """ + The complete orignal Log Record. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This value **MAY** be added when processing a Log Record which was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or a log record read from a file.) + + ### Examples + + ``` + ["77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened", "[INFO] 8/3/24 12:34:56 Something happened"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.LogAttributes.log_record_original() + :"log.record.original" + + ### Erlang + + ```erlang + ?LOG_RECORD_ORIGINAL. + 'log.record.original' + ``` + + + """ + @spec log_record_original :: :"log.record.original" + def log_record_original do + :"log.record.original" + end + + @doc """ + A unique identifier for the Log Record. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records **MUST** have different values. + The id **MAY** be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. + + ### Examples + + ``` + ["01ARZ3NDEKTSV4RRFFQ69G5FAV"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.LogAttributes.log_record_uid() + :"log.record.uid" + + ### Erlang + + ```erlang + ?LOG_RECORD_UID. + 'log.record.uid' + ``` + + + """ + @spec log_record_uid :: :"log.record.uid" + def log_record_uid do + :"log.record.uid" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex new file mode 100644 index 00000000..a9f83b37 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex @@ -0,0 +1,1511 @@ +defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Messaging attributes. + """ + + @doc """ + The number of messages sent, received, or processed in the scope of the batching operation. + ### Value type + + Value must be of type `integer()`. + ### Notes + + Instrumentations **SHOULD** **NOT** set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations **SHOULD** use `messaging.batch.message_count` for batching APIs and **SHOULD** **NOT** use it for single-message APIs. + + ### Examples + + ``` + [0, 1, 2] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_batch_message_count() + :"messaging.batch.message_count" + + ### Erlang + + ```erlang + ?MESSAGING_BATCH_MESSAGE_COUNT. + 'messaging.batch.message_count' + ``` + + + """ + @spec messaging_batch_message_count :: :"messaging.batch.message_count" + def messaging_batch_message_count do + :"messaging.batch.message_count" + end + + @doc """ + A unique identifier for the client that consumes or produces a message. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["client-5", "myhost@8742@s8083jm"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_client_id() + :"messaging.client.id" + + ### Erlang + + ```erlang + ?MESSAGING_CLIENT_ID. + 'messaging.client.id' + ``` + + + """ + @spec messaging_client_id :: :"messaging.client.id" + def messaging_client_id do + :"messaging.client.id" + end + + @doc """ + The name of the consumer group with which a consumer is associated. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Semantic conventions for individual messaging systems **SHOULD** document whether `messaging.consumer.group.name` is applicable and what it means in the context of that system. + + ### Examples + + ``` + ["my-group", "indexer"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_consumer_group_name() + :"messaging.consumer.group.name" + + ### Erlang + + ```erlang + ?MESSAGING_CONSUMER_GROUP_NAME. + 'messaging.consumer.group.name' + ``` + + + """ + @spec messaging_consumer_group_name :: :"messaging.consumer.group.name" + def messaging_consumer_group_name do + :"messaging.consumer.group.name" + end + + @doc """ + A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_destination_anonymous() + :"messaging.destination.anonymous" + + ### Erlang + + ```erlang + ?MESSAGING_DESTINATION_ANONYMOUS. + 'messaging.destination.anonymous' + ``` + + + """ + @spec messaging_destination_anonymous :: :"messaging.destination.anonymous" + def messaging_destination_anonymous do + :"messaging.destination.anonymous" + end + + @doc """ + The message destination name + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Destination name **SHOULD** uniquely identify a specific queue, topic or other entity within the broker. If + the broker doesn't have such notion, the destination name **SHOULD** uniquely identify the broker. + + ### Examples + + ``` + ["MyQueue", "MyTopic"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_destination_name() + :"messaging.destination.name" + + ### Erlang + + ```erlang + ?MESSAGING_DESTINATION_NAME. + 'messaging.destination.name' + ``` + + + """ + @spec messaging_destination_name :: :"messaging.destination.name" + def messaging_destination_name do + :"messaging.destination.name" + end + + @doc """ + The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 1 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_destination_partition_id() + :"messaging.destination.partition.id" + + ### Erlang + + ```erlang + ?MESSAGING_DESTINATION_PARTITION_ID. + 'messaging.destination.partition.id' + ``` + + + """ + @spec messaging_destination_partition_id :: :"messaging.destination.partition.id" + def messaging_destination_partition_id do + :"messaging.destination.partition.id" + end + + @doc """ + The name of the destination subscription from which a message is consumed. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Semantic conventions for individual messaging systems **SHOULD** document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. + + ### Examples + + ``` + ["subscription-a"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_destination_subscription_name() + :"messaging.destination.subscription.name" + + ### Erlang + + ```erlang + ?MESSAGING_DESTINATION_SUBSCRIPTION_NAME. + 'messaging.destination.subscription.name' + ``` + + + """ + @spec messaging_destination_subscription_name :: :"messaging.destination.subscription.name" + def messaging_destination_subscription_name do + :"messaging.destination.subscription.name" + end + + @doc """ + Low cardinality representation of the messaging destination name + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation. + + ### Examples + + ``` + ["/customers/{customerId}"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_destination_template() + :"messaging.destination.template" + + ### Erlang + + ```erlang + ?MESSAGING_DESTINATION_TEMPLATE. + 'messaging.destination.template' + ``` + + + """ + @spec messaging_destination_template :: :"messaging.destination.template" + def messaging_destination_template do + :"messaging.destination.template" + end + + @doc """ + A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_destination_temporary() + :"messaging.destination.temporary" + + ### Erlang + + ```erlang + ?MESSAGING_DESTINATION_TEMPORARY. + 'messaging.destination.temporary' + ``` + + + """ + @spec messaging_destination_temporary :: :"messaging.destination.temporary" + def messaging_destination_temporary do + :"messaging.destination.temporary" + end + + @deprecated """ + No replacement at this time. + """ + @spec messaging_destination_publish_anonymous :: :"messaging.destination_publish.anonymous" + def messaging_destination_publish_anonymous do + :"messaging.destination_publish.anonymous" + end + + @deprecated """ + No replacement at this time. + """ + @spec messaging_destination_publish_name :: :"messaging.destination_publish.name" + def messaging_destination_publish_name do + :"messaging.destination_publish.name" + end + + @deprecated """ + Replaced by `messaging.consumer.group.name`. + + """ + @spec messaging_eventhubs_consumer_group :: :"messaging.eventhubs.consumer.group" + def messaging_eventhubs_consumer_group do + :"messaging.eventhubs.consumer.group" + end + + @doc """ + The UTC epoch seconds at which the message has been accepted and stored in the entity. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 1701393730 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_eventhubs_message_enqueued_time() + :"messaging.eventhubs.message.enqueued_time" + + ### Erlang + + ```erlang + ?MESSAGING_EVENTHUBS_MESSAGE_ENQUEUED_TIME. + 'messaging.eventhubs.message.enqueued_time' + ``` + + + """ + @spec messaging_eventhubs_message_enqueued_time :: :"messaging.eventhubs.message.enqueued_time" + def messaging_eventhubs_message_enqueued_time do + :"messaging.eventhubs.message.enqueued_time" + end + + @doc """ + The ack deadline in seconds set for the modify ack deadline request. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 10 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_gcp_pubsub_message_ack_deadline() + :"messaging.gcp_pubsub.message.ack_deadline" + + ### Erlang + + ```erlang + ?MESSAGING_GCP_PUBSUB_MESSAGE_ACK_DEADLINE. + 'messaging.gcp_pubsub.message.ack_deadline' + ``` + + + """ + @spec messaging_gcp_pubsub_message_ack_deadline :: :"messaging.gcp_pubsub.message.ack_deadline" + def messaging_gcp_pubsub_message_ack_deadline do + :"messaging.gcp_pubsub.message.ack_deadline" + end + + @doc """ + The ack id for a given message. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ack_id + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_gcp_pubsub_message_ack_id() + :"messaging.gcp_pubsub.message.ack_id" + + ### Erlang + + ```erlang + ?MESSAGING_GCP_PUBSUB_MESSAGE_ACK_ID. + 'messaging.gcp_pubsub.message.ack_id' + ``` + + + """ + @spec messaging_gcp_pubsub_message_ack_id :: :"messaging.gcp_pubsub.message.ack_id" + def messaging_gcp_pubsub_message_ack_id do + :"messaging.gcp_pubsub.message.ack_id" + end + + @doc """ + The delivery attempt for a given message. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 2 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_gcp_pubsub_message_delivery_attempt() + :"messaging.gcp_pubsub.message.delivery_attempt" + + ### Erlang + + ```erlang + ?MESSAGING_GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT. + 'messaging.gcp_pubsub.message.delivery_attempt' + ``` + + + """ + @spec messaging_gcp_pubsub_message_delivery_attempt :: + :"messaging.gcp_pubsub.message.delivery_attempt" + def messaging_gcp_pubsub_message_delivery_attempt do + :"messaging.gcp_pubsub.message.delivery_attempt" + end + + @doc """ + The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ordering_key + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_gcp_pubsub_message_ordering_key() + :"messaging.gcp_pubsub.message.ordering_key" + + ### Erlang + + ```erlang + ?MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY. + 'messaging.gcp_pubsub.message.ordering_key' + ``` + + + """ + @spec messaging_gcp_pubsub_message_ordering_key :: :"messaging.gcp_pubsub.message.ordering_key" + def messaging_gcp_pubsub_message_ordering_key do + :"messaging.gcp_pubsub.message.ordering_key" + end + + @deprecated """ + Replaced by `messaging.consumer.group.name`. + + """ + @spec messaging_kafka_consumer_group :: :"messaging.kafka.consumer.group" + def messaging_kafka_consumer_group do + :"messaging.kafka.consumer.group" + end + + @deprecated """ + Replaced by `messaging.destination.partition.id`. + """ + @spec messaging_kafka_destination_partition :: :"messaging.kafka.destination.partition" + def messaging_kafka_destination_partition do + :"messaging.kafka.destination.partition" + end + + @doc """ + Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute **MUST** **NOT** be set. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. + + ### Examples + + ``` + myKey + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_kafka_message_key() + :"messaging.kafka.message.key" + + ### Erlang + + ```erlang + ?MESSAGING_KAFKA_MESSAGE_KEY. + 'messaging.kafka.message.key' + ``` + + + """ + @spec messaging_kafka_message_key :: :"messaging.kafka.message.key" + def messaging_kafka_message_key do + :"messaging.kafka.message.key" + end + + @deprecated """ + Replaced by `messaging.kafka.offset`. + + """ + @spec messaging_kafka_message_offset :: :"messaging.kafka.message.offset" + def messaging_kafka_message_offset do + :"messaging.kafka.message.offset" + end + + @doc """ + A boolean that is true if the message is a tombstone. + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_kafka_message_tombstone() + :"messaging.kafka.message.tombstone" + + ### Erlang + + ```erlang + ?MESSAGING_KAFKA_MESSAGE_TOMBSTONE. + 'messaging.kafka.message.tombstone' + ``` + + + """ + @spec messaging_kafka_message_tombstone :: :"messaging.kafka.message.tombstone" + def messaging_kafka_message_tombstone do + :"messaging.kafka.message.tombstone" + end + + @doc """ + The offset of a record in the corresponding Kafka partition. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 42 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_kafka_offset() + :"messaging.kafka.offset" + + ### Erlang + + ```erlang + ?MESSAGING_KAFKA_OFFSET. + 'messaging.kafka.offset' + ``` + + + """ + @spec messaging_kafka_offset :: :"messaging.kafka.offset" + def messaging_kafka_offset do + :"messaging.kafka.offset" + end + + @doc """ + The size of the message body in bytes. + + ### Value type + + Value must be of type `integer()`. + ### Notes + + This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed + body size should be used. + + ### Examples + + ``` + 1439 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_message_body_size() + :"messaging.message.body.size" + + ### Erlang + + ```erlang + ?MESSAGING_MESSAGE_BODY_SIZE. + 'messaging.message.body.size' + ``` + + + """ + @spec messaging_message_body_size :: :"messaging.message.body.size" + def messaging_message_body_size do + :"messaging.message.body.size" + end + + @doc """ + The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + MyConversationId + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_message_conversation_id() + :"messaging.message.conversation_id" + + ### Erlang + + ```erlang + ?MESSAGING_MESSAGE_CONVERSATION_ID. + 'messaging.message.conversation_id' + ``` + + + """ + @spec messaging_message_conversation_id :: :"messaging.message.conversation_id" + def messaging_message_conversation_id do + :"messaging.message.conversation_id" + end + + @doc """ + The size of the message body and metadata in bytes. + + ### Value type + + Value must be of type `integer()`. + ### Notes + + This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed + size should be used. + + ### Examples + + ``` + 2738 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_message_envelope_size() + :"messaging.message.envelope.size" + + ### Erlang + + ```erlang + ?MESSAGING_MESSAGE_ENVELOPE_SIZE. + 'messaging.message.envelope.size' + ``` + + + """ + @spec messaging_message_envelope_size :: :"messaging.message.envelope.size" + def messaging_message_envelope_size do + :"messaging.message.envelope.size" + end + + @doc """ + A value used by the messaging system as an identifier for the message, represented as a string. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 452a7c7c7c7048c2f887f61572b18fc2 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_message_id() + :"messaging.message.id" + + ### Erlang + + ```erlang + ?MESSAGING_MESSAGE_ID. + 'messaging.message.id' + ``` + + + """ + @spec messaging_message_id :: :"messaging.message.id" + def messaging_message_id do + :"messaging.message.id" + end + + @deprecated """ + Replaced by `messaging.operation.type`. + """ + @spec messaging_operation :: :"messaging.operation" + def messaging_operation do + :"messaging.operation" + end + + @doc """ + The system-specific name of the messaging operation. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["ack", "nack", "send"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_name() + :"messaging.operation.name" + + ### Erlang + + ```erlang + ?MESSAGING_OPERATION_NAME. + 'messaging.operation.name' + ``` + + + """ + @spec messaging_operation_name :: :"messaging.operation.name" + def messaging_operation_name do + :"messaging.operation.name" + end + + @typedoc """ + A string identifying the type of the messaging operation. + + + ### Enum Values + * `:publish` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created. + + * `:create` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios. + + * `:receive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. + + * `:process` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One or more messages are processed by a consumer. + + * `:settle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One or more messages are settled. + + * `:deliver` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated. Use `process` instead.~~ + """ + @type messaging_operation_type_values() :: %{ + :publish => :publish, + :create => :create, + :receive => :receive, + :process => :process, + :settle => :settle, + :deliver => :deliver + } + @doc """ + A string identifying the type of the messaging operation. + + + ### Notes + + If a custom value is used, it **MUST** be of low cardinality. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type() + :"messaging.operation.type" + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type_values().publish + :publish + + iex> %{OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type() => OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type_values().publish} + %{:"messaging.operation.type" => :publish} + + ### Erlang + + ```erlang + ?MESSAGING_OPERATION_TYPE. + 'messaging.operation.type' + + ?MESSAGING_OPERATION_TYPE_VALUES_PUBLISH. + 'publish' + + \#{?MESSAGING_OPERATION_TYPE => ?MESSAGING_OPERATION_TYPE_VALUES_PUBLISH}. + \#{'messaging.operation.type' => 'publish'} + ``` + + + """ + @spec messaging_operation_type :: :"messaging.operation.type" + def messaging_operation_type do + :"messaging.operation.type" + end + + @spec messaging_operation_type_values() :: messaging_operation_type_values() + def messaging_operation_type_values() do + %{ + :publish => :publish, + :create => :create, + :receive => :receive, + :process => :process, + :settle => :settle, + :deliver => :deliver + } + end + + @doc """ + RabbitMQ message routing key. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + myKey + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rabbitmq_destination_routing_key() + :"messaging.rabbitmq.destination.routing_key" + + ### Erlang + + ```erlang + ?MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY. + 'messaging.rabbitmq.destination.routing_key' + ``` + + + """ + @spec messaging_rabbitmq_destination_routing_key :: + :"messaging.rabbitmq.destination.routing_key" + def messaging_rabbitmq_destination_routing_key do + :"messaging.rabbitmq.destination.routing_key" + end + + @doc """ + RabbitMQ message delivery tag + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 123 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rabbitmq_message_delivery_tag() + :"messaging.rabbitmq.message.delivery_tag" + + ### Erlang + + ```erlang + ?MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG. + 'messaging.rabbitmq.message.delivery_tag' + ``` + + + """ + @spec messaging_rabbitmq_message_delivery_tag :: :"messaging.rabbitmq.message.delivery_tag" + def messaging_rabbitmq_message_delivery_tag do + :"messaging.rabbitmq.message.delivery_tag" + end + + @deprecated """ + Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. + + """ + @spec messaging_rocketmq_client_group :: :"messaging.rocketmq.client_group" + def messaging_rocketmq_client_group do + :"messaging.rocketmq.client_group" + end + + @typedoc """ + Model of message consumption. This only applies to consumer spans. + + + ### Enum Values + * `:clustering` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Clustering consumption model + * `:broadcasting` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Broadcasting consumption model + """ + @type messaging_rocketmq_consumption_model_values() :: %{ + :clustering => :clustering, + :broadcasting => :broadcasting + } + @doc """ + Model of message consumption. This only applies to consumer spans. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_consumption_model() + :"messaging.rocketmq.consumption_model" + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_consumption_model_values().clustering + :clustering + + iex> %{OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_consumption_model() => OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_consumption_model_values().clustering} + %{:"messaging.rocketmq.consumption_model" => :clustering} + + ### Erlang + + ```erlang + ?MESSAGING_ROCKETMQ_CONSUMPTION_MODEL. + 'messaging.rocketmq.consumption_model' + + ?MESSAGING_ROCKETMQ_CONSUMPTION_MODEL_VALUES_CLUSTERING. + 'clustering' + + \#{?MESSAGING_ROCKETMQ_CONSUMPTION_MODEL => ?MESSAGING_ROCKETMQ_CONSUMPTION_MODEL_VALUES_CLUSTERING}. + \#{'messaging.rocketmq.consumption_model' => 'clustering'} + ``` + + + """ + @spec messaging_rocketmq_consumption_model :: :"messaging.rocketmq.consumption_model" + def messaging_rocketmq_consumption_model do + :"messaging.rocketmq.consumption_model" + end + + @spec messaging_rocketmq_consumption_model_values() :: + messaging_rocketmq_consumption_model_values() + def messaging_rocketmq_consumption_model_values() do + %{ + :clustering => :clustering, + :broadcasting => :broadcasting + } + end + + @doc """ + The delay time level for delay message, which determines the message delay time. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 3 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_delay_time_level() + :"messaging.rocketmq.message.delay_time_level" + + ### Erlang + + ```erlang + ?MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL. + 'messaging.rocketmq.message.delay_time_level' + ``` + + + """ + @spec messaging_rocketmq_message_delay_time_level :: + :"messaging.rocketmq.message.delay_time_level" + def messaging_rocketmq_message_delay_time_level do + :"messaging.rocketmq.message.delay_time_level" + end + + @doc """ + The timestamp in milliseconds that the delay message is expected to be delivered to consumer. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 1665987217045 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_delivery_timestamp() + :"messaging.rocketmq.message.delivery_timestamp" + + ### Erlang + + ```erlang + ?MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP. + 'messaging.rocketmq.message.delivery_timestamp' + ``` + + + """ + @spec messaging_rocketmq_message_delivery_timestamp :: + :"messaging.rocketmq.message.delivery_timestamp" + def messaging_rocketmq_message_delivery_timestamp do + :"messaging.rocketmq.message.delivery_timestamp" + end + + @doc """ + It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + myMessageGroup + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_group() + :"messaging.rocketmq.message.group" + + ### Erlang + + ```erlang + ?MESSAGING_ROCKETMQ_MESSAGE_GROUP. + 'messaging.rocketmq.message.group' + ``` + + + """ + @spec messaging_rocketmq_message_group :: :"messaging.rocketmq.message.group" + def messaging_rocketmq_message_group do + :"messaging.rocketmq.message.group" + end + + @doc """ + Key(s) of message, another way to mark message besides message id. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["keyA", "keyB"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_keys() + :"messaging.rocketmq.message.keys" + + ### Erlang + + ```erlang + ?MESSAGING_ROCKETMQ_MESSAGE_KEYS. + 'messaging.rocketmq.message.keys' + ``` + + + """ + @spec messaging_rocketmq_message_keys :: :"messaging.rocketmq.message.keys" + def messaging_rocketmq_message_keys do + :"messaging.rocketmq.message.keys" + end + + @doc """ + The secondary classifier of message besides topic. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + tagA + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_tag() + :"messaging.rocketmq.message.tag" + + ### Erlang + + ```erlang + ?MESSAGING_ROCKETMQ_MESSAGE_TAG. + 'messaging.rocketmq.message.tag' + ``` + + + """ + @spec messaging_rocketmq_message_tag :: :"messaging.rocketmq.message.tag" + def messaging_rocketmq_message_tag do + :"messaging.rocketmq.message.tag" + end + + @typedoc """ + Type of message. + + + ### Enum Values + * `:normal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Normal message + * `:fifo` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - FIFO message + * `:delay` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Delay message + * `:transaction` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Transaction message + """ + @type messaging_rocketmq_message_type_values() :: %{ + :normal => :normal, + :fifo => :fifo, + :delay => :delay, + :transaction => :transaction + } + @doc """ + Type of message. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_type() + :"messaging.rocketmq.message.type" + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_type_values().normal + :normal + + iex> %{OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_type() => OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_message_type_values().normal} + %{:"messaging.rocketmq.message.type" => :normal} + + ### Erlang + + ```erlang + ?MESSAGING_ROCKETMQ_MESSAGE_TYPE. + 'messaging.rocketmq.message.type' + + ?MESSAGING_ROCKETMQ_MESSAGE_TYPE_VALUES_NORMAL. + 'normal' + + \#{?MESSAGING_ROCKETMQ_MESSAGE_TYPE => ?MESSAGING_ROCKETMQ_MESSAGE_TYPE_VALUES_NORMAL}. + \#{'messaging.rocketmq.message.type' => 'normal'} + ``` + + + """ + @spec messaging_rocketmq_message_type :: :"messaging.rocketmq.message.type" + def messaging_rocketmq_message_type do + :"messaging.rocketmq.message.type" + end + + @spec messaging_rocketmq_message_type_values() :: messaging_rocketmq_message_type_values() + def messaging_rocketmq_message_type_values() do + %{ + :normal => :normal, + :fifo => :fifo, + :delay => :delay, + :transaction => :transaction + } + end + + @doc """ + Namespace of RocketMQ resources, resources in different namespaces are individual. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + myNamespace + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_rocketmq_namespace() + :"messaging.rocketmq.namespace" + + ### Erlang + + ```erlang + ?MESSAGING_ROCKETMQ_NAMESPACE. + 'messaging.rocketmq.namespace' + ``` + + + """ + @spec messaging_rocketmq_namespace :: :"messaging.rocketmq.namespace" + def messaging_rocketmq_namespace do + :"messaging.rocketmq.namespace" + end + + @deprecated """ + Replaced by `messaging.servicebus.destination.subscription_name`. + + """ + @spec messaging_servicebus_destination_subscription_name :: + :"messaging.servicebus.destination.subscription_name" + def messaging_servicebus_destination_subscription_name do + :"messaging.servicebus.destination.subscription_name" + end + + @typedoc """ + Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). + + + ### Enum Values + * `:complete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Message is completed + * `:abandon` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Message is abandoned + * `:dead_letter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Message is sent to dead letter queue + * `:defer` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Message is deferred + """ + @type messaging_servicebus_disposition_status_values() :: %{ + :complete => :complete, + :abandon => :abandon, + :dead_letter => :dead_letter, + :defer => :defer + } + @doc """ + Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_servicebus_disposition_status() + :"messaging.servicebus.disposition_status" + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_servicebus_disposition_status_values().complete + :complete + + iex> %{OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_servicebus_disposition_status() => OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_servicebus_disposition_status_values().complete} + %{:"messaging.servicebus.disposition_status" => :complete} + + ### Erlang + + ```erlang + ?MESSAGING_SERVICEBUS_DISPOSITION_STATUS. + 'messaging.servicebus.disposition_status' + + ?MESSAGING_SERVICEBUS_DISPOSITION_STATUS_VALUES_COMPLETE. + 'complete' + + \#{?MESSAGING_SERVICEBUS_DISPOSITION_STATUS => ?MESSAGING_SERVICEBUS_DISPOSITION_STATUS_VALUES_COMPLETE}. + \#{'messaging.servicebus.disposition_status' => 'complete'} + ``` + + + """ + @spec messaging_servicebus_disposition_status :: :"messaging.servicebus.disposition_status" + def messaging_servicebus_disposition_status do + :"messaging.servicebus.disposition_status" + end + + @spec messaging_servicebus_disposition_status_values() :: + messaging_servicebus_disposition_status_values() + def messaging_servicebus_disposition_status_values() do + %{ + :complete => :complete, + :abandon => :abandon, + :dead_letter => :dead_letter, + :defer => :defer + } + end + + @doc """ + Number of deliveries that have been attempted for this message. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 2 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_servicebus_message_delivery_count() + :"messaging.servicebus.message.delivery_count" + + ### Erlang + + ```erlang + ?MESSAGING_SERVICEBUS_MESSAGE_DELIVERY_COUNT. + 'messaging.servicebus.message.delivery_count' + ``` + + + """ + @spec messaging_servicebus_message_delivery_count :: + :"messaging.servicebus.message.delivery_count" + def messaging_servicebus_message_delivery_count do + :"messaging.servicebus.message.delivery_count" + end + + @doc """ + The UTC epoch seconds at which the message has been accepted and stored in the entity. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 1701393730 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_servicebus_message_enqueued_time() + :"messaging.servicebus.message.enqueued_time" + + ### Erlang + + ```erlang + ?MESSAGING_SERVICEBUS_MESSAGE_ENQUEUED_TIME. + 'messaging.servicebus.message.enqueued_time' + ``` + + + """ + @spec messaging_servicebus_message_enqueued_time :: + :"messaging.servicebus.message.enqueued_time" + def messaging_servicebus_message_enqueued_time do + :"messaging.servicebus.message.enqueued_time" + end + + @typedoc """ + The messaging system as identified by the client instrumentation. + + ### Enum Values + * `:activemq` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache ActiveMQ + * `:aws_sqs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon Simple Queue Service (SQS) + * `:eventgrid` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Event Grid + * `:eventhubs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Event Hubs + * `:servicebus` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Service Bus + * `:gcp_pubsub` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Pub/Sub + * `:jms` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Java Message Service + * `:kafka` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Kafka + * `:rabbitmq` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - RabbitMQ + * `:rocketmq` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache RocketMQ + * `:pulsar` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Pulsar + """ + @type messaging_system_values() :: %{ + :activemq => :activemq, + :aws_sqs => :aws_sqs, + :eventgrid => :eventgrid, + :eventhubs => :eventhubs, + :servicebus => :servicebus, + :gcp_pubsub => :gcp_pubsub, + :jms => :jms, + :kafka => :kafka, + :rabbitmq => :rabbitmq, + :rocketmq => :rocketmq, + :pulsar => :pulsar + } + @doc """ + The messaging system as identified by the client instrumentation. + + ### Notes + + The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_system() + :"messaging.system" + + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_system_values().activemq + :activemq + + iex> %{OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_system() => OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_system_values().activemq} + %{:"messaging.system" => :activemq} + + ### Erlang + + ```erlang + ?MESSAGING_SYSTEM. + 'messaging.system' + + ?MESSAGING_SYSTEM_VALUES_ACTIVEMQ. + 'activemq' + + \#{?MESSAGING_SYSTEM => ?MESSAGING_SYSTEM_VALUES_ACTIVEMQ}. + \#{'messaging.system' => 'activemq'} + ``` + + + """ + @spec messaging_system :: :"messaging.system" + def messaging_system do + :"messaging.system" + end + + @spec messaging_system_values() :: messaging_system_values() + def messaging_system_values() do + %{ + :activemq => :activemq, + :aws_sqs => :aws_sqs, + :eventgrid => :eventgrid, + :eventhubs => :eventhubs, + :servicebus => :servicebus, + :gcp_pubsub => :gcp_pubsub, + :jms => :jms, + :kafka => :kafka, + :rabbitmq => :rabbitmq, + :rocketmq => :rocketmq, + :pulsar => :pulsar + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex new file mode 100644 index 00000000..dafaa058 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex @@ -0,0 +1,572 @@ +defmodule OpenTelemetry.SemConv.Incubating.NetworkAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Network attributes. + """ + defdelegate network_local_address(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_local_port(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_peer_address(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_peer_port(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_protocol_name(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_protocol_version(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_transport(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_transport_values(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_type(), to: OpenTelemetry.SemConv.NetworkAttributes + + defdelegate network_type_values(), to: OpenTelemetry.SemConv.NetworkAttributes + + @deprecated """ + Replaced by `network.local.address`. + """ + @spec net_host_ip :: :"net.host.ip" + def net_host_ip do + :"net.host.ip" + end + + @deprecated """ + Replaced by `server.address`. + """ + @spec net_host_name :: :"net.host.name" + def net_host_name do + :"net.host.name" + end + + @deprecated """ + Replaced by `server.port`. + """ + @spec net_host_port :: :"net.host.port" + def net_host_port do + :"net.host.port" + end + + @deprecated """ + Replaced by `network.peer.address`. + """ + @spec net_peer_ip :: :"net.peer.ip" + def net_peer_ip do + :"net.peer.ip" + end + + @deprecated """ + Replaced by `server.address` on client spans and `client.address` on server spans. + """ + @spec net_peer_name :: :"net.peer.name" + def net_peer_name do + :"net.peer.name" + end + + @deprecated """ + Replaced by `server.port` on client spans and `client.port` on server spans. + """ + @spec net_peer_port :: :"net.peer.port" + def net_peer_port do + :"net.peer.port" + end + + @deprecated """ + Replaced by `network.protocol.name`. + """ + @spec net_protocol_name :: :"net.protocol.name" + def net_protocol_name do + :"net.protocol.name" + end + + @deprecated """ + Replaced by `network.protocol.version`. + """ + @spec net_protocol_version :: :"net.protocol.version" + def net_protocol_version do + :"net.protocol.version" + end + + @typedoc """ + Deprecated, use `network.transport` and `network.type`. + + ### Enum Values + * `:inet` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IPv4 address + * `:inet6` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IPv6 address + * `:unix` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Unix domain socket path + """ + @type net_sock_family_values() :: %{ + :inet => :inet, + :inet6 => :inet6, + :unix => :unix + } + @deprecated """ + Split to `network.transport` and `network.type`. + """ + @spec net_sock_family :: :"net.sock.family" + def net_sock_family do + :"net.sock.family" + end + + @spec net_sock_family_values() :: net_sock_family_values() + def net_sock_family_values() do + %{ + :inet => :inet, + :inet6 => :inet6, + :unix => :unix + } + end + + @deprecated """ + Replaced by `network.local.address`. + """ + @spec net_sock_host_addr :: :"net.sock.host.addr" + def net_sock_host_addr do + :"net.sock.host.addr" + end + + @deprecated """ + Replaced by `network.local.port`. + """ + @spec net_sock_host_port :: :"net.sock.host.port" + def net_sock_host_port do + :"net.sock.host.port" + end + + @deprecated """ + Replaced by `network.peer.address`. + """ + @spec net_sock_peer_addr :: :"net.sock.peer.addr" + def net_sock_peer_addr do + :"net.sock.peer.addr" + end + + @deprecated """ + Removed. + """ + @spec net_sock_peer_name :: :"net.sock.peer.name" + def net_sock_peer_name do + :"net.sock.peer.name" + end + + @deprecated """ + Replaced by `network.peer.port`. + """ + @spec net_sock_peer_port :: :"net.sock.peer.port" + def net_sock_peer_port do + :"net.sock.peer.port" + end + + @typedoc """ + Deprecated, use `network.transport`. + + ### Enum Values + * `:ip_tcp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:ip_udp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:pipe` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Named or anonymous pipe. + * `:inproc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - In-process communication. + * `:other` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Something else (non IP-based). + """ + @type net_transport_values() :: %{ + :ip_tcp => :ip_tcp, + :ip_udp => :ip_udp, + :pipe => :pipe, + :inproc => :inproc, + :other => :other + } + @deprecated """ + Replaced by `network.transport`. + """ + @spec net_transport :: :"net.transport" + def net_transport do + :"net.transport" + end + + @spec net_transport_values() :: net_transport_values() + def net_transport_values() do + %{ + :ip_tcp => :ip_tcp, + :ip_udp => :ip_udp, + :pipe => :pipe, + :inproc => :inproc, + :other => :other + } + end + + @doc """ + The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + DE + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_carrier_icc() + :"network.carrier.icc" + + ### Erlang + + ```erlang + ?NETWORK_CARRIER_ICC. + 'network.carrier.icc' + ``` + + + """ + @spec network_carrier_icc :: :"network.carrier.icc" + def network_carrier_icc do + :"network.carrier.icc" + end + + @doc """ + The mobile carrier country code. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 310 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_carrier_mcc() + :"network.carrier.mcc" + + ### Erlang + + ```erlang + ?NETWORK_CARRIER_MCC. + 'network.carrier.mcc' + ``` + + + """ + @spec network_carrier_mcc :: :"network.carrier.mcc" + def network_carrier_mcc do + :"network.carrier.mcc" + end + + @doc """ + The mobile carrier network code. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 001 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_carrier_mnc() + :"network.carrier.mnc" + + ### Erlang + + ```erlang + ?NETWORK_CARRIER_MNC. + 'network.carrier.mnc' + ``` + + + """ + @spec network_carrier_mnc :: :"network.carrier.mnc" + def network_carrier_mnc do + :"network.carrier.mnc" + end + + @doc """ + The name of the mobile carrier. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + sprint + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_carrier_name() + :"network.carrier.name" + + ### Erlang + + ```erlang + ?NETWORK_CARRIER_NAME. + 'network.carrier.name' + ``` + + + """ + @spec network_carrier_name :: :"network.carrier.name" + def network_carrier_name do + :"network.carrier.name" + end + + @typedoc """ + This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + + ### Enum Values + * `:gprs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - GPRS + * `:edge` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - EDGE + * `:umts` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - UMTS + * `:cdma` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - CDMA + * `:evdo_0` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - EVDO Rel. 0 + * `:evdo_a` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - EVDO Rev. A + * `:cdma2000_1xrtt` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - CDMA2000 1XRTT + * `:hsdpa` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HSDPA + * `:hsupa` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HSUPA + * `:hspa` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HSPA + * `:iden` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IDEN + * `:evdo_b` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - EVDO Rev. B + * `:lte` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - LTE + * `:ehrpd` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - EHRPD + * `:hspap` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HSPAP + * `:gsm` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - GSM + * `:td_scdma` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - TD-SCDMA + * `:iwlan` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IWLAN + * `:nr` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 5G NR (New Radio) + * `:nrnsa` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 5G NRNSA (New Radio Non-Standalone) + * `:lte_ca` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - LTE CA + """ + @type network_connection_subtype_values() :: %{ + :gprs => :gprs, + :edge => :edge, + :umts => :umts, + :cdma => :cdma, + :evdo_0 => :evdo_0, + :evdo_a => :evdo_a, + :cdma2000_1xrtt => :cdma2000_1xrtt, + :hsdpa => :hsdpa, + :hsupa => :hsupa, + :hspa => :hspa, + :iden => :iden, + :evdo_b => :evdo_b, + :lte => :lte, + :ehrpd => :ehrpd, + :hspap => :hspap, + :gsm => :gsm, + :td_scdma => :td_scdma, + :iwlan => :iwlan, + :nr => :nr, + :nrnsa => :nrnsa, + :lte_ca => :lte_ca + } + @doc """ + This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + + ### Examples + + ``` + LTE + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_subtype() + :"network.connection.subtype" + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_subtype_values().gprs + :gprs + + iex> %{OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_subtype() => OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_subtype_values().gprs} + %{:"network.connection.subtype" => :gprs} + + ### Erlang + + ```erlang + ?NETWORK_CONNECTION_SUBTYPE. + 'network.connection.subtype' + + ?NETWORK_CONNECTION_SUBTYPE_VALUES_GPRS. + 'gprs' + + \#{?NETWORK_CONNECTION_SUBTYPE => ?NETWORK_CONNECTION_SUBTYPE_VALUES_GPRS}. + \#{'network.connection.subtype' => 'gprs'} + ``` + + + """ + @spec network_connection_subtype :: :"network.connection.subtype" + def network_connection_subtype do + :"network.connection.subtype" + end + + @spec network_connection_subtype_values() :: network_connection_subtype_values() + def network_connection_subtype_values() do + %{ + :gprs => :gprs, + :edge => :edge, + :umts => :umts, + :cdma => :cdma, + :evdo_0 => :evdo_0, + :evdo_a => :evdo_a, + :cdma2000_1xrtt => :cdma2000_1xrtt, + :hsdpa => :hsdpa, + :hsupa => :hsupa, + :hspa => :hspa, + :iden => :iden, + :evdo_b => :evdo_b, + :lte => :lte, + :ehrpd => :ehrpd, + :hspap => :hspap, + :gsm => :gsm, + :td_scdma => :td_scdma, + :iwlan => :iwlan, + :nr => :nr, + :nrnsa => :nrnsa, + :lte_ca => :lte_ca + } + end + + @typedoc """ + The internet connection type. + + ### Enum Values + * `:wifi` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:wired` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:cell` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:unavailable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type network_connection_type_values() :: %{ + :wifi => :wifi, + :wired => :wired, + :cell => :cell, + :unavailable => :unavailable, + :unknown => :unknown + } + @doc """ + The internet connection type. + + ### Examples + + ``` + wifi + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_type() + :"network.connection.type" + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_type_values().wifi + :wifi + + iex> %{OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_type() => OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_type_values().wifi} + %{:"network.connection.type" => :wifi} + + ### Erlang + + ```erlang + ?NETWORK_CONNECTION_TYPE. + 'network.connection.type' + + ?NETWORK_CONNECTION_TYPE_VALUES_WIFI. + 'wifi' + + \#{?NETWORK_CONNECTION_TYPE => ?NETWORK_CONNECTION_TYPE_VALUES_WIFI}. + \#{'network.connection.type' => 'wifi'} + ``` + + + """ + @spec network_connection_type :: :"network.connection.type" + def network_connection_type do + :"network.connection.type" + end + + @spec network_connection_type_values() :: network_connection_type_values() + def network_connection_type_values() do + %{ + :wifi => :wifi, + :wired => :wired, + :cell => :cell, + :unavailable => :unavailable, + :unknown => :unknown + } + end + + @typedoc """ + The network IO operation direction. + + ### Enum Values + * `:transmit` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:receive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type network_io_direction_values() :: %{ + :transmit => :transmit, + :receive => :receive + } + @doc """ + The network IO operation direction. + + ### Examples + + ``` + ["transmit"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_io_direction() + :"network.io.direction" + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_io_direction_values().transmit + :transmit + + iex> %{OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_io_direction() => OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_io_direction_values().transmit} + %{:"network.io.direction" => :transmit} + + ### Erlang + + ```erlang + ?NETWORK_IO_DIRECTION. + 'network.io.direction' + + ?NETWORK_IO_DIRECTION_VALUES_TRANSMIT. + 'transmit' + + \#{?NETWORK_IO_DIRECTION => ?NETWORK_IO_DIRECTION_VALUES_TRANSMIT}. + \#{'network.io.direction' => 'transmit'} + ``` + + + """ + @spec network_io_direction :: :"network.io.direction" + def network_io_direction do + :"network.io.direction" + end + + @spec network_io_direction_values() :: network_io_direction_values() + def network_io_direction_values() do + %{ + :transmit => :transmit, + :receive => :receive + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oci_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oci_attributes.ex new file mode 100644 index 00000000..7bed10ea --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oci_attributes.ex @@ -0,0 +1,44 @@ +defmodule OpenTelemetry.SemConv.Incubating.OCIAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for OCI attributes. + """ + + @doc """ + The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). + An example can be found in [Example Image Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). + + ### Examples + + ``` + ["sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OCIAttributes.oci_manifest_digest() + :"oci.manifest.digest" + + ### Erlang + + ```erlang + ?OCI_MANIFEST_DIGEST. + 'oci.manifest.digest' + ``` + + + """ + @spec oci_manifest_digest :: :"oci.manifest.digest" + def oci_manifest_digest do + :"oci.manifest.digest" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/opentracing_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/opentracing_attributes.ex new file mode 100644 index 00000000..106b3a6c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/opentracing_attributes.ex @@ -0,0 +1,66 @@ +defmodule OpenTelemetry.SemConv.Incubating.OpentracingAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Opentracing attributes. + """ + + @typedoc """ + Parent-child Reference type + + ### Enum Values + * `:child_of` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The parent Span depends on the child Span in some capacity + * `:follows_from` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The parent Span doesn't depend in any way on the result of the child Span + """ + @type opentracing_ref_type_values() :: %{ + :child_of => :child_of, + :follows_from => :follows_from + } + @doc """ + Parent-child Reference type + + ### Notes + + The causal relationship between a child Span and a parent Span. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OpentracingAttributes.opentracing_ref_type() + :"opentracing.ref_type" + + iex> OpenTelemetry.SemConv.Incubating.OpentracingAttributes.opentracing_ref_type_values().child_of + :child_of + + iex> %{OpenTelemetry.SemConv.Incubating.OpentracingAttributes.opentracing_ref_type() => OpenTelemetry.SemConv.Incubating.OpentracingAttributes.opentracing_ref_type_values().child_of} + %{:"opentracing.ref_type" => :child_of} + + ### Erlang + + ```erlang + ?OPENTRACING_REF_TYPE. + 'opentracing.ref_type' + + ?OPENTRACING_REF_TYPE_VALUES_CHILD_OF. + 'child_of' + + \#{?OPENTRACING_REF_TYPE => ?OPENTRACING_REF_TYPE_VALUES_CHILD_OF}. + \#{'opentracing.ref_type' => 'child_of'} + ``` + + + """ + @spec opentracing_ref_type :: :"opentracing.ref_type" + def opentracing_ref_type do + :"opentracing.ref_type" + end + + @spec opentracing_ref_type_values() :: opentracing_ref_type_values() + def opentracing_ref_type_values() do + %{ + :child_of => :child_of, + :follows_from => :follows_from + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/os_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/os_attributes.ex new file mode 100644 index 00000000..26c35d09 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/os_attributes.ex @@ -0,0 +1,221 @@ +defmodule OpenTelemetry.SemConv.Incubating.OSAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for OS attributes. + """ + + @doc """ + Unique identifier for a particular build or compilation of the operating system. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["TQ3C.230805.001.B2", "20E247", "22621"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OSAttributes.os_build_id() + :"os.build_id" + + ### Erlang + + ```erlang + ?OS_BUILD_ID. + 'os.build_id' + ``` + + + """ + @spec os_build_id :: :"os.build_id" + def os_build_id do + :"os.build_id" + end + + @doc """ + Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Microsoft Windows [Version 10.0.18363.778]", "Ubuntu 18.04.1 LTS"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OSAttributes.os_description() + :"os.description" + + ### Erlang + + ```erlang + ?OS_DESCRIPTION. + 'os.description' + ``` + + + """ + @spec os_description :: :"os.description" + def os_description do + :"os.description" + end + + @doc """ + Human readable operating system name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["iOS", "Android", "Ubuntu"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OSAttributes.os_name() + :"os.name" + + ### Erlang + + ```erlang + ?OS_NAME. + 'os.name' + ``` + + + """ + @spec os_name :: :"os.name" + def os_name do + :"os.name" + end + + @typedoc """ + The operating system type. + + + ### Enum Values + * `:windows` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Microsoft Windows + * `:linux` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Linux + * `:darwin` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apple Darwin + * `:freebsd` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - FreeBSD + * `:netbsd` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - NetBSD + * `:openbsd` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OpenBSD + * `:dragonflybsd` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - DragonFly BSD + * `:hpux` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HP-UX (Hewlett Packard Unix) + * `:aix` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AIX (Advanced Interactive eXecutive) + * `:solaris` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - SunOS, Oracle Solaris + * `:z_os` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IBM z/OS + """ + @type os_type_values() :: %{ + :windows => :windows, + :linux => :linux, + :darwin => :darwin, + :freebsd => :freebsd, + :netbsd => :netbsd, + :openbsd => :openbsd, + :dragonflybsd => :dragonflybsd, + :hpux => :hpux, + :aix => :aix, + :solaris => :solaris, + :z_os => :z_os + } + @doc """ + The operating system type. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OSAttributes.os_type() + :"os.type" + + iex> OpenTelemetry.SemConv.Incubating.OSAttributes.os_type_values().windows + :windows + + iex> %{OpenTelemetry.SemConv.Incubating.OSAttributes.os_type() => OpenTelemetry.SemConv.Incubating.OSAttributes.os_type_values().windows} + %{:"os.type" => :windows} + + ### Erlang + + ```erlang + ?OS_TYPE. + 'os.type' + + ?OS_TYPE_VALUES_WINDOWS. + 'windows' + + \#{?OS_TYPE => ?OS_TYPE_VALUES_WINDOWS}. + \#{'os.type' => 'windows'} + ``` + + + """ + @spec os_type :: :"os.type" + def os_type do + :"os.type" + end + + @spec os_type_values() :: os_type_values() + def os_type_values() do + %{ + :windows => :windows, + :linux => :linux, + :darwin => :darwin, + :freebsd => :freebsd, + :netbsd => :netbsd, + :openbsd => :openbsd, + :dragonflybsd => :dragonflybsd, + :hpux => :hpux, + :aix => :aix, + :solaris => :solaris, + :z_os => :z_os + } + end + + @doc """ + The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["14.2.1", "18.04.1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OSAttributes.os_version() + :"os.version" + + ### Erlang + + ```erlang + ?OS_VERSION. + 'os.version' + ``` + + + """ + @spec os_version :: :"os.version" + def os_version do + :"os.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/otel_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/otel_attributes.ex new file mode 100644 index 00000000..d0fc65f4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/otel_attributes.ex @@ -0,0 +1,22 @@ +defmodule OpenTelemetry.SemConv.Incubating.OtelAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Otel attributes. + """ + + @deprecated """ + use the `otel.scope.name` attribute. + """ + @spec otel_library_name :: :"otel.library.name" + def otel_library_name do + :"otel.library.name" + end + + @deprecated """ + use the `otel.scope.version` attribute. + """ + @spec otel_library_version :: :"otel.library.version" + def otel_library_version do + :"otel.library.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/peer_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/peer_attributes.ex new file mode 100644 index 00000000..1ea717e0 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/peer_attributes.ex @@ -0,0 +1,39 @@ +defmodule OpenTelemetry.SemConv.Incubating.PeerAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Peer attributes. + """ + + @doc """ + The [`service.name`](/docs/resource/README.md#service) of the remote service. **SHOULD** be equal to the actual `service.name` resource attribute of the remote service if any. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + AuthTokenCache + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PeerAttributes.peer_service() + :"peer.service" + + ### Erlang + + ```erlang + ?PEER_SERVICE. + 'peer.service' + ``` + + + """ + @spec peer_service :: :"peer.service" + def peer_service do + :"peer.service" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/process_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/process_attributes.ex new file mode 100644 index 00000000..a05d0e91 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/process_attributes.ex @@ -0,0 +1,941 @@ +defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Process attributes. + """ + + @doc """ + The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["cmd/otelcol"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_command() + :"process.command" + + ### Erlang + + ```erlang + ?PROCESS_COMMAND. + 'process.command' + ``` + + + """ + @spec process_command :: :"process.command" + def process_command do + :"process.command" + end + + @doc """ + All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["cmd/otecol", "--config=config.yaml"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_command_args() + :"process.command_args" + + ### Erlang + + ```erlang + ?PROCESS_COMMAND_ARGS. + 'process.command_args' + ``` + + + """ + @spec process_command_args :: :"process.command_args" + def process_command_args do + :"process.command_args" + end + + @doc """ + The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["C:\\cmd\\otecol --config=\"my directory\\config.yaml\""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_command_line() + :"process.command_line" + + ### Erlang + + ```erlang + ?PROCESS_COMMAND_LINE. + 'process.command_line' + ``` + + + """ + @spec process_command_line :: :"process.command_line" + def process_command_line do + :"process.command_line" + end + + @typedoc """ + Specifies whether the context switches for this data point were voluntary or involuntary. + + ### Enum Values + * `:voluntary` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:involuntary` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type process_context_switch_type_values() :: %{ + :voluntary => :voluntary, + :involuntary => :involuntary + } + @doc """ + Specifies whether the context switches for this data point were voluntary or involuntary. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_context_switch_type() + :"process.context_switch_type" + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_context_switch_type_values().voluntary + :voluntary + + iex> %{OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_context_switch_type() => OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_context_switch_type_values().voluntary} + %{:"process.context_switch_type" => :voluntary} + + ### Erlang + + ```erlang + ?PROCESS_CONTEXT_SWITCH_TYPE. + 'process.context_switch_type' + + ?PROCESS_CONTEXT_SWITCH_TYPE_VALUES_VOLUNTARY. + 'voluntary' + + \#{?PROCESS_CONTEXT_SWITCH_TYPE => ?PROCESS_CONTEXT_SWITCH_TYPE_VALUES_VOLUNTARY}. + \#{'process.context_switch_type' => 'voluntary'} + ``` + + + """ + @spec process_context_switch_type :: :"process.context_switch_type" + def process_context_switch_type do + :"process.context_switch_type" + end + + @spec process_context_switch_type_values() :: process_context_switch_type_values() + def process_context_switch_type_values() do + %{ + :voluntary => :voluntary, + :involuntary => :involuntary + } + end + + @typedoc """ + Deprecated, use `cpu.mode` instead. + + ### Enum Values + * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type process_cpu_state_values() :: %{ + :system => :system, + :user => :user, + :wait => :wait + } + @deprecated """ + Replaced by `cpu.mode` + """ + @spec process_cpu_state :: :"process.cpu.state" + def process_cpu_state do + :"process.cpu.state" + end + + @spec process_cpu_state_values() :: process_cpu_state_values() + def process_cpu_state_values() do + %{ + :system => :system, + :user => :user, + :wait => :wait + } + end + + @doc """ + The date and time the process was created, in ISO 8601 format. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2023-11-21T09:25:34.853Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_creation_time() + :"process.creation.time" + + ### Erlang + + ```erlang + ?PROCESS_CREATION_TIME. + 'process.creation.time' + ``` + + + """ + @spec process_creation_time :: :"process.creation.time" + def process_creation_time do + :"process.creation.time" + end + + @doc """ + The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["otelcol"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_executable_name() + :"process.executable.name" + + ### Erlang + + ```erlang + ?PROCESS_EXECUTABLE_NAME. + 'process.executable.name' + ``` + + + """ + @spec process_executable_name :: :"process.executable.name" + def process_executable_name do + :"process.executable.name" + end + + @doc """ + The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/usr/bin/cmd/otelcol"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_executable_path() + :"process.executable.path" + + ### Erlang + + ```erlang + ?PROCESS_EXECUTABLE_PATH. + 'process.executable.path' + ``` + + + """ + @spec process_executable_path :: :"process.executable.path" + def process_executable_path do + :"process.executable.path" + end + + @doc """ + The exit code of the process. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [127] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_exit_code() + :"process.exit.code" + + ### Erlang + + ```erlang + ?PROCESS_EXIT_CODE. + 'process.exit.code' + ``` + + + """ + @spec process_exit_code :: :"process.exit.code" + def process_exit_code do + :"process.exit.code" + end + + @doc """ + The date and time the process exited, in ISO 8601 format. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2023-11-21T09:26:12.315Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_exit_time() + :"process.exit.time" + + ### Erlang + + ```erlang + ?PROCESS_EXIT_TIME. + 'process.exit.time' + ``` + + + """ + @spec process_exit_time :: :"process.exit.time" + def process_exit_time do + :"process.exit.time" + end + + @doc """ + The PID of the process's group leader. This is also the process group ID (PGID) of the process. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [23] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_group_leader_pid() + :"process.group_leader.pid" + + ### Erlang + + ```erlang + ?PROCESS_GROUP_LEADER_PID. + 'process.group_leader.pid' + ``` + + + """ + @spec process_group_leader_pid :: :"process.group_leader.pid" + def process_group_leader_pid do + :"process.group_leader.pid" + end + + @doc """ + Whether the process is connected to an interactive shell. + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_interactive() + :"process.interactive" + + ### Erlang + + ```erlang + ?PROCESS_INTERACTIVE. + 'process.interactive' + ``` + + + """ + @spec process_interactive :: :"process.interactive" + def process_interactive do + :"process.interactive" + end + + @doc """ + The username of the user that owns the process. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["root"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_owner() + :"process.owner" + + ### Erlang + + ```erlang + ?PROCESS_OWNER. + 'process.owner' + ``` + + + """ + @spec process_owner :: :"process.owner" + def process_owner do + :"process.owner" + end + + @typedoc """ + The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. + + + ### Enum Values + * `:major` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:minor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type process_paging_fault_type_values() :: %{ + :major => :major, + :minor => :minor + } + @doc """ + The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_paging_fault_type() + :"process.paging.fault_type" + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_paging_fault_type_values().major + :major + + iex> %{OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_paging_fault_type() => OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_paging_fault_type_values().major} + %{:"process.paging.fault_type" => :major} + + ### Erlang + + ```erlang + ?PROCESS_PAGING_FAULT_TYPE. + 'process.paging.fault_type' + + ?PROCESS_PAGING_FAULT_TYPE_VALUES_MAJOR. + 'major' + + \#{?PROCESS_PAGING_FAULT_TYPE => ?PROCESS_PAGING_FAULT_TYPE_VALUES_MAJOR}. + \#{'process.paging.fault_type' => 'major'} + ``` + + + """ + @spec process_paging_fault_type :: :"process.paging.fault_type" + def process_paging_fault_type do + :"process.paging.fault_type" + end + + @spec process_paging_fault_type_values() :: process_paging_fault_type_values() + def process_paging_fault_type_values() do + %{ + :major => :major, + :minor => :minor + } + end + + @doc """ + Parent Process identifier (PPID). + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [111] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_parent_pid() + :"process.parent_pid" + + ### Erlang + + ```erlang + ?PROCESS_PARENT_PID. + 'process.parent_pid' + ``` + + + """ + @spec process_parent_pid :: :"process.parent_pid" + def process_parent_pid do + :"process.parent_pid" + end + + @doc """ + Process identifier (PID). + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [1234] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_pid() + :"process.pid" + + ### Erlang + + ```erlang + ?PROCESS_PID. + 'process.pid' + ``` + + + """ + @spec process_pid :: :"process.pid" + def process_pid do + :"process.pid" + end + + @doc """ + The real user ID (RUID) of the process. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [1000] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_real_user_id() + :"process.real_user.id" + + ### Erlang + + ```erlang + ?PROCESS_REAL_USER_ID. + 'process.real_user.id' + ``` + + + """ + @spec process_real_user_id :: :"process.real_user.id" + def process_real_user_id do + :"process.real_user.id" + end + + @doc """ + The username of the real user of the process. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["operator"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_real_user_name() + :"process.real_user.name" + + ### Erlang + + ```erlang + ?PROCESS_REAL_USER_NAME. + 'process.real_user.name' + ``` + + + """ + @spec process_real_user_name :: :"process.real_user.name" + def process_real_user_name do + :"process.real_user.name" + end + + @doc """ + An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_runtime_description() + :"process.runtime.description" + + ### Erlang + + ```erlang + ?PROCESS_RUNTIME_DESCRIPTION. + 'process.runtime.description' + ``` + + + """ + @spec process_runtime_description :: :"process.runtime.description" + def process_runtime_description do + :"process.runtime.description" + end + + @doc """ + The name of the runtime of this process. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["OpenJDK Runtime Environment"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_runtime_name() + :"process.runtime.name" + + ### Erlang + + ```erlang + ?PROCESS_RUNTIME_NAME. + 'process.runtime.name' + ``` + + + """ + @spec process_runtime_name :: :"process.runtime.name" + def process_runtime_name do + :"process.runtime.name" + end + + @doc """ + The version of the runtime of this process, as returned by the runtime without modification. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 14.0.2 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_runtime_version() + :"process.runtime.version" + + ### Erlang + + ```erlang + ?PROCESS_RUNTIME_VERSION. + 'process.runtime.version' + ``` + + + """ + @spec process_runtime_version :: :"process.runtime.version" + def process_runtime_version do + :"process.runtime.version" + end + + @doc """ + The saved user ID (SUID) of the process. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [1002] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_saved_user_id() + :"process.saved_user.id" + + ### Erlang + + ```erlang + ?PROCESS_SAVED_USER_ID. + 'process.saved_user.id' + ``` + + + """ + @spec process_saved_user_id :: :"process.saved_user.id" + def process_saved_user_id do + :"process.saved_user.id" + end + + @doc """ + The username of the saved user. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["operator"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_saved_user_name() + :"process.saved_user.name" + + ### Erlang + + ```erlang + ?PROCESS_SAVED_USER_NAME. + 'process.saved_user.name' + ``` + + + """ + @spec process_saved_user_name :: :"process.saved_user.name" + def process_saved_user_name do + :"process.saved_user.name" + end + + @doc """ + The PID of the process's session leader. This is also the session ID (SID) of the process. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [14] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_session_leader_pid() + :"process.session_leader.pid" + + ### Erlang + + ```erlang + ?PROCESS_SESSION_LEADER_PID. + 'process.session_leader.pid' + ``` + + + """ + @spec process_session_leader_pid :: :"process.session_leader.pid" + def process_session_leader_pid do + :"process.session_leader.pid" + end + + @doc """ + The effective user ID (EUID) of the process. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [1001] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_user_id() + :"process.user.id" + + ### Erlang + + ```erlang + ?PROCESS_USER_ID. + 'process.user.id' + ``` + + + """ + @spec process_user_id :: :"process.user.id" + def process_user_id do + :"process.user.id" + end + + @doc """ + The username of the effective user of the process. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["root"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_user_name() + :"process.user.name" + + ### Erlang + + ```erlang + ?PROCESS_USER_NAME. + 'process.user.name' + ``` + + + """ + @spec process_user_name :: :"process.user.name" + def process_user_name do + :"process.user.name" + end + + @doc """ + Virtual process identifier. + + ### Value type + + Value must be of type `integer()`. + ### Notes + + The process ID within a PID namespace. This is not necessarily unique across all processes on the host but it is unique within the process namespace that the process exists within. + + ### Examples + + ``` + [12] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_vpid() + :"process.vpid" + + ### Erlang + + ```erlang + ?PROCESS_VPID. + 'process.vpid' + ``` + + + """ + @spec process_vpid :: :"process.vpid" + def process_vpid do + :"process.vpid" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex new file mode 100644 index 00000000..21ff59ae --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex @@ -0,0 +1,810 @@ +defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for RPC attributes. + """ + + @deprecated """ + Replaced by `rpc.message.compressed_size`. + """ + @spec message_compressed_size :: :"message.compressed_size" + def message_compressed_size do + :"message.compressed_size" + end + + @deprecated """ + Replaced by `rpc.message.id`. + """ + @spec message_id :: :"message.id" + def message_id do + :"message.id" + end + + @typedoc """ + Deprecated, use `rpc.message.type` instead. + + ### Enum Values + * `:sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:received` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type message_type_values() :: %{ + :sent => :SENT, + :received => :RECEIVED + } + @deprecated """ + Replaced by `rpc.message.type`. + """ + @spec message_type :: :"message.type" + def message_type do + :"message.type" + end + + @spec message_type_values() :: message_type_values() + def message_type_values() do + %{ + :sent => :SENT, + :received => :RECEIVED + } + end + + @deprecated """ + Replaced by `rpc.message.uncompressed_size`. + """ + @spec message_uncompressed_size :: :"message.uncompressed_size" + def message_uncompressed_size do + :"message.uncompressed_size" + end + + @typedoc """ + The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. + + ### Enum Values + * `:cancelled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:invalid_argument` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:deadline_exceeded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:not_found` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:already_exists` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:permission_denied` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:resource_exhausted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:failed_precondition` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:aborted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:out_of_range` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:unimplemented` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:internal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:unavailable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:data_loss` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:unauthenticated` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type rpc_connect_rpc_error_code_values() :: %{ + :cancelled => :cancelled, + :unknown => :unknown, + :invalid_argument => :invalid_argument, + :deadline_exceeded => :deadline_exceeded, + :not_found => :not_found, + :already_exists => :already_exists, + :permission_denied => :permission_denied, + :resource_exhausted => :resource_exhausted, + :failed_precondition => :failed_precondition, + :aborted => :aborted, + :out_of_range => :out_of_range, + :unimplemented => :unimplemented, + :internal => :internal, + :unavailable => :unavailable, + :data_loss => :data_loss, + :unauthenticated => :unauthenticated + } + @doc """ + The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code() + :"rpc.connect_rpc.error_code" + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code_values().cancelled + :cancelled + + iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code_values().cancelled} + %{:"rpc.connect_rpc.error_code" => :cancelled} + + ### Erlang + + ```erlang + ?RPC_CONNECT_RPC_ERROR_CODE. + 'rpc.connect_rpc.error_code' + + ?RPC_CONNECT_RPC_ERROR_CODE_VALUES_CANCELLED. + 'cancelled' + + \#{?RPC_CONNECT_RPC_ERROR_CODE => ?RPC_CONNECT_RPC_ERROR_CODE_VALUES_CANCELLED}. + \#{'rpc.connect_rpc.error_code' => 'cancelled'} + ``` + + + """ + @spec rpc_connect_rpc_error_code :: :"rpc.connect_rpc.error_code" + def rpc_connect_rpc_error_code do + :"rpc.connect_rpc.error_code" + end + + @spec rpc_connect_rpc_error_code_values() :: rpc_connect_rpc_error_code_values() + def rpc_connect_rpc_error_code_values() do + %{ + :cancelled => :cancelled, + :unknown => :unknown, + :invalid_argument => :invalid_argument, + :deadline_exceeded => :deadline_exceeded, + :not_found => :not_found, + :already_exists => :already_exists, + :permission_denied => :permission_denied, + :resource_exhausted => :resource_exhausted, + :failed_precondition => :failed_precondition, + :aborted => :aborted, + :out_of_range => :out_of_range, + :unimplemented => :unimplemented, + :internal => :internal, + :unavailable => :unavailable, + :data_loss => :data_loss, + :unauthenticated => :unauthenticated + } + end + + @doc """ + Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + + ### Examples + + ``` + ["rpc.request.metadata.my-custom-metadata-attribute=[\"1.2.3.4\", \"1.2.3.5\"]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_request_metadata() + :"rpc.connect_rpc.request.metadata" + + ### Erlang + + ```erlang + ?RPC_CONNECT_RPC_REQUEST_METADATA. + 'rpc.connect_rpc.request.metadata' + ``` + + + """ + @spec rpc_connect_rpc_request_metadata :: :"rpc.connect_rpc.request.metadata" + def rpc_connect_rpc_request_metadata do + :"rpc.connect_rpc.request.metadata" + end + + @doc """ + Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + + ### Examples + + ``` + ["rpc.response.metadata.my-custom-metadata-attribute=[\"attribute_value\"]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_response_metadata() + :"rpc.connect_rpc.response.metadata" + + ### Erlang + + ```erlang + ?RPC_CONNECT_RPC_RESPONSE_METADATA. + 'rpc.connect_rpc.response.metadata' + ``` + + + """ + @spec rpc_connect_rpc_response_metadata :: :"rpc.connect_rpc.response.metadata" + def rpc_connect_rpc_response_metadata do + :"rpc.connect_rpc.response.metadata" + end + + @doc """ + gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + + ### Examples + + ``` + ["rpc.grpc.request.metadata.my-custom-metadata-attribute=[\"1.2.3.4\", \"1.2.3.5\"]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_request_metadata() + :"rpc.grpc.request.metadata" + + ### Erlang + + ```erlang + ?RPC_GRPC_REQUEST_METADATA. + 'rpc.grpc.request.metadata' + ``` + + + """ + @spec rpc_grpc_request_metadata :: :"rpc.grpc.request.metadata" + def rpc_grpc_request_metadata do + :"rpc.grpc.request.metadata" + end + + @doc """ + gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + + ### Examples + + ``` + ["rpc.grpc.response.metadata.my-custom-metadata-attribute=[\"attribute_value\"]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_response_metadata() + :"rpc.grpc.response.metadata" + + ### Erlang + + ```erlang + ?RPC_GRPC_RESPONSE_METADATA. + 'rpc.grpc.response.metadata' + ``` + + + """ + @spec rpc_grpc_response_metadata :: :"rpc.grpc.response.metadata" + def rpc_grpc_response_metadata do + :"rpc.grpc.response.metadata" + end + + @typedoc """ + The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + + ### Enum Values + * `:ok` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OK + * `:cancelled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - CANCELLED + * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - UNKNOWN + * `:invalid_argument` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - INVALID_ARGUMENT + * `:deadline_exceeded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - DEADLINE_EXCEEDED + * `:not_found` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - NOT_FOUND + * `:already_exists` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - ALREADY_EXISTS + * `:permission_denied` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - PERMISSION_DENIED + * `:resource_exhausted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - RESOURCE_EXHAUSTED + * `:failed_precondition` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - FAILED_PRECONDITION + * `:aborted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - ABORTED + * `:out_of_range` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OUT_OF_RANGE + * `:unimplemented` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - UNIMPLEMENTED + * `:internal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - INTERNAL + * `:unavailable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - UNAVAILABLE + * `:data_loss` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - DATA_LOSS + * `:unauthenticated` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - UNAUTHENTICATED + """ + @type rpc_grpc_status_code_values() :: %{ + :ok => 0, + :cancelled => 1, + :unknown => 2, + :invalid_argument => 3, + :deadline_exceeded => 4, + :not_found => 5, + :already_exists => 6, + :permission_denied => 7, + :resource_exhausted => 8, + :failed_precondition => 9, + :aborted => 10, + :out_of_range => 11, + :unimplemented => 12, + :internal => 13, + :unavailable => 14, + :data_loss => 15, + :unauthenticated => 16 + } + @doc """ + The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code() + :"rpc.grpc.status_code" + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code_values().ok + 0 + + iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code_values().ok} + %{:"rpc.grpc.status_code" => 0} + + ### Erlang + + ```erlang + ?RPC_GRPC_STATUS_CODE. + 'rpc.grpc.status_code' + + ?RPC_GRPC_STATUS_CODE_VALUES_OK. + '0' + + \#{?RPC_GRPC_STATUS_CODE => ?RPC_GRPC_STATUS_CODE_VALUES_OK}. + \#{'rpc.grpc.status_code' => '0'} + ``` + + + """ + @spec rpc_grpc_status_code :: :"rpc.grpc.status_code" + def rpc_grpc_status_code do + :"rpc.grpc.status_code" + end + + @spec rpc_grpc_status_code_values() :: rpc_grpc_status_code_values() + def rpc_grpc_status_code_values() do + %{ + :ok => 0, + :cancelled => 1, + :unknown => 2, + :invalid_argument => 3, + :deadline_exceeded => 4, + :not_found => 5, + :already_exists => 6, + :permission_denied => 7, + :resource_exhausted => 8, + :failed_precondition => 9, + :aborted => 10, + :out_of_range => 11, + :unimplemented => 12, + :internal => 13, + :unavailable => 14, + :data_loss => 15, + :unauthenticated => 16 + } + end + + @doc """ + `error.code` property of response if it is an error response. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [-32700, 100] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_error_code() + :"rpc.jsonrpc.error_code" + + ### Erlang + + ```erlang + ?RPC_JSONRPC_ERROR_CODE. + 'rpc.jsonrpc.error_code' + ``` + + + """ + @spec rpc_jsonrpc_error_code :: :"rpc.jsonrpc.error_code" + def rpc_jsonrpc_error_code do + :"rpc.jsonrpc.error_code" + end + + @doc """ + `error.message` property of response if it is an error response. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Parse error", "User already exists"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_error_message() + :"rpc.jsonrpc.error_message" + + ### Erlang + + ```erlang + ?RPC_JSONRPC_ERROR_MESSAGE. + 'rpc.jsonrpc.error_message' + ``` + + + """ + @spec rpc_jsonrpc_error_message :: :"rpc.jsonrpc.error_message" + def rpc_jsonrpc_error_message do + :"rpc.jsonrpc.error_message" + end + + @doc """ + `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["10", "request-7", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_request_id() + :"rpc.jsonrpc.request_id" + + ### Erlang + + ```erlang + ?RPC_JSONRPC_REQUEST_ID. + 'rpc.jsonrpc.request_id' + ``` + + + """ + @spec rpc_jsonrpc_request_id :: :"rpc.jsonrpc.request_id" + def rpc_jsonrpc_request_id do + :"rpc.jsonrpc.request_id" + end + + @doc """ + Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2.0", "1.0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_version() + :"rpc.jsonrpc.version" + + ### Erlang + + ```erlang + ?RPC_JSONRPC_VERSION. + 'rpc.jsonrpc.version' + ``` + + + """ + @spec rpc_jsonrpc_version :: :"rpc.jsonrpc.version" + def rpc_jsonrpc_version do + :"rpc.jsonrpc.version" + end + + @doc """ + Compressed size of the message in bytes. + ### Value type + + Value must be of type `integer()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_compressed_size() + :"rpc.message.compressed_size" + + ### Erlang + + ```erlang + ?RPC_MESSAGE_COMPRESSED_SIZE. + 'rpc.message.compressed_size' + ``` + + + """ + @spec rpc_message_compressed_size :: :"rpc.message.compressed_size" + def rpc_message_compressed_size do + :"rpc.message.compressed_size" + end + + @doc """ + MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. + ### Value type + + Value must be of type `integer()`. + ### Notes + + This way we guarantee that the values will be consistent between different implementations. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_id() + :"rpc.message.id" + + ### Erlang + + ```erlang + ?RPC_MESSAGE_ID. + 'rpc.message.id' + ``` + + + """ + @spec rpc_message_id :: :"rpc.message.id" + def rpc_message_id do + :"rpc.message.id" + end + + @typedoc """ + Whether this is a received or sent message. + + ### Enum Values + * `:sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:received` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type rpc_message_type_values() :: %{ + :sent => :SENT, + :received => :RECEIVED + } + @doc """ + Whether this is a received or sent message. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type() + :"rpc.message.type" + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type_values().sent + :SENT + + iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type_values().sent} + %{:"rpc.message.type" => :SENT} + + ### Erlang + + ```erlang + ?RPC_MESSAGE_TYPE. + 'rpc.message.type' + + ?RPC_MESSAGE_TYPE_VALUES_SENT. + 'SENT' + + \#{?RPC_MESSAGE_TYPE => ?RPC_MESSAGE_TYPE_VALUES_SENT}. + \#{'rpc.message.type' => 'SENT'} + ``` + + + """ + @spec rpc_message_type :: :"rpc.message.type" + def rpc_message_type do + :"rpc.message.type" + end + + @spec rpc_message_type_values() :: rpc_message_type_values() + def rpc_message_type_values() do + %{ + :sent => :SENT, + :received => :RECEIVED + } + end + + @doc """ + Uncompressed size of the message in bytes. + ### Value type + + Value must be of type `integer()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_uncompressed_size() + :"rpc.message.uncompressed_size" + + ### Erlang + + ```erlang + ?RPC_MESSAGE_UNCOMPRESSED_SIZE. + 'rpc.message.uncompressed_size' + ``` + + + """ + @spec rpc_message_uncompressed_size :: :"rpc.message.uncompressed_size" + def rpc_message_uncompressed_size do + :"rpc.message.uncompressed_size" + end + + @doc """ + The name of the (logical) method being called, must be equal to the $method part in the span name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). + + ### Examples + + ``` + exampleMethod + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_method() + :"rpc.method" + + ### Erlang + + ```erlang + ?RPC_METHOD. + 'rpc.method' + ``` + + + """ + @spec rpc_method :: :"rpc.method" + def rpc_method do + :"rpc.method" + end + + @doc """ + The full (logical) name of the service being called, including its package name, if applicable. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). + + ### Examples + + ``` + myservice.EchoService + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_service() + :"rpc.service" + + ### Erlang + + ```erlang + ?RPC_SERVICE. + 'rpc.service' + ``` + + + """ + @spec rpc_service :: :"rpc.service" + def rpc_service do + :"rpc.service" + end + + @typedoc """ + A string identifying the remoting system. See below for a list of well-known identifiers. + + ### Enum Values + * `:grpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - gRPC + * `:java_rmi` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Java RMI + * `:dotnet_wcf` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - .NET WCF + * `:apache_dubbo` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Dubbo + * `:connect_rpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Connect RPC + """ + @type rpc_system_values() :: %{ + :grpc => :grpc, + :java_rmi => :java_rmi, + :dotnet_wcf => :dotnet_wcf, + :apache_dubbo => :apache_dubbo, + :connect_rpc => :connect_rpc + } + @doc """ + A string identifying the remoting system. See below for a list of well-known identifiers. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system() + :"rpc.system" + + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_values().grpc + :grpc + + iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_values().grpc} + %{:"rpc.system" => :grpc} + + ### Erlang + + ```erlang + ?RPC_SYSTEM. + 'rpc.system' + + ?RPC_SYSTEM_VALUES_GRPC. + 'grpc' + + \#{?RPC_SYSTEM => ?RPC_SYSTEM_VALUES_GRPC}. + \#{'rpc.system' => 'grpc'} + ``` + + + """ + @spec rpc_system :: :"rpc.system" + def rpc_system do + :"rpc.system" + end + + @spec rpc_system_values() :: rpc_system_values() + def rpc_system_values() do + %{ + :grpc => :grpc, + :java_rmi => :java_rmi, + :dotnet_wcf => :dotnet_wcf, + :apache_dubbo => :apache_dubbo, + :connect_rpc => :connect_rpc + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex new file mode 100644 index 00000000..9654e319 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex @@ -0,0 +1,108 @@ +defmodule OpenTelemetry.SemConv.Incubating.ServiceAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Service attributes. + """ + defdelegate service_name(), to: OpenTelemetry.SemConv.ServiceAttributes + + defdelegate service_version(), to: OpenTelemetry.SemConv.ServiceAttributes + + @doc """ + The string ID of the service instance. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words + `service.namespace,service.name,service.instance.id` triplet **MUST** be globally unique). The ID helps to + distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled + service). + + Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC + 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of + this value if stability is desirable. In that case, the ID **SHOULD** be used as source of a UUID Version 5 and + **SHOULD** use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. + + UUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is + needed. Similar to what can be seen in the man page for the + [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html) file, the underlying + data, such as pod name and namespace should be treated as confidential, being the user's choice to expose it + or not via another resource attribute. + + For applications running behind an application server (like unicorn), we do not recommend using one identifier + for all processes participating in the application. Instead, it's recommended each division (e.g. a worker + thread in unicorn) to have its own instance.id. + + It's not recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the + service instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will + likely be wrong, as the Collector might not know from which container within that pod the telemetry originated. + However, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance + for that telemetry. This is typically the case for scraping receivers, as they know the target address and + port. + + ### Examples + + ``` + ["627cc493-f310-47de-96bd-71410b7dec09"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_instance_id() + :"service.instance.id" + + ### Erlang + + ```erlang + ?SERVICE_INSTANCE_ID. + 'service.instance.id' + ``` + + + """ + @spec service_instance_id :: :"service.instance.id" + def service_instance_id do + :"service.instance.id" + end + + @doc """ + A namespace for `service.name`. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. + + ### Examples + + ``` + ["Shop"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_namespace() + :"service.namespace" + + ### Erlang + + ```erlang + ?SERVICE_NAMESPACE. + 'service.namespace' + ``` + + + """ + @spec service_namespace :: :"service.namespace" + def service_namespace do + :"service.namespace" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/session_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/session_attributes.ex new file mode 100644 index 00000000..4611443f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/session_attributes.ex @@ -0,0 +1,70 @@ +defmodule OpenTelemetry.SemConv.Incubating.SessionAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Session attributes. + """ + + @doc """ + A unique id to identify a session. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 00112233-4455-6677-8899-aabbccddeeff + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SessionAttributes.session_id() + :"session.id" + + ### Erlang + + ```erlang + ?SESSION_ID. + 'session.id' + ``` + + + """ + @spec session_id :: :"session.id" + def session_id do + :"session.id" + end + + @doc """ + The previous `session.id` for this user, when known. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 00112233-4455-6677-8899-aabbccddeeff + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SessionAttributes.session_previous_id() + :"session.previous_id" + + ### Erlang + + ```erlang + ?SESSION_PREVIOUS_ID. + 'session.previous_id' + ``` + + + """ + @spec session_previous_id :: :"session.previous_id" + def session_previous_id do + :"session.previous_id" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/source_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/source_attributes.ex new file mode 100644 index 00000000..a8cb54b3 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/source_attributes.ex @@ -0,0 +1,74 @@ +defmodule OpenTelemetry.SemConv.Incubating.SourceAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Source attributes. + """ + + @doc """ + Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + When observed from the destination side, and when communicating through an intermediary, `source.address` **SHOULD** represent the source address behind any intermediaries, for example proxies, if it's available. + + ### Examples + + ``` + ["source.example.com", "10.1.2.80", "/tmp/my.sock"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SourceAttributes.source_address() + :"source.address" + + ### Erlang + + ```erlang + ?SOURCE_ADDRESS. + 'source.address' + ``` + + + """ + @spec source_address :: :"source.address" + def source_address do + :"source.address" + end + + @doc """ + Source port number + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [3389, 2888] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SourceAttributes.source_port() + :"source.port" + + ### Erlang + + ```erlang + ?SOURCE_PORT. + 'source.port' + ``` + + + """ + @spec source_port :: :"source.port" + def source_port do + :"source.port" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex new file mode 100644 index 00000000..07fcfbdb --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex @@ -0,0 +1,759 @@ +defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for System attributes. + """ + + @doc """ + The logical CPU number [0..n-1] + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [1] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_cpu_logical_number() + :"system.cpu.logical_number" + + ### Erlang + + ```erlang + ?SYSTEM_CPU_LOGICAL_NUMBER. + 'system.cpu.logical_number' + ``` + + + """ + @spec system_cpu_logical_number :: :"system.cpu.logical_number" + def system_cpu_logical_number do + :"system.cpu.logical_number" + end + + @typedoc """ + Deprecated, use `cpu.mode` instead. + + ### Enum Values + * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:nice` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:iowait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:interrupt` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:steal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_cpu_state_values() :: %{ + :user => :user, + :system => :system, + :nice => :nice, + :idle => :idle, + :iowait => :iowait, + :interrupt => :interrupt, + :steal => :steal + } + @deprecated """ + Replaced by `cpu.mode` + """ + @spec system_cpu_state :: :"system.cpu.state" + def system_cpu_state do + :"system.cpu.state" + end + + @spec system_cpu_state_values() :: system_cpu_state_values() + def system_cpu_state_values() do + %{ + :user => :user, + :system => :system, + :nice => :nice, + :idle => :idle, + :iowait => :iowait, + :interrupt => :interrupt, + :steal => :steal + } + end + + @doc """ + The device identifier + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["(identifier)"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_device() + :"system.device" + + ### Erlang + + ```erlang + ?SYSTEM_DEVICE. + 'system.device' + ``` + + + """ + @spec system_device :: :"system.device" + def system_device do + :"system.device" + end + + @doc """ + The filesystem mode + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["rw, ro"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_mode() + :"system.filesystem.mode" + + ### Erlang + + ```erlang + ?SYSTEM_FILESYSTEM_MODE. + 'system.filesystem.mode' + ``` + + + """ + @spec system_filesystem_mode :: :"system.filesystem.mode" + def system_filesystem_mode do + :"system.filesystem.mode" + end + + @doc """ + The filesystem mount path + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/mnt/data"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_mountpoint() + :"system.filesystem.mountpoint" + + ### Erlang + + ```erlang + ?SYSTEM_FILESYSTEM_MOUNTPOINT. + 'system.filesystem.mountpoint' + ``` + + + """ + @spec system_filesystem_mountpoint :: :"system.filesystem.mountpoint" + def system_filesystem_mountpoint do + :"system.filesystem.mountpoint" + end + + @typedoc """ + The filesystem state + + ### Enum Values + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:reserved` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_filesystem_state_values() :: %{ + :used => :used, + :free => :free, + :reserved => :reserved + } + @doc """ + The filesystem state + + ### Examples + + ``` + ["used"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_state() + :"system.filesystem.state" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_state_values().used + :used + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_state() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_state_values().used} + %{:"system.filesystem.state" => :used} + + ### Erlang + + ```erlang + ?SYSTEM_FILESYSTEM_STATE. + 'system.filesystem.state' + + ?SYSTEM_FILESYSTEM_STATE_VALUES_USED. + 'used' + + \#{?SYSTEM_FILESYSTEM_STATE => ?SYSTEM_FILESYSTEM_STATE_VALUES_USED}. + \#{'system.filesystem.state' => 'used'} + ``` + + + """ + @spec system_filesystem_state :: :"system.filesystem.state" + def system_filesystem_state do + :"system.filesystem.state" + end + + @spec system_filesystem_state_values() :: system_filesystem_state_values() + def system_filesystem_state_values() do + %{ + :used => :used, + :free => :free, + :reserved => :reserved + } + end + + @typedoc """ + The filesystem type + + ### Enum Values + * `:fat32` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:exfat` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:ntfs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:refs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:hfsplus` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:ext4` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_filesystem_type_values() :: %{ + :fat32 => :fat32, + :exfat => :exfat, + :ntfs => :ntfs, + :refs => :refs, + :hfsplus => :hfsplus, + :ext4 => :ext4 + } + @doc """ + The filesystem type + + ### Examples + + ``` + ["ext4"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_type() + :"system.filesystem.type" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_type_values().fat32 + :fat32 + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_type() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_filesystem_type_values().fat32} + %{:"system.filesystem.type" => :fat32} + + ### Erlang + + ```erlang + ?SYSTEM_FILESYSTEM_TYPE. + 'system.filesystem.type' + + ?SYSTEM_FILESYSTEM_TYPE_VALUES_FAT32. + 'fat32' + + \#{?SYSTEM_FILESYSTEM_TYPE => ?SYSTEM_FILESYSTEM_TYPE_VALUES_FAT32}. + \#{'system.filesystem.type' => 'fat32'} + ``` + + + """ + @spec system_filesystem_type :: :"system.filesystem.type" + def system_filesystem_type do + :"system.filesystem.type" + end + + @spec system_filesystem_type_values() :: system_filesystem_type_values() + def system_filesystem_type_values() do + %{ + :fat32 => :fat32, + :exfat => :exfat, + :ntfs => :ntfs, + :refs => :refs, + :hfsplus => :hfsplus, + :ext4 => :ext4 + } + end + + @typedoc """ + The memory state + + ### Enum Values + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:shared` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:buffers` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:cached` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_memory_state_values() :: %{ + :used => :used, + :free => :free, + :shared => :shared, + :buffers => :buffers, + :cached => :cached + } + @doc """ + The memory state + + ### Examples + + ``` + ["free", "cached"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_memory_state() + :"system.memory.state" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_memory_state_values().used + :used + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_memory_state() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_memory_state_values().used} + %{:"system.memory.state" => :used} + + ### Erlang + + ```erlang + ?SYSTEM_MEMORY_STATE. + 'system.memory.state' + + ?SYSTEM_MEMORY_STATE_VALUES_USED. + 'used' + + \#{?SYSTEM_MEMORY_STATE => ?SYSTEM_MEMORY_STATE_VALUES_USED}. + \#{'system.memory.state' => 'used'} + ``` + + + """ + @spec system_memory_state :: :"system.memory.state" + def system_memory_state do + :"system.memory.state" + end + + @spec system_memory_state_values() :: system_memory_state_values() + def system_memory_state_values() do + %{ + :used => :used, + :free => :free, + :shared => :shared, + :buffers => :buffers, + :cached => :cached + } + end + + @typedoc """ + A stateless protocol **MUST** **NOT** set this attribute + + ### Enum Values + * `:close` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:close_wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:closing` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:delete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:established` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:fin_wait_1` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:fin_wait_2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:last_ack` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:listen` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:syn_recv` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:syn_sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:time_wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_network_state_values() :: %{ + :close => :close, + :close_wait => :close_wait, + :closing => :closing, + :delete => :delete, + :established => :established, + :fin_wait_1 => :fin_wait_1, + :fin_wait_2 => :fin_wait_2, + :last_ack => :last_ack, + :listen => :listen, + :syn_recv => :syn_recv, + :syn_sent => :syn_sent, + :time_wait => :time_wait + } + @doc """ + A stateless protocol **MUST** **NOT** set this attribute + + ### Examples + + ``` + ["close_wait"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_network_state() + :"system.network.state" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_network_state_values().close + :close + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_network_state() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_network_state_values().close} + %{:"system.network.state" => :close} + + ### Erlang + + ```erlang + ?SYSTEM_NETWORK_STATE. + 'system.network.state' + + ?SYSTEM_NETWORK_STATE_VALUES_CLOSE. + 'close' + + \#{?SYSTEM_NETWORK_STATE => ?SYSTEM_NETWORK_STATE_VALUES_CLOSE}. + \#{'system.network.state' => 'close'} + ``` + + + """ + @spec system_network_state :: :"system.network.state" + def system_network_state do + :"system.network.state" + end + + @spec system_network_state_values() :: system_network_state_values() + def system_network_state_values() do + %{ + :close => :close, + :close_wait => :close_wait, + :closing => :closing, + :delete => :delete, + :established => :established, + :fin_wait_1 => :fin_wait_1, + :fin_wait_2 => :fin_wait_2, + :last_ack => :last_ack, + :listen => :listen, + :syn_recv => :syn_recv, + :syn_sent => :syn_sent, + :time_wait => :time_wait + } + end + + @typedoc """ + The paging access direction + + ### Enum Values + * `:in` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:out` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_paging_direction_values() :: %{ + :in => :in, + :out => :out + } + @doc """ + The paging access direction + + ### Examples + + ``` + ["in"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_direction() + :"system.paging.direction" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_direction_values().in + :in + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_direction() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_direction_values().in} + %{:"system.paging.direction" => :in} + + ### Erlang + + ```erlang + ?SYSTEM_PAGING_DIRECTION. + 'system.paging.direction' + + ?SYSTEM_PAGING_DIRECTION_VALUES_IN. + 'in' + + \#{?SYSTEM_PAGING_DIRECTION => ?SYSTEM_PAGING_DIRECTION_VALUES_IN}. + \#{'system.paging.direction' => 'in'} + ``` + + + """ + @spec system_paging_direction :: :"system.paging.direction" + def system_paging_direction do + :"system.paging.direction" + end + + @spec system_paging_direction_values() :: system_paging_direction_values() + def system_paging_direction_values() do + %{ + :in => :in, + :out => :out + } + end + + @typedoc """ + The memory paging state + + ### Enum Values + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_paging_state_values() :: %{ + :used => :used, + :free => :free + } + @doc """ + The memory paging state + + ### Examples + + ``` + ["free"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_state() + :"system.paging.state" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_state_values().used + :used + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_state() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_state_values().used} + %{:"system.paging.state" => :used} + + ### Erlang + + ```erlang + ?SYSTEM_PAGING_STATE. + 'system.paging.state' + + ?SYSTEM_PAGING_STATE_VALUES_USED. + 'used' + + \#{?SYSTEM_PAGING_STATE => ?SYSTEM_PAGING_STATE_VALUES_USED}. + \#{'system.paging.state' => 'used'} + ``` + + + """ + @spec system_paging_state :: :"system.paging.state" + def system_paging_state do + :"system.paging.state" + end + + @spec system_paging_state_values() :: system_paging_state_values() + def system_paging_state_values() do + %{ + :used => :used, + :free => :free + } + end + + @typedoc """ + The memory paging type + + ### Enum Values + * `:major` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:minor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_paging_type_values() :: %{ + :major => :major, + :minor => :minor + } + @doc """ + The memory paging type + + ### Examples + + ``` + ["minor"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_type() + :"system.paging.type" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_type_values().major + :major + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_type() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_type_values().major} + %{:"system.paging.type" => :major} + + ### Erlang + + ```erlang + ?SYSTEM_PAGING_TYPE. + 'system.paging.type' + + ?SYSTEM_PAGING_TYPE_VALUES_MAJOR. + 'major' + + \#{?SYSTEM_PAGING_TYPE => ?SYSTEM_PAGING_TYPE_VALUES_MAJOR}. + \#{'system.paging.type' => 'major'} + ``` + + + """ + @spec system_paging_type :: :"system.paging.type" + def system_paging_type do + :"system.paging.type" + end + + @spec system_paging_type_values() :: system_paging_type_values() + def system_paging_type_values() do + %{ + :major => :major, + :minor => :minor + } + end + + @typedoc """ + The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) + + + ### Enum Values + * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:sleeping` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:stopped` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:defunct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_process_status_values() :: %{ + :running => :running, + :sleeping => :sleeping, + :stopped => :stopped, + :defunct => :defunct + } + @doc """ + The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) + + + ### Examples + + ``` + ["running"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_process_status() + :"system.process.status" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_process_status_values().running + :running + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_process_status() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_process_status_values().running} + %{:"system.process.status" => :running} + + ### Erlang + + ```erlang + ?SYSTEM_PROCESS_STATUS. + 'system.process.status' + + ?SYSTEM_PROCESS_STATUS_VALUES_RUNNING. + 'running' + + \#{?SYSTEM_PROCESS_STATUS => ?SYSTEM_PROCESS_STATUS_VALUES_RUNNING}. + \#{'system.process.status' => 'running'} + ``` + + + """ + @spec system_process_status :: :"system.process.status" + def system_process_status do + :"system.process.status" + end + + @spec system_process_status_values() :: system_process_status_values() + def system_process_status_values() do + %{ + :running => :running, + :sleeping => :sleeping, + :stopped => :stopped, + :defunct => :defunct + } + end + + @typedoc """ + Deprecated, use `system.process.status` instead. + + ### Enum Values + * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:sleeping` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:stopped` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:defunct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type system_processes_status_values() :: %{ + :running => :running, + :sleeping => :sleeping, + :stopped => :stopped, + :defunct => :defunct + } + @deprecated """ + Replaced by `system.process.status`. + """ + @spec system_processes_status :: :"system.processes.status" + def system_processes_status do + :"system.processes.status" + end + + @spec system_processes_status_values() :: system_processes_status_values() + def system_processes_status_values() do + %{ + :running => :running, + :sleeping => :sleeping, + :stopped => :stopped, + :defunct => :defunct + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/telemetry_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/telemetry_attributes.ex new file mode 100644 index 00000000..c78bb01b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/telemetry_attributes.ex @@ -0,0 +1,84 @@ +defmodule OpenTelemetry.SemConv.Incubating.TelemetryAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Telemetry attributes. + """ + defdelegate telemetry_sdk_language(), to: OpenTelemetry.SemConv.TelemetryAttributes + + defdelegate telemetry_sdk_language_values(), to: OpenTelemetry.SemConv.TelemetryAttributes + + defdelegate telemetry_sdk_name(), to: OpenTelemetry.SemConv.TelemetryAttributes + + defdelegate telemetry_sdk_version(), to: OpenTelemetry.SemConv.TelemetryAttributes + + @doc """ + The name of the auto instrumentation agent or distribution, if used. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Official auto instrumentation agents and distributions **SHOULD** set the `telemetry.distro.name` attribute to + a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`. + + ### Examples + + ``` + ["parts-unlimited-java"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TelemetryAttributes.telemetry_distro_name() + :"telemetry.distro.name" + + ### Erlang + + ```erlang + ?TELEMETRY_DISTRO_NAME. + 'telemetry.distro.name' + ``` + + + """ + @spec telemetry_distro_name :: :"telemetry.distro.name" + def telemetry_distro_name do + :"telemetry.distro.name" + end + + @doc """ + The version string of the auto instrumentation agent or distribution, if used. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1.2.3"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TelemetryAttributes.telemetry_distro_version() + :"telemetry.distro.version" + + ### Erlang + + ```erlang + ?TELEMETRY_DISTRO_VERSION. + 'telemetry.distro.version' + ``` + + + """ + @spec telemetry_distro_version :: :"telemetry.distro.version" + def telemetry_distro_version do + :"telemetry.distro.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/test_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/test_attributes.ex new file mode 100644 index 00000000..4360c506 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/test_attributes.ex @@ -0,0 +1,210 @@ +defmodule OpenTelemetry.SemConv.Incubating.TestAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Test attributes. + """ + + @doc """ + The fully qualified human readable name of the [test case](https://en.wikipedia.org/wiki/Test_case). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["org.example.TestCase1.test1", "example/tests/TestCase1.test1", "ExampleTestCase1_test1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TestAttributes.test_case_name() + :"test.case.name" + + ### Erlang + + ```erlang + ?TEST_CASE_NAME. + 'test.case.name' + ``` + + + """ + @spec test_case_name :: :"test.case.name" + def test_case_name do + :"test.case.name" + end + + @typedoc """ + The status of the actual test case result from test execution. + + + ### Enum Values + * `:pass` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - pass + * `:fail` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - fail + """ + @type test_case_result_status_values() :: %{ + :pass => :pass, + :fail => :fail + } + @doc """ + The status of the actual test case result from test execution. + + + ### Examples + + ``` + ["pass", "fail"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TestAttributes.test_case_result_status() + :"test.case.result.status" + + iex> OpenTelemetry.SemConv.Incubating.TestAttributes.test_case_result_status_values().pass + :pass + + iex> %{OpenTelemetry.SemConv.Incubating.TestAttributes.test_case_result_status() => OpenTelemetry.SemConv.Incubating.TestAttributes.test_case_result_status_values().pass} + %{:"test.case.result.status" => :pass} + + ### Erlang + + ```erlang + ?TEST_CASE_RESULT_STATUS. + 'test.case.result.status' + + ?TEST_CASE_RESULT_STATUS_VALUES_PASS. + 'pass' + + \#{?TEST_CASE_RESULT_STATUS => ?TEST_CASE_RESULT_STATUS_VALUES_PASS}. + \#{'test.case.result.status' => 'pass'} + ``` + + + """ + @spec test_case_result_status :: :"test.case.result.status" + def test_case_result_status do + :"test.case.result.status" + end + + @spec test_case_result_status_values() :: test_case_result_status_values() + def test_case_result_status_values() do + %{ + :pass => :pass, + :fail => :fail + } + end + + @doc """ + The human readable name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["TestSuite1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TestAttributes.test_suite_name() + :"test.suite.name" + + ### Erlang + + ```erlang + ?TEST_SUITE_NAME. + 'test.suite.name' + ``` + + + """ + @spec test_suite_name :: :"test.suite.name" + def test_suite_name do + :"test.suite.name" + end + + @typedoc """ + The status of the test suite run. + + + ### Enum Values + * `:success` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - success + * `:failure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - failure + * `:skipped` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - skipped + * `:aborted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - aborted + * `:timed_out` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - timed_out + * `:in_progress` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - in_progress + """ + @type test_suite_run_status_values() :: %{ + :success => :success, + :failure => :failure, + :skipped => :skipped, + :aborted => :aborted, + :timed_out => :timed_out, + :in_progress => :in_progress + } + @doc """ + The status of the test suite run. + + + ### Examples + + ``` + ["success", "failure", "skipped", "aborted", "timed_out", "in_progress"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TestAttributes.test_suite_run_status() + :"test.suite.run.status" + + iex> OpenTelemetry.SemConv.Incubating.TestAttributes.test_suite_run_status_values().success + :success + + iex> %{OpenTelemetry.SemConv.Incubating.TestAttributes.test_suite_run_status() => OpenTelemetry.SemConv.Incubating.TestAttributes.test_suite_run_status_values().success} + %{:"test.suite.run.status" => :success} + + ### Erlang + + ```erlang + ?TEST_SUITE_RUN_STATUS. + 'test.suite.run.status' + + ?TEST_SUITE_RUN_STATUS_VALUES_SUCCESS. + 'success' + + \#{?TEST_SUITE_RUN_STATUS => ?TEST_SUITE_RUN_STATUS_VALUES_SUCCESS}. + \#{'test.suite.run.status' => 'success'} + ``` + + + """ + @spec test_suite_run_status :: :"test.suite.run.status" + def test_suite_run_status do + :"test.suite.run.status" + end + + @spec test_suite_run_status_values() :: test_suite_run_status_values() + def test_suite_run_status_values() do + %{ + :success => :success, + :failure => :failure, + :skipped => :skipped, + :aborted => :aborted, + :timed_out => :timed_out, + :in_progress => :in_progress + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/thread_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/thread_attributes.ex new file mode 100644 index 00000000..4d236c82 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/thread_attributes.ex @@ -0,0 +1,72 @@ +defmodule OpenTelemetry.SemConv.Incubating.ThreadAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Thread attributes. + """ + + @doc """ + Current "managed" thread ID (as opposed to OS thread ID). + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 42 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ThreadAttributes.thread_id() + :"thread.id" + + ### Erlang + + ```erlang + ?THREAD_ID. + 'thread.id' + ``` + + + """ + @spec thread_id :: :"thread.id" + def thread_id do + :"thread.id" + end + + @doc """ + Current thread name. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + main + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ThreadAttributes.thread_name() + :"thread.name" + + ### Erlang + + ```erlang + ?THREAD_NAME. + 'thread.name' + ``` + + + """ + @spec thread_name :: :"thread.name" + def thread_name do + :"thread.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/tls_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/tls_attributes.ex new file mode 100644 index 00000000..2f171b6c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/tls_attributes.ex @@ -0,0 +1,953 @@ +defmodule OpenTelemetry.SemConv.Incubating.TLSAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for TLS attributes. + """ + + @doc """ + String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The values allowed for `tls.cipher` **MUST** be one of the `Descriptions` of the [registered TLS Cipher Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4). + + ### Examples + + ``` + ["TLS_RSA_WITH_3DES_EDE_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_cipher() + :"tls.cipher" + + ### Erlang + + ```erlang + ?TLS_CIPHER. + 'tls.cipher' + ``` + + + """ + @spec tls_cipher :: :"tls.cipher" + def tls_cipher do + :"tls.cipher" + end + + @doc """ + PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["MII..."] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_certificate() + :"tls.client.certificate" + + ### Erlang + + ```erlang + ?TLS_CLIENT_CERTIFICATE. + 'tls.client.certificate' + ``` + + + """ + @spec tls_client_certificate :: :"tls.client.certificate" + def tls_client_certificate do + :"tls.client.certificate" + end + + @doc """ + Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["MII...", "MI..."] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_certificate_chain() + :"tls.client.certificate_chain" + + ### Erlang + + ```erlang + ?TLS_CLIENT_CERTIFICATE_CHAIN. + 'tls.client.certificate_chain' + ``` + + + """ + @spec tls_client_certificate_chain :: :"tls.client.certificate_chain" + def tls_client_certificate_chain do + :"tls.client.certificate_chain" + end + + @doc """ + Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_hash_md5() + :"tls.client.hash.md5" + + ### Erlang + + ```erlang + ?TLS_CLIENT_HASH_MD5. + 'tls.client.hash.md5' + ``` + + + """ + @spec tls_client_hash_md5 :: :"tls.client.hash.md5" + def tls_client_hash_md5 do + :"tls.client.hash.md5" + end + + @doc """ + Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["9E393D93138888D288266C2D915214D1D1CCEB2A"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_hash_sha1() + :"tls.client.hash.sha1" + + ### Erlang + + ```erlang + ?TLS_CLIENT_HASH_SHA1. + 'tls.client.hash.sha1' + ``` + + + """ + @spec tls_client_hash_sha1 :: :"tls.client.hash.sha1" + def tls_client_hash_sha1 do + :"tls.client.hash.sha1" + end + + @doc """ + Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_hash_sha256() + :"tls.client.hash.sha256" + + ### Erlang + + ```erlang + ?TLS_CLIENT_HASH_SHA256. + 'tls.client.hash.sha256' + ``` + + + """ + @spec tls_client_hash_sha256 :: :"tls.client.hash.sha256" + def tls_client_hash_sha256 do + :"tls.client.hash.sha256" + end + + @doc """ + Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_issuer() + :"tls.client.issuer" + + ### Erlang + + ```erlang + ?TLS_CLIENT_ISSUER. + 'tls.client.issuer' + ``` + + + """ + @spec tls_client_issuer :: :"tls.client.issuer" + def tls_client_issuer do + :"tls.client.issuer" + end + + @doc """ + A hash that identifies clients based on how they perform an SSL/TLS handshake. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["d4e5b18d6b55c71272893221c96ba240"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_ja3() + :"tls.client.ja3" + + ### Erlang + + ```erlang + ?TLS_CLIENT_JA3. + 'tls.client.ja3' + ``` + + + """ + @spec tls_client_ja3 :: :"tls.client.ja3" + def tls_client_ja3 do + :"tls.client.ja3" + end + + @doc """ + Date/Time indicating when client certificate is no longer considered valid. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2021-01-01T00:00:00.000Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_not_after() + :"tls.client.not_after" + + ### Erlang + + ```erlang + ?TLS_CLIENT_NOT_AFTER. + 'tls.client.not_after' + ``` + + + """ + @spec tls_client_not_after :: :"tls.client.not_after" + def tls_client_not_after do + :"tls.client.not_after" + end + + @doc """ + Date/Time indicating when client certificate is first considered valid. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1970-01-01T00:00:00.000Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_not_before() + :"tls.client.not_before" + + ### Erlang + + ```erlang + ?TLS_CLIENT_NOT_BEFORE. + 'tls.client.not_before' + ``` + + + """ + @spec tls_client_not_before :: :"tls.client.not_before" + def tls_client_not_before do + :"tls.client.not_before" + end + + @deprecated """ + Replaced by `server.address. + """ + @spec tls_client_server_name :: :"tls.client.server_name" + def tls_client_server_name do + :"tls.client.server_name" + end + + @doc """ + Distinguished name of subject of the x.509 certificate presented by the client. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["CN=myclient, OU=Documentation Team, DC=example, DC=com"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_subject() + :"tls.client.subject" + + ### Erlang + + ```erlang + ?TLS_CLIENT_SUBJECT. + 'tls.client.subject' + ``` + + + """ + @spec tls_client_subject :: :"tls.client.subject" + def tls_client_subject do + :"tls.client.subject" + end + + @doc """ + Array of ciphers offered by the client during the client hello. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_client_supported_ciphers() + :"tls.client.supported_ciphers" + + ### Erlang + + ```erlang + ?TLS_CLIENT_SUPPORTED_CIPHERS. + 'tls.client.supported_ciphers' + ``` + + + """ + @spec tls_client_supported_ciphers :: :"tls.client.supported_ciphers" + def tls_client_supported_ciphers do + :"tls.client.supported_ciphers" + end + + @doc """ + String indicating the curve used for the given cipher, when applicable + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["secp256r1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_curve() + :"tls.curve" + + ### Erlang + + ```erlang + ?TLS_CURVE. + 'tls.curve' + ``` + + + """ + @spec tls_curve :: :"tls.curve" + def tls_curve do + :"tls.curve" + end + + @doc """ + Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel. + ### Value type + + Value must be of type `boolean()`. + ### Examples + + ``` + [true] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_established() + :"tls.established" + + ### Erlang + + ```erlang + ?TLS_ESTABLISHED. + 'tls.established' + ``` + + + """ + @spec tls_established :: :"tls.established" + def tls_established do + :"tls.established" + end + + @doc """ + String indicating the protocol being tunneled. Per the values in the [IANA registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["http/1.1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_next_protocol() + :"tls.next_protocol" + + ### Erlang + + ```erlang + ?TLS_NEXT_PROTOCOL. + 'tls.next_protocol' + ``` + + + """ + @spec tls_next_protocol :: :"tls.next_protocol" + def tls_next_protocol do + :"tls.next_protocol" + end + + @typedoc """ + Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + + + ### Enum Values + * `:ssl` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:tls` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type tls_protocol_name_values() :: %{ + :ssl => :ssl, + :tls => :tls + } + @doc """ + Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_protocol_name() + :"tls.protocol.name" + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_protocol_name_values().ssl + :ssl + + iex> %{OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_protocol_name() => OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_protocol_name_values().ssl} + %{:"tls.protocol.name" => :ssl} + + ### Erlang + + ```erlang + ?TLS_PROTOCOL_NAME. + 'tls.protocol.name' + + ?TLS_PROTOCOL_NAME_VALUES_SSL. + 'ssl' + + \#{?TLS_PROTOCOL_NAME => ?TLS_PROTOCOL_NAME_VALUES_SSL}. + \#{'tls.protocol.name' => 'ssl'} + ``` + + + """ + @spec tls_protocol_name :: :"tls.protocol.name" + def tls_protocol_name do + :"tls.protocol.name" + end + + @spec tls_protocol_name_values() :: tls_protocol_name_values() + def tls_protocol_name_values() do + %{ + :ssl => :ssl, + :tls => :tls + } + end + + @doc """ + Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1.2", "3"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_protocol_version() + :"tls.protocol.version" + + ### Erlang + + ```erlang + ?TLS_PROTOCOL_VERSION. + 'tls.protocol.version' + ``` + + + """ + @spec tls_protocol_version :: :"tls.protocol.version" + def tls_protocol_version do + :"tls.protocol.version" + end + + @doc """ + Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation. + ### Value type + + Value must be of type `boolean()`. + ### Examples + + ``` + [true] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_resumed() + :"tls.resumed" + + ### Erlang + + ```erlang + ?TLS_RESUMED. + 'tls.resumed' + ``` + + + """ + @spec tls_resumed :: :"tls.resumed" + def tls_resumed do + :"tls.resumed" + end + + @doc """ + PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["MII..."] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_certificate() + :"tls.server.certificate" + + ### Erlang + + ```erlang + ?TLS_SERVER_CERTIFICATE. + 'tls.server.certificate' + ``` + + + """ + @spec tls_server_certificate :: :"tls.server.certificate" + def tls_server_certificate do + :"tls.server.certificate" + end + + @doc """ + Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["MII...", "MI..."] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_certificate_chain() + :"tls.server.certificate_chain" + + ### Erlang + + ```erlang + ?TLS_SERVER_CERTIFICATE_CHAIN. + 'tls.server.certificate_chain' + ``` + + + """ + @spec tls_server_certificate_chain :: :"tls.server.certificate_chain" + def tls_server_certificate_chain do + :"tls.server.certificate_chain" + end + + @doc """ + Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_hash_md5() + :"tls.server.hash.md5" + + ### Erlang + + ```erlang + ?TLS_SERVER_HASH_MD5. + 'tls.server.hash.md5' + ``` + + + """ + @spec tls_server_hash_md5 :: :"tls.server.hash.md5" + def tls_server_hash_md5 do + :"tls.server.hash.md5" + end + + @doc """ + Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["9E393D93138888D288266C2D915214D1D1CCEB2A"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_hash_sha1() + :"tls.server.hash.sha1" + + ### Erlang + + ```erlang + ?TLS_SERVER_HASH_SHA1. + 'tls.server.hash.sha1' + ``` + + + """ + @spec tls_server_hash_sha1 :: :"tls.server.hash.sha1" + def tls_server_hash_sha1 do + :"tls.server.hash.sha1" + end + + @doc """ + Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_hash_sha256() + :"tls.server.hash.sha256" + + ### Erlang + + ```erlang + ?TLS_SERVER_HASH_SHA256. + 'tls.server.hash.sha256' + ``` + + + """ + @spec tls_server_hash_sha256 :: :"tls.server.hash.sha256" + def tls_server_hash_sha256 do + :"tls.server.hash.sha256" + end + + @doc """ + Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_issuer() + :"tls.server.issuer" + + ### Erlang + + ```erlang + ?TLS_SERVER_ISSUER. + 'tls.server.issuer' + ``` + + + """ + @spec tls_server_issuer :: :"tls.server.issuer" + def tls_server_issuer do + :"tls.server.issuer" + end + + @doc """ + A hash that identifies servers based on how they perform an SSL/TLS handshake. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["d4e5b18d6b55c71272893221c96ba240"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_ja3s() + :"tls.server.ja3s" + + ### Erlang + + ```erlang + ?TLS_SERVER_JA3S. + 'tls.server.ja3s' + ``` + + + """ + @spec tls_server_ja3s :: :"tls.server.ja3s" + def tls_server_ja3s do + :"tls.server.ja3s" + end + + @doc """ + Date/Time indicating when server certificate is no longer considered valid. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2021-01-01T00:00:00.000Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_not_after() + :"tls.server.not_after" + + ### Erlang + + ```erlang + ?TLS_SERVER_NOT_AFTER. + 'tls.server.not_after' + ``` + + + """ + @spec tls_server_not_after :: :"tls.server.not_after" + def tls_server_not_after do + :"tls.server.not_after" + end + + @doc """ + Date/Time indicating when server certificate is first considered valid. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1970-01-01T00:00:00.000Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_not_before() + :"tls.server.not_before" + + ### Erlang + + ```erlang + ?TLS_SERVER_NOT_BEFORE. + 'tls.server.not_before' + ``` + + + """ + @spec tls_server_not_before :: :"tls.server.not_before" + def tls_server_not_before do + :"tls.server.not_before" + end + + @doc """ + Distinguished name of subject of the x.509 certificate presented by the server. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["CN=myserver, OU=Documentation Team, DC=example, DC=com"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.TLSAttributes.tls_server_subject() + :"tls.server.subject" + + ### Erlang + + ```erlang + ?TLS_SERVER_SUBJECT. + 'tls.server.subject' + ``` + + + """ + @spec tls_server_subject :: :"tls.server.subject" + def tls_server_subject do + :"tls.server.subject" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/url_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/url_attributes.ex new file mode 100644 index 00000000..82665c4a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/url_attributes.ex @@ -0,0 +1,304 @@ +defmodule OpenTelemetry.SemConv.Incubating.URLAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for URL attributes. + """ + defdelegate url_fragment(), to: OpenTelemetry.SemConv.URLAttributes + + defdelegate url_full(), to: OpenTelemetry.SemConv.URLAttributes + + defdelegate url_path(), to: OpenTelemetry.SemConv.URLAttributes + + defdelegate url_query(), to: OpenTelemetry.SemConv.URLAttributes + + defdelegate url_scheme(), to: OpenTelemetry.SemConv.URLAttributes + + @doc """ + Domain extracted from the `url.full`, such as "opentelemetry.io". + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the domain field. If the URL contains a [literal IPv6 address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by `[` and `]`, the `[` and `]` characters should also be captured in the domain field. + + ### Examples + + ``` + ["www.foo.bar", "opentelemetry.io", "3.12.167.2", "[1080:0:0:0:8:800:200C:417A]"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.URLAttributes.url_domain() + :"url.domain" + + ### Erlang + + ```erlang + ?URL_DOMAIN. + 'url.domain' + ``` + + + """ + @spec url_domain :: :"url.domain" + def url_domain do + :"url.domain" + end + + @doc """ + The file extension extracted from the `url.full`, excluding the leading dot. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The file extension is only set if it exists, as not every url has a file extension. When the file name has multiple extensions `example.tar.gz`, only the last one should be captured `gz`, not `tar.gz`. + + ### Examples + + ``` + ["png", "gz"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.URLAttributes.url_extension() + :"url.extension" + + ### Erlang + + ```erlang + ?URL_EXTENSION. + 'url.extension' + ``` + + + """ + @spec url_extension :: :"url.extension" + def url_extension do + :"url.extension" + end + + @doc """ + Unmodified original URL as seen in the event source. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + In network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. This field is meant to represent the URL as it was observed, complete or not. + `url.original` might contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case password and username **SHOULD** **NOT** be redacted and attribute's value **SHOULD** remain the same. + + ### Examples + + ``` + ["https://www.foo.bar/search?q=OpenTelemetry#SemConv", "search?q=OpenTelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.URLAttributes.url_original() + :"url.original" + + ### Erlang + + ```erlang + ?URL_ORIGINAL. + 'url.original' + ``` + + + """ + @spec url_original :: :"url.original" + def url_original do + :"url.original" + end + + @doc """ + Port extracted from the `url.full` + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [443] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.URLAttributes.url_port() + :"url.port" + + ### Erlang + + ```erlang + ?URL_PORT. + 'url.port' + ``` + + + """ + @spec url_port :: :"url.port" + def url_port do + :"url.port" + end + + @doc """ + The highest registered url domain, stripped of the subdomain. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This value can be determined precisely with the [public suffix list](http://publicsuffix.org). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`. + + ### Examples + + ``` + ["example.com", "foo.co.uk"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.URLAttributes.url_registered_domain() + :"url.registered_domain" + + ### Erlang + + ```erlang + ?URL_REGISTERED_DOMAIN. + 'url.registered_domain' + ``` + + + """ + @spec url_registered_domain :: :"url.registered_domain" + def url_registered_domain do + :"url.registered_domain" + end + + @doc """ + The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, with no trailing period. + + ### Examples + + ``` + ["east", "sub2.sub1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.URLAttributes.url_subdomain() + :"url.subdomain" + + ### Erlang + + ```erlang + ?URL_SUBDOMAIN. + 'url.subdomain' + ``` + + + """ + @spec url_subdomain :: :"url.subdomain" + def url_subdomain do + :"url.subdomain" + end + + @doc """ + The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/users/{id}", "/users/:id", "/users?id={id}"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.URLAttributes.url_template() + :"url.template" + + ### Erlang + + ```erlang + ?URL_TEMPLATE. + 'url.template' + ``` + + + """ + @spec url_template :: :"url.template" + def url_template do + :"url.template" + end + + @doc """ + The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is `com`. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This value can be determined precisely with the [public suffix list](http://publicsuffix.org). + + ### Examples + + ``` + ["com", "co.uk"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.URLAttributes.url_top_level_domain() + :"url.top_level_domain" + + ### Erlang + + ```erlang + ?URL_TOP_LEVEL_DOMAIN. + 'url.top_level_domain' + ``` + + + """ + @spec url_top_level_domain :: :"url.top_level_domain" + def url_top_level_domain do + :"url.top_level_domain" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_agent_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_agent_attributes.ex new file mode 100644 index 00000000..b9d8c84c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_agent_attributes.ex @@ -0,0 +1,81 @@ +defmodule OpenTelemetry.SemConv.Incubating.UserAgentAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for User_Agent attributes. + """ + defdelegate user_agent_original(), to: OpenTelemetry.SemConv.UserAgentAttributes + + @doc """ + Name of the user-agent extracted from original. Usually refers to the browser's name. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + [Example](https://www.whatsmyua.info) of extracting browser's name from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant name **SHOULD** be selected. In such a scenario it should align with `user_agent.version` + + ### Examples + + ``` + ["Safari", "YourApp"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAgentAttributes.user_agent_name() + :"user_agent.name" + + ### Erlang + + ```erlang + ?USER_AGENT_NAME. + 'user_agent.name' + ``` + + + """ + @spec user_agent_name :: :"user_agent.name" + def user_agent_name do + :"user_agent.name" + end + + @doc """ + Version of the user-agent extracted from original. Usually refers to the browser's version + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + [Example](https://www.whatsmyua.info) of extracting browser's version from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant version **SHOULD** be selected. In such a scenario it should align with `user_agent.name` + + ### Examples + + ``` + ["14.1.2", "1.0.0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAgentAttributes.user_agent_version() + :"user_agent.version" + + ### Erlang + + ```erlang + ?USER_AGENT_VERSION. + 'user_agent.version' + ``` + + + """ + @spec user_agent_version :: :"user_agent.version" + def user_agent_version do + :"user_agent.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_attributes.ex new file mode 100644 index 00000000..94b0ad1a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_attributes.ex @@ -0,0 +1,208 @@ +defmodule OpenTelemetry.SemConv.Incubating.UserAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for User attributes. + """ + + @doc """ + User email address. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["a.einstein@example.com"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAttributes.user_email() + :"user.email" + + ### Erlang + + ```erlang + ?USER_EMAIL. + 'user.email' + ``` + + + """ + @spec user_email :: :"user.email" + def user_email do + :"user.email" + end + + @doc """ + User's full name + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Albert Einstein"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAttributes.user_full_name() + :"user.full_name" + + ### Erlang + + ```erlang + ?USER_FULL_NAME. + 'user.full_name' + ``` + + + """ + @spec user_full_name :: :"user.full_name" + def user_full_name do + :"user.full_name" + end + + @doc """ + Unique user hash to correlate information for a user in anonymized form. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Useful if `user.id` or `user.name` contain confidential information and cannot be used. + + ### Examples + + ``` + ["364fc68eaf4c8acec74a4e52d7d1feaa"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAttributes.user_hash() + :"user.hash" + + ### Erlang + + ```erlang + ?USER_HASH. + 'user.hash' + ``` + + + """ + @spec user_hash :: :"user.hash" + def user_hash do + :"user.hash" + end + + @doc """ + Unique identifier of the user. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["S-1-5-21-202424912787-2692429404-2351956786-1000"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAttributes.user_id() + :"user.id" + + ### Erlang + + ```erlang + ?USER_ID. + 'user.id' + ``` + + + """ + @spec user_id :: :"user.id" + def user_id do + :"user.id" + end + + @doc """ + Short name or login/username of the user. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["a.einstein"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAttributes.user_name() + :"user.name" + + ### Erlang + + ```erlang + ?USER_NAME. + 'user.name' + ``` + + + """ + @spec user_name :: :"user.name" + def user_name do + :"user.name" + end + + @doc """ + Array of user roles at the time of the event. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + ["admin", "reporting_user"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAttributes.user_roles() + :"user.roles" + + ### Erlang + + ```erlang + ?USER_ROLES. + 'user.roles' + ``` + + + """ + @spec user_roles :: :"user.roles" + def user_roles do + :"user.roles" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex new file mode 100644 index 00000000..a339fa71 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex @@ -0,0 +1,246 @@ +defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Vcs attributes. + """ + + @doc """ + The ID of the change (pull request/merge request) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["123"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_change_id() + :"vcs.repository.change.id" + + ### Erlang + + ```erlang + ?VCS_REPOSITORY_CHANGE_ID. + 'vcs.repository.change.id' + ``` + + + """ + @spec vcs_repository_change_id :: :"vcs.repository.change.id" + def vcs_repository_change_id do + :"vcs.repository.change.id" + end + + @doc """ + The human readable title of the change (pull request/merge request). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Fixes broken thing", "feat: add my new feature", "[chore] update dependency"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_change_title() + :"vcs.repository.change.title" + + ### Erlang + + ```erlang + ?VCS_REPOSITORY_CHANGE_TITLE. + 'vcs.repository.change.title' + ``` + + + """ + @spec vcs_repository_change_title :: :"vcs.repository.change.title" + def vcs_repository_change_title do + :"vcs.repository.change.title" + end + + @doc """ + The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-feature-branch", "tag-1-test"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_name() + :"vcs.repository.ref.name" + + ### Erlang + + ```erlang + ?VCS_REPOSITORY_REF_NAME. + 'vcs.repository.ref.name' + ``` + + + """ + @spec vcs_repository_ref_name :: :"vcs.repository.ref.name" + def vcs_repository_ref_name do + :"vcs.repository.ref.name" + end + + @doc """ + The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The revision can be a full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), + of the recorded change to a ref within a repository pointing to a + commit [commit](https://git-scm.com/docs/git-commit) object. It does + not necessarily have to be a hash; it can simply define a + [revision number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html) + which is an integer that is monotonically increasing. In cases where + it is identical to the `ref.name`, it **SHOULD** still be included. It is + up to the implementer to decide which value to set as the revision + based on the VCS system and situational context. + + ### Examples + + ``` + ["9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc", "main", "123", "HEAD"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_revision() + :"vcs.repository.ref.revision" + + ### Erlang + + ```erlang + ?VCS_REPOSITORY_REF_REVISION. + 'vcs.repository.ref.revision' + ``` + + + """ + @spec vcs_repository_ref_revision :: :"vcs.repository.ref.revision" + def vcs_repository_ref_revision do + :"vcs.repository.ref.revision" + end + + @typedoc """ + The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. + + + ### Enum Values + * `:branch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) + * `:tag` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) + """ + @type vcs_repository_ref_type_values() :: %{ + :branch => :branch, + :tag => :tag + } + @doc """ + The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. + + + ### Examples + + ``` + ["branch", "tag"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_type() + :"vcs.repository.ref.type" + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_type_values().branch + :branch + + iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_type() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_type_values().branch} + %{:"vcs.repository.ref.type" => :branch} + + ### Erlang + + ```erlang + ?VCS_REPOSITORY_REF_TYPE. + 'vcs.repository.ref.type' + + ?VCS_REPOSITORY_REF_TYPE_VALUES_BRANCH. + 'branch' + + \#{?VCS_REPOSITORY_REF_TYPE => ?VCS_REPOSITORY_REF_TYPE_VALUES_BRANCH}. + \#{'vcs.repository.ref.type' => 'branch'} + ``` + + + """ + @spec vcs_repository_ref_type :: :"vcs.repository.ref.type" + def vcs_repository_ref_type do + :"vcs.repository.ref.type" + end + + @spec vcs_repository_ref_type_values() :: vcs_repository_ref_type_values() + def vcs_repository_ref_type_values() do + %{ + :branch => :branch, + :tag => :tag + } + end + + @doc """ + The [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["https://github.com/opentelemetry/open-telemetry-collector-contrib", "https://gitlab.com/my-org/my-project/my-projects-project/repo"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_url_full() + :"vcs.repository.url.full" + + ### Erlang + + ```erlang + ?VCS_REPOSITORY_URL_FULL. + 'vcs.repository.url.full' + ``` + + + """ + @spec vcs_repository_url_full :: :"vcs.repository.url.full" + def vcs_repository_url_full do + :"vcs.repository.url.full" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex new file mode 100644 index 00000000..afb594d1 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex @@ -0,0 +1,129 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Container metrics. + """ + @doc """ + Total CPU time consumed + + Instrument: `counter` + Unit: `s` + ### Notes + + Total CPU time consumed by the specific container on all available CPU cores + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_cpu_time() + :"container.cpu.time" + + ### Erlang + + ```erlang + ?CONTAINER_CPU_TIME. + 'container.cpu.time' + ``` + + + """ + + @spec container_cpu_time :: :"container.cpu.time" + def container_cpu_time do + :"container.cpu.time" + end + + @doc """ + Disk bytes for the container. + + Instrument: `counter` + Unit: `By` + ### Notes + + The total number of bytes read/written successfully (aggregated from all disks). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_disk_io() + :"container.disk.io" + + ### Erlang + + ```erlang + ?CONTAINER_DISK_IO. + 'container.disk.io' + ``` + + + """ + + @spec container_disk_io :: :"container.disk.io" + def container_disk_io do + :"container.disk.io" + end + + @doc """ + Memory usage of the container. + + Instrument: `counter` + Unit: `By` + ### Notes + + Memory usage of the container. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_memory_usage() + :"container.memory.usage" + + ### Erlang + + ```erlang + ?CONTAINER_MEMORY_USAGE. + 'container.memory.usage' + ``` + + + """ + + @spec container_memory_usage :: :"container.memory.usage" + def container_memory_usage do + :"container.memory.usage" + end + + @doc """ + Network bytes for the container. + + Instrument: `counter` + Unit: `By` + ### Notes + + The number of bytes sent/received on all network interfaces by the container. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_network_io() + :"container.network.io" + + ### Erlang + + ```erlang + ?CONTAINER_NETWORK_IO. + 'container.network.io' + ``` + + + """ + + @spec container_network_io :: :"container.network.io" + def container_network_io do + :"container.network.io" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex new file mode 100644 index 00000000..e8b1e665 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex @@ -0,0 +1,360 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for DB metrics. + """ + @doc """ + The number of connections that are currently in state described by the `state` attribute + + Instrument: `updowncounter` + Unit: `{connection}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_count() + :"db.client.connection.count" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_COUNT. + 'db.client.connection.count' + ``` + + + """ + + @spec db_client_connection_count :: :"db.client.connection.count" + def db_client_connection_count do + :"db.client.connection.count" + end + + @doc """ + The time it took to create a new connection + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_create_time() + :"db.client.connection.create_time" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_CREATE_TIME. + 'db.client.connection.create_time' + ``` + + + """ + + @spec db_client_connection_create_time :: :"db.client.connection.create_time" + def db_client_connection_create_time do + :"db.client.connection.create_time" + end + + @doc """ + The maximum number of idle open connections allowed + + Instrument: `updowncounter` + Unit: `{connection}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_idle_max() + :"db.client.connection.idle.max" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_IDLE_MAX. + 'db.client.connection.idle.max' + ``` + + + """ + + @spec db_client_connection_idle_max :: :"db.client.connection.idle.max" + def db_client_connection_idle_max do + :"db.client.connection.idle.max" + end + + @doc """ + The minimum number of idle open connections allowed + + Instrument: `updowncounter` + Unit: `{connection}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_idle_min() + :"db.client.connection.idle.min" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_IDLE_MIN. + 'db.client.connection.idle.min' + ``` + + + """ + + @spec db_client_connection_idle_min :: :"db.client.connection.idle.min" + def db_client_connection_idle_min do + :"db.client.connection.idle.min" + end + + @doc """ + The maximum number of open connections allowed + + Instrument: `updowncounter` + Unit: `{connection}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_max() + :"db.client.connection.max" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_MAX. + 'db.client.connection.max' + ``` + + + """ + + @spec db_client_connection_max :: :"db.client.connection.max" + def db_client_connection_max do + :"db.client.connection.max" + end + + @doc """ + The number of pending requests for an open connection, cumulative for the entire pool + + Instrument: `updowncounter` + Unit: `{request}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_pending_requests() + :"db.client.connection.pending_requests" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_PENDING_REQUESTS. + 'db.client.connection.pending_requests' + ``` + + + """ + + @spec db_client_connection_pending_requests :: :"db.client.connection.pending_requests" + def db_client_connection_pending_requests do + :"db.client.connection.pending_requests" + end + + @doc """ + The number of connection timeouts that have occurred trying to obtain a connection from the pool + + Instrument: `counter` + Unit: `{timeout}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_timeouts() + :"db.client.connection.timeouts" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_TIMEOUTS. + 'db.client.connection.timeouts' + ``` + + + """ + + @spec db_client_connection_timeouts :: :"db.client.connection.timeouts" + def db_client_connection_timeouts do + :"db.client.connection.timeouts" + end + + @doc """ + The time between borrowing a connection and returning it to the pool + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_use_time() + :"db.client.connection.use_time" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_USE_TIME. + 'db.client.connection.use_time' + ``` + + + """ + + @spec db_client_connection_use_time :: :"db.client.connection.use_time" + def db_client_connection_use_time do + :"db.client.connection.use_time" + end + + @doc """ + The time it took to obtain an open connection from the pool + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_connection_wait_time() + :"db.client.connection.wait_time" + + ### Erlang + + ```erlang + ?DB_CLIENT_CONNECTION_WAIT_TIME. + 'db.client.connection.wait_time' + ``` + + + """ + + @spec db_client_connection_wait_time :: :"db.client.connection.wait_time" + def db_client_connection_wait_time do + :"db.client.connection.wait_time" + end + + @deprecated """ + Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. + """ + + @spec db_client_connections_create_time :: :"db.client.connections.create_time" + def db_client_connections_create_time do + :"db.client.connections.create_time" + end + + @deprecated """ + Replaced by `db.client.connection.idle.max`. + """ + + @spec db_client_connections_idle_max :: :"db.client.connections.idle.max" + def db_client_connections_idle_max do + :"db.client.connections.idle.max" + end + + @deprecated """ + Replaced by `db.client.connection.idle.min`. + """ + + @spec db_client_connections_idle_min :: :"db.client.connections.idle.min" + def db_client_connections_idle_min do + :"db.client.connections.idle.min" + end + + @deprecated """ + Replaced by `db.client.connection.max`. + """ + + @spec db_client_connections_max :: :"db.client.connections.max" + def db_client_connections_max do + :"db.client.connections.max" + end + + @deprecated """ + Replaced by `db.client.connection.pending_requests`. + """ + + @spec db_client_connections_pending_requests :: :"db.client.connections.pending_requests" + def db_client_connections_pending_requests do + :"db.client.connections.pending_requests" + end + + @deprecated """ + Replaced by `db.client.connection.timeouts`. + """ + + @spec db_client_connections_timeouts :: :"db.client.connections.timeouts" + def db_client_connections_timeouts do + :"db.client.connections.timeouts" + end + + @deprecated """ + Replaced by `db.client.connection.count`. + """ + + @spec db_client_connections_usage :: :"db.client.connections.usage" + def db_client_connections_usage do + :"db.client.connections.usage" + end + + @deprecated """ + Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. + """ + + @spec db_client_connections_use_time :: :"db.client.connections.use_time" + def db_client_connections_use_time do + :"db.client.connections.use_time" + end + + @deprecated """ + Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. + """ + + @spec db_client_connections_wait_time :: :"db.client.connections.wait_time" + def db_client_connections_wait_time do + :"db.client.connections.wait_time" + end + + @doc """ + Duration of database client operations. + + Instrument: `histogram` + Unit: `s` + ### Notes + + Batch operations **SHOULD** be recorded as a single operation. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_operation_duration() + :"db.client.operation.duration" + + ### Erlang + + ```erlang + ?DB_CLIENT_OPERATION_DURATION. + 'db.client.operation.duration' + ``` + + + """ + + @spec db_client_operation_duration :: :"db.client.operation.duration" + def db_client_operation_duration do + :"db.client.operation.duration" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/dns_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/dns_metrics.ex new file mode 100644 index 00000000..030d7e3c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/dns_metrics.ex @@ -0,0 +1,32 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.DNSMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for DNS metrics. + """ + @doc """ + Measures the time taken to perform a DNS lookup. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.DNSMetrics.dns_lookup_duration() + :"dns.lookup.duration" + + ### Erlang + + ```erlang + ?DNS_LOOKUP_DURATION. + 'dns.lookup.duration' + ``` + + + """ + + @spec dns_lookup_duration :: :"dns.lookup.duration" + def dns_lookup_duration do + :"dns.lookup.duration" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/faas_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/faas_metrics.ex new file mode 100644 index 00000000..950c5f9c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/faas_metrics.ex @@ -0,0 +1,248 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for FAAS metrics. + """ + @doc """ + Number of invocation cold starts + + Instrument: `counter` + Unit: `{coldstart}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_coldstarts() + :"faas.coldstarts" + + ### Erlang + + ```erlang + ?FAAS_COLDSTARTS. + 'faas.coldstarts' + ``` + + + """ + + @spec faas_coldstarts :: :"faas.coldstarts" + def faas_coldstarts do + :"faas.coldstarts" + end + + @doc """ + Distribution of CPU usage per invocation + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_cpu_usage() + :"faas.cpu_usage" + + ### Erlang + + ```erlang + ?FAAS_CPU_USAGE. + 'faas.cpu_usage' + ``` + + + """ + + @spec faas_cpu_usage :: :"faas.cpu_usage" + def faas_cpu_usage do + :"faas.cpu_usage" + end + + @doc """ + Number of invocation errors + + Instrument: `counter` + Unit: `{error}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_errors() + :"faas.errors" + + ### Erlang + + ```erlang + ?FAAS_ERRORS. + 'faas.errors' + ``` + + + """ + + @spec faas_errors :: :"faas.errors" + def faas_errors do + :"faas.errors" + end + + @doc """ + Measures the duration of the function's initialization, such as a cold start + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_init_duration() + :"faas.init_duration" + + ### Erlang + + ```erlang + ?FAAS_INIT_DURATION. + 'faas.init_duration' + ``` + + + """ + + @spec faas_init_duration :: :"faas.init_duration" + def faas_init_duration do + :"faas.init_duration" + end + + @doc """ + Number of successful invocations + + Instrument: `counter` + Unit: `{invocation}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_invocations() + :"faas.invocations" + + ### Erlang + + ```erlang + ?FAAS_INVOCATIONS. + 'faas.invocations' + ``` + + + """ + + @spec faas_invocations :: :"faas.invocations" + def faas_invocations do + :"faas.invocations" + end + + @doc """ + Measures the duration of the function's logic execution + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_invoke_duration() + :"faas.invoke_duration" + + ### Erlang + + ```erlang + ?FAAS_INVOKE_DURATION. + 'faas.invoke_duration' + ``` + + + """ + + @spec faas_invoke_duration :: :"faas.invoke_duration" + def faas_invoke_duration do + :"faas.invoke_duration" + end + + @doc """ + Distribution of max memory usage per invocation + + Instrument: `histogram` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_mem_usage() + :"faas.mem_usage" + + ### Erlang + + ```erlang + ?FAAS_MEM_USAGE. + 'faas.mem_usage' + ``` + + + """ + + @spec faas_mem_usage :: :"faas.mem_usage" + def faas_mem_usage do + :"faas.mem_usage" + end + + @doc """ + Distribution of net I/O usage per invocation + + Instrument: `histogram` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_net_io() + :"faas.net_io" + + ### Erlang + + ```erlang + ?FAAS_NET_IO. + 'faas.net_io' + ``` + + + """ + + @spec faas_net_io :: :"faas.net_io" + def faas_net_io do + :"faas.net_io" + end + + @doc """ + Number of invocation timeouts + + Instrument: `counter` + Unit: `{timeout}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics.faas_timeouts() + :"faas.timeouts" + + ### Erlang + + ```erlang + ?FAAS_TIMEOUTS. + 'faas.timeouts' + ``` + + + """ + + @spec faas_timeouts :: :"faas.timeouts" + def faas_timeouts do + :"faas.timeouts" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/gen_ai_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/gen_ai_metrics.ex new file mode 100644 index 00000000..2a2d8b9b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/gen_ai_metrics.ex @@ -0,0 +1,140 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Gen_Ai metrics. + """ + @doc """ + GenAI operation duration + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_client_operation_duration() + :"gen_ai.client.operation.duration" + + ### Erlang + + ```erlang + ?GEN_AI_CLIENT_OPERATION_DURATION. + 'gen_ai.client.operation.duration' + ``` + + + """ + + @spec gen_ai_client_operation_duration :: :"gen_ai.client.operation.duration" + def gen_ai_client_operation_duration do + :"gen_ai.client.operation.duration" + end + + @doc """ + Measures number of input and output tokens used + + Instrument: `histogram` + Unit: `{token}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_client_token_usage() + :"gen_ai.client.token.usage" + + ### Erlang + + ```erlang + ?GEN_AI_CLIENT_TOKEN_USAGE. + 'gen_ai.client.token.usage' + ``` + + + """ + + @spec gen_ai_client_token_usage :: :"gen_ai.client.token.usage" + def gen_ai_client_token_usage do + :"gen_ai.client.token.usage" + end + + @doc """ + Generative AI server request duration such as time-to-last byte or last output token + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_server_request_duration() + :"gen_ai.server.request.duration" + + ### Erlang + + ```erlang + ?GEN_AI_SERVER_REQUEST_DURATION. + 'gen_ai.server.request.duration' + ``` + + + """ + + @spec gen_ai_server_request_duration :: :"gen_ai.server.request.duration" + def gen_ai_server_request_duration do + :"gen_ai.server.request.duration" + end + + @doc """ + Time per output token generated after the first token for successful responses + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_server_time_per_output_token() + :"gen_ai.server.time_per_output_token" + + ### Erlang + + ```erlang + ?GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN. + 'gen_ai.server.time_per_output_token' + ``` + + + """ + + @spec gen_ai_server_time_per_output_token :: :"gen_ai.server.time_per_output_token" + def gen_ai_server_time_per_output_token do + :"gen_ai.server.time_per_output_token" + end + + @doc """ + Time to generate first token for successful responses + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_server_time_to_first_token() + :"gen_ai.server.time_to_first_token" + + ### Erlang + + ```erlang + ?GEN_AI_SERVER_TIME_TO_FIRST_TOKEN. + 'gen_ai.server.time_to_first_token' + ``` + + + """ + + @spec gen_ai_server_time_to_first_token :: :"gen_ai.server.time_to_first_token" + def gen_ai_server_time_to_first_token do + :"gen_ai.server.time_to_first_token" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/http_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/http_metrics.ex new file mode 100644 index 00000000..525b8079 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/http_metrics.ex @@ -0,0 +1,237 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for HTTP metrics. + """ + @doc """ + Number of active HTTP requests. + + Instrument: `updowncounter` + Unit: `{request}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_client_active_requests() + :"http.client.active_requests" + + ### Erlang + + ```erlang + ?HTTP_CLIENT_ACTIVE_REQUESTS. + 'http.client.active_requests' + ``` + + + """ + + @spec http_client_active_requests :: :"http.client.active_requests" + def http_client_active_requests do + :"http.client.active_requests" + end + + @doc """ + The duration of the successfully established outbound HTTP connections. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_client_connection_duration() + :"http.client.connection.duration" + + ### Erlang + + ```erlang + ?HTTP_CLIENT_CONNECTION_DURATION. + 'http.client.connection.duration' + ``` + + + """ + + @spec http_client_connection_duration :: :"http.client.connection.duration" + def http_client_connection_duration do + :"http.client.connection.duration" + end + + @doc """ + Number of outbound HTTP connections that are currently active or idle on the client. + + Instrument: `updowncounter` + Unit: `{connection}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_client_open_connections() + :"http.client.open_connections" + + ### Erlang + + ```erlang + ?HTTP_CLIENT_OPEN_CONNECTIONS. + 'http.client.open_connections' + ``` + + + """ + + @spec http_client_open_connections :: :"http.client.open_connections" + def http_client_open_connections do + :"http.client.open_connections" + end + + @doc """ + Size of HTTP client request bodies. + + Instrument: `histogram` + Unit: `By` + ### Notes + + The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_client_request_body_size() + :"http.client.request.body.size" + + ### Erlang + + ```erlang + ?HTTP_CLIENT_REQUEST_BODY_SIZE. + 'http.client.request.body.size' + ``` + + + """ + + @spec http_client_request_body_size :: :"http.client.request.body.size" + def http_client_request_body_size do + :"http.client.request.body.size" + end + + @doc """ + Size of HTTP client response bodies. + + Instrument: `histogram` + Unit: `By` + ### Notes + + The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_client_response_body_size() + :"http.client.response.body.size" + + ### Erlang + + ```erlang + ?HTTP_CLIENT_RESPONSE_BODY_SIZE. + 'http.client.response.body.size' + ``` + + + """ + + @spec http_client_response_body_size :: :"http.client.response.body.size" + def http_client_response_body_size do + :"http.client.response.body.size" + end + + @doc """ + Number of active HTTP server requests. + + Instrument: `updowncounter` + Unit: `{request}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_server_active_requests() + :"http.server.active_requests" + + ### Erlang + + ```erlang + ?HTTP_SERVER_ACTIVE_REQUESTS. + 'http.server.active_requests' + ``` + + + """ + + @spec http_server_active_requests :: :"http.server.active_requests" + def http_server_active_requests do + :"http.server.active_requests" + end + + @doc """ + Size of HTTP server request bodies. + + Instrument: `histogram` + Unit: `By` + ### Notes + + The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_server_request_body_size() + :"http.server.request.body.size" + + ### Erlang + + ```erlang + ?HTTP_SERVER_REQUEST_BODY_SIZE. + 'http.server.request.body.size' + ``` + + + """ + + @spec http_server_request_body_size :: :"http.server.request.body.size" + def http_server_request_body_size do + :"http.server.request.body.size" + end + + @doc """ + Size of HTTP server response bodies. + + Instrument: `histogram` + Unit: `By` + ### Notes + + The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_server_response_body_size() + :"http.server.response.body.size" + + ### Erlang + + ```erlang + ?HTTP_SERVER_RESPONSE_BODY_SIZE. + 'http.server.response.body.size' + ``` + + + """ + + @spec http_server_response_body_size :: :"http.server.response.body.size" + def http_server_response_body_size do + :"http.server.response.body.size" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/messaging_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/messaging_metrics.ex new file mode 100644 index 00000000..e672e67e --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/messaging_metrics.ex @@ -0,0 +1,175 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Messaging metrics. + """ + @doc """ + Number of messages that were delivered to the application. + + Instrument: `counter` + Unit: `{message}` + ### Notes + + Records the number of messages pulled from the broker or number of messages dispatched to the application in push-based scenarios. + The metric **SHOULD** be reported once per message delivery. For example, if receiving and processing operations are both instrumented for a single message delivery, this counter is incremented when the message is received and not reported when it is processed. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics.messaging_client_consumed_messages() + :"messaging.client.consumed.messages" + + ### Erlang + + ```erlang + ?MESSAGING_CLIENT_CONSUMED_MESSAGES. + 'messaging.client.consumed.messages' + ``` + + + """ + + @spec messaging_client_consumed_messages :: :"messaging.client.consumed.messages" + def messaging_client_consumed_messages do + :"messaging.client.consumed.messages" + end + + @doc """ + Duration of messaging operation initiated by a producer or consumer client. + + Instrument: `histogram` + Unit: `s` + ### Notes + + This metric **SHOULD** **NOT** be used to report processing duration - processing duration is reported in `messaging.process.duration` metric. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics.messaging_client_operation_duration() + :"messaging.client.operation.duration" + + ### Erlang + + ```erlang + ?MESSAGING_CLIENT_OPERATION_DURATION. + 'messaging.client.operation.duration' + ``` + + + """ + + @spec messaging_client_operation_duration :: :"messaging.client.operation.duration" + def messaging_client_operation_duration do + :"messaging.client.operation.duration" + end + + @doc """ + Number of messages producer attempted to publish to the broker. + + Instrument: `counter` + Unit: `{message}` + ### Notes + + This metric **MUST** **NOT** count messages that were created haven't yet been attempted to be published. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics.messaging_client_published_messages() + :"messaging.client.published.messages" + + ### Erlang + + ```erlang + ?MESSAGING_CLIENT_PUBLISHED_MESSAGES. + 'messaging.client.published.messages' + ``` + + + """ + + @spec messaging_client_published_messages :: :"messaging.client.published.messages" + def messaging_client_published_messages do + :"messaging.client.published.messages" + end + + @doc """ + Duration of processing operation. + + Instrument: `histogram` + Unit: `s` + ### Notes + + This metric **MUST** be reported for operations with `messaging.operation.type` that matches `process`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics.messaging_process_duration() + :"messaging.process.duration" + + ### Erlang + + ```erlang + ?MESSAGING_PROCESS_DURATION. + 'messaging.process.duration' + ``` + + + """ + + @spec messaging_process_duration :: :"messaging.process.duration" + def messaging_process_duration do + :"messaging.process.duration" + end + + @deprecated """ + Replaced by `messaging.client.consumed.messages`. + """ + + @spec messaging_process_messages :: :"messaging.process.messages" + def messaging_process_messages do + :"messaging.process.messages" + end + + @deprecated """ + Replaced by `messaging.client.operation.duration`. + """ + + @spec messaging_publish_duration :: :"messaging.publish.duration" + def messaging_publish_duration do + :"messaging.publish.duration" + end + + @deprecated """ + Replaced by `messaging.client.produced.messages`. + """ + + @spec messaging_publish_messages :: :"messaging.publish.messages" + def messaging_publish_messages do + :"messaging.publish.messages" + end + + @deprecated """ + Replaced by `messaging.client.operation.duration`. + """ + + @spec messaging_receive_duration :: :"messaging.receive.duration" + def messaging_receive_duration do + :"messaging.receive.duration" + end + + @deprecated """ + Replaced by `messaging.client.consumed.messages`. + """ + + @spec messaging_receive_messages :: :"messaging.receive.messages" + def messaging_receive_messages do + :"messaging.receive.messages" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/process_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/process_metrics.ex new file mode 100644 index 00000000..07b3f74d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/process_metrics.ex @@ -0,0 +1,275 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Process metrics. + """ + @doc """ + Number of times the process has been context switched. + + Instrument: `counter` + Unit: `{count}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_context_switches() + :"process.context_switches" + + ### Erlang + + ```erlang + ?PROCESS_CONTEXT_SWITCHES. + 'process.context_switches' + ``` + + + """ + + @spec process_context_switches :: :"process.context_switches" + def process_context_switches do + :"process.context_switches" + end + + @doc """ + Total CPU seconds broken down by different states. + + Instrument: `counter` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_cpu_time() + :"process.cpu.time" + + ### Erlang + + ```erlang + ?PROCESS_CPU_TIME. + 'process.cpu.time' + ``` + + + """ + + @spec process_cpu_time :: :"process.cpu.time" + def process_cpu_time do + :"process.cpu.time" + end + + @doc """ + Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_cpu_utilization() + :"process.cpu.utilization" + + ### Erlang + + ```erlang + ?PROCESS_CPU_UTILIZATION. + 'process.cpu.utilization' + ``` + + + """ + + @spec process_cpu_utilization :: :"process.cpu.utilization" + def process_cpu_utilization do + :"process.cpu.utilization" + end + + @doc """ + Disk bytes transferred. + + Instrument: `counter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_disk_io() + :"process.disk.io" + + ### Erlang + + ```erlang + ?PROCESS_DISK_IO. + 'process.disk.io' + ``` + + + """ + + @spec process_disk_io :: :"process.disk.io" + def process_disk_io do + :"process.disk.io" + end + + @doc """ + The amount of physical memory in use. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_memory_usage() + :"process.memory.usage" + + ### Erlang + + ```erlang + ?PROCESS_MEMORY_USAGE. + 'process.memory.usage' + ``` + + + """ + + @spec process_memory_usage :: :"process.memory.usage" + def process_memory_usage do + :"process.memory.usage" + end + + @doc """ + The amount of committed virtual memory. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_memory_virtual() + :"process.memory.virtual" + + ### Erlang + + ```erlang + ?PROCESS_MEMORY_VIRTUAL. + 'process.memory.virtual' + ``` + + + """ + + @spec process_memory_virtual :: :"process.memory.virtual" + def process_memory_virtual do + :"process.memory.virtual" + end + + @doc """ + Network bytes transferred. + + Instrument: `counter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_network_io() + :"process.network.io" + + ### Erlang + + ```erlang + ?PROCESS_NETWORK_IO. + 'process.network.io' + ``` + + + """ + + @spec process_network_io :: :"process.network.io" + def process_network_io do + :"process.network.io" + end + + @doc """ + Number of file descriptors in use by the process. + + Instrument: `updowncounter` + Unit: `{count}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_open_file_descriptor_count() + :"process.open_file_descriptor.count" + + ### Erlang + + ```erlang + ?PROCESS_OPEN_FILE_DESCRIPTOR_COUNT. + 'process.open_file_descriptor.count' + ``` + + + """ + + @spec process_open_file_descriptor_count :: :"process.open_file_descriptor.count" + def process_open_file_descriptor_count do + :"process.open_file_descriptor.count" + end + + @doc """ + Number of page faults the process has made. + + Instrument: `counter` + Unit: `{fault}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_paging_faults() + :"process.paging.faults" + + ### Erlang + + ```erlang + ?PROCESS_PAGING_FAULTS. + 'process.paging.faults' + ``` + + + """ + + @spec process_paging_faults :: :"process.paging.faults" + def process_paging_faults do + :"process.paging.faults" + end + + @doc """ + Process threads count. + + Instrument: `updowncounter` + Unit: `{thread}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_thread_count() + :"process.thread.count" + + ### Erlang + + ```erlang + ?PROCESS_THREAD_COUNT. + 'process.thread.count' + ``` + + + """ + + @spec process_thread_count :: :"process.thread.count" + def process_thread_count do + :"process.thread.count" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/rpc_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/rpc_metrics.ex new file mode 100644 index 00000000..5b7396f1 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/rpc_metrics.ex @@ -0,0 +1,329 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for RPC metrics. + """ + @doc """ + Measures the duration of outbound RPC. + + Instrument: `histogram` + Unit: `ms` + ### Notes + + While streaming RPCs may record this metric as start-of-batch + to end-of-batch, it's hard to interpret in practice. + + **Streaming**: N/A. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_duration() + :"rpc.client.duration" + + ### Erlang + + ```erlang + ?RPC_CLIENT_DURATION. + 'rpc.client.duration' + ``` + + + """ + + @spec rpc_client_duration :: :"rpc.client.duration" + def rpc_client_duration do + :"rpc.client.duration" + end + + @doc """ + Measures the size of RPC request messages (uncompressed). + + Instrument: `histogram` + Unit: `By` + ### Notes + + **Streaming**: Recorded per message in a streaming batch + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_request_size() + :"rpc.client.request.size" + + ### Erlang + + ```erlang + ?RPC_CLIENT_REQUEST_SIZE. + 'rpc.client.request.size' + ``` + + + """ + + @spec rpc_client_request_size :: :"rpc.client.request.size" + def rpc_client_request_size do + :"rpc.client.request.size" + end + + @doc """ + Measures the number of messages received per RPC. + + Instrument: `histogram` + Unit: `{count}` + ### Notes + + Should be 1 for all non-streaming RPCs. + + **Streaming**: This metric is required for server and client streaming RPCs + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_requests_per_rpc() + :"rpc.client.requests_per_rpc" + + ### Erlang + + ```erlang + ?RPC_CLIENT_REQUESTS_PER_RPC. + 'rpc.client.requests_per_rpc' + ``` + + + """ + + @spec rpc_client_requests_per_rpc :: :"rpc.client.requests_per_rpc" + def rpc_client_requests_per_rpc do + :"rpc.client.requests_per_rpc" + end + + @doc """ + Measures the size of RPC response messages (uncompressed). + + Instrument: `histogram` + Unit: `By` + ### Notes + + **Streaming**: Recorded per response in a streaming batch + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_response_size() + :"rpc.client.response.size" + + ### Erlang + + ```erlang + ?RPC_CLIENT_RESPONSE_SIZE. + 'rpc.client.response.size' + ``` + + + """ + + @spec rpc_client_response_size :: :"rpc.client.response.size" + def rpc_client_response_size do + :"rpc.client.response.size" + end + + @doc """ + Measures the number of messages sent per RPC. + + Instrument: `histogram` + Unit: `{count}` + ### Notes + + Should be 1 for all non-streaming RPCs. + + **Streaming**: This metric is required for server and client streaming RPCs + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_responses_per_rpc() + :"rpc.client.responses_per_rpc" + + ### Erlang + + ```erlang + ?RPC_CLIENT_RESPONSES_PER_RPC. + 'rpc.client.responses_per_rpc' + ``` + + + """ + + @spec rpc_client_responses_per_rpc :: :"rpc.client.responses_per_rpc" + def rpc_client_responses_per_rpc do + :"rpc.client.responses_per_rpc" + end + + @doc """ + Measures the duration of inbound RPC. + + Instrument: `histogram` + Unit: `ms` + ### Notes + + While streaming RPCs may record this metric as start-of-batch + to end-of-batch, it's hard to interpret in practice. + + **Streaming**: N/A. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_duration() + :"rpc.server.duration" + + ### Erlang + + ```erlang + ?RPC_SERVER_DURATION. + 'rpc.server.duration' + ``` + + + """ + + @spec rpc_server_duration :: :"rpc.server.duration" + def rpc_server_duration do + :"rpc.server.duration" + end + + @doc """ + Measures the size of RPC request messages (uncompressed). + + Instrument: `histogram` + Unit: `By` + ### Notes + + **Streaming**: Recorded per message in a streaming batch + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_request_size() + :"rpc.server.request.size" + + ### Erlang + + ```erlang + ?RPC_SERVER_REQUEST_SIZE. + 'rpc.server.request.size' + ``` + + + """ + + @spec rpc_server_request_size :: :"rpc.server.request.size" + def rpc_server_request_size do + :"rpc.server.request.size" + end + + @doc """ + Measures the number of messages received per RPC. + + Instrument: `histogram` + Unit: `{count}` + ### Notes + + Should be 1 for all non-streaming RPCs. + + **Streaming** : This metric is required for server and client streaming RPCs + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_requests_per_rpc() + :"rpc.server.requests_per_rpc" + + ### Erlang + + ```erlang + ?RPC_SERVER_REQUESTS_PER_RPC. + 'rpc.server.requests_per_rpc' + ``` + + + """ + + @spec rpc_server_requests_per_rpc :: :"rpc.server.requests_per_rpc" + def rpc_server_requests_per_rpc do + :"rpc.server.requests_per_rpc" + end + + @doc """ + Measures the size of RPC response messages (uncompressed). + + Instrument: `histogram` + Unit: `By` + ### Notes + + **Streaming**: Recorded per response in a streaming batch + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_response_size() + :"rpc.server.response.size" + + ### Erlang + + ```erlang + ?RPC_SERVER_RESPONSE_SIZE. + 'rpc.server.response.size' + ``` + + + """ + + @spec rpc_server_response_size :: :"rpc.server.response.size" + def rpc_server_response_size do + :"rpc.server.response.size" + end + + @doc """ + Measures the number of messages sent per RPC. + + Instrument: `histogram` + Unit: `{count}` + ### Notes + + Should be 1 for all non-streaming RPCs. + + **Streaming**: This metric is required for server and client streaming RPCs + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_responses_per_rpc() + :"rpc.server.responses_per_rpc" + + ### Erlang + + ```erlang + ?RPC_SERVER_RESPONSES_PER_RPC. + 'rpc.server.responses_per_rpc' + ``` + + + """ + + @spec rpc_server_responses_per_rpc :: :"rpc.server.responses_per_rpc" + def rpc_server_responses_per_rpc do + :"rpc.server.responses_per_rpc" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex new file mode 100644 index 00000000..0c5f0336 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex @@ -0,0 +1,848 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for System metrics. + """ + @doc """ + Reports the current frequency of the CPU in Hz + + Instrument: `gauge` + Unit: `{Hz}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_cpu_frequency() + :"system.cpu.frequency" + + ### Erlang + + ```erlang + ?SYSTEM_CPU_FREQUENCY. + 'system.cpu.frequency' + ``` + + + """ + + @spec system_cpu_frequency :: :"system.cpu.frequency" + def system_cpu_frequency do + :"system.cpu.frequency" + end + + @doc """ + Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking + + Instrument: `updowncounter` + Unit: `{cpu}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_cpu_logical_count() + :"system.cpu.logical.count" + + ### Erlang + + ```erlang + ?SYSTEM_CPU_LOGICAL_COUNT. + 'system.cpu.logical.count' + ``` + + + """ + + @spec system_cpu_logical_count :: :"system.cpu.logical.count" + def system_cpu_logical_count do + :"system.cpu.logical.count" + end + + @doc """ + Reports the number of actual physical processor cores on the hardware + + Instrument: `updowncounter` + Unit: `{cpu}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_cpu_physical_count() + :"system.cpu.physical.count" + + ### Erlang + + ```erlang + ?SYSTEM_CPU_PHYSICAL_COUNT. + 'system.cpu.physical.count' + ``` + + + """ + + @spec system_cpu_physical_count :: :"system.cpu.physical.count" + def system_cpu_physical_count do + :"system.cpu.physical.count" + end + + @doc """ + Seconds each logical CPU spent on each mode + + Instrument: `counter` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_cpu_time() + :"system.cpu.time" + + ### Erlang + + ```erlang + ?SYSTEM_CPU_TIME. + 'system.cpu.time' + ``` + + + """ + + @spec system_cpu_time :: :"system.cpu.time" + def system_cpu_time do + :"system.cpu.time" + end + + @doc """ + Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_cpu_utilization() + :"system.cpu.utilization" + + ### Erlang + + ```erlang + ?SYSTEM_CPU_UTILIZATION. + 'system.cpu.utilization' + ``` + + + """ + + @spec system_cpu_utilization :: :"system.cpu.utilization" + def system_cpu_utilization do + :"system.cpu.utilization" + end + + @doc """ + none + + Instrument: `counter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_disk_io() + :"system.disk.io" + + ### Erlang + + ```erlang + ?SYSTEM_DISK_IO. + 'system.disk.io' + ``` + + + """ + + @spec system_disk_io :: :"system.disk.io" + def system_disk_io do + :"system.disk.io" + end + + @doc """ + Time disk spent activated + + Instrument: `counter` + Unit: `s` + ### Notes + + The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not counted). Measured as: + + - Linux: Field 13 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats) + - Windows: The complement of + ["Disk\% Idle Time"](https://learn.microsoft.com/archive/blogs/askcore/windows-performance-monitor-disk-counters-explained#windows-performance-monitor-disk-counters-explained) + performance counter: `uptime * (100 - "Disk\% Idle Time") / 100` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_disk_io_time() + :"system.disk.io_time" + + ### Erlang + + ```erlang + ?SYSTEM_DISK_IO_TIME. + 'system.disk.io_time' + ``` + + + """ + + @spec system_disk_io_time :: :"system.disk.io_time" + def system_disk_io_time do + :"system.disk.io_time" + end + + @doc """ + none + + Instrument: `counter` + Unit: `{operation}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_disk_merged() + :"system.disk.merged" + + ### Erlang + + ```erlang + ?SYSTEM_DISK_MERGED. + 'system.disk.merged' + ``` + + + """ + + @spec system_disk_merged :: :"system.disk.merged" + def system_disk_merged do + :"system.disk.merged" + end + + @doc """ + Sum of the time each operation took to complete + + Instrument: `counter` + Unit: `s` + ### Notes + + Because it is the sum of time each request took, parallel-issued requests each contribute to make the count grow. Measured as: + + - Linux: Fields 7 & 11 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats) + - Windows: "Avg. Disk sec/Read" perf counter multiplied by "Disk Reads/sec" perf counter (similar for Writes) + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_disk_operation_time() + :"system.disk.operation_time" + + ### Erlang + + ```erlang + ?SYSTEM_DISK_OPERATION_TIME. + 'system.disk.operation_time' + ``` + + + """ + + @spec system_disk_operation_time :: :"system.disk.operation_time" + def system_disk_operation_time do + :"system.disk.operation_time" + end + + @doc """ + none + + Instrument: `counter` + Unit: `{operation}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_disk_operations() + :"system.disk.operations" + + ### Erlang + + ```erlang + ?SYSTEM_DISK_OPERATIONS. + 'system.disk.operations' + ``` + + + """ + + @spec system_disk_operations :: :"system.disk.operations" + def system_disk_operations do + :"system.disk.operations" + end + + @doc """ + none + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_filesystem_usage() + :"system.filesystem.usage" + + ### Erlang + + ```erlang + ?SYSTEM_FILESYSTEM_USAGE. + 'system.filesystem.usage' + ``` + + + """ + + @spec system_filesystem_usage :: :"system.filesystem.usage" + def system_filesystem_usage do + :"system.filesystem.usage" + end + + @doc """ + none + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_filesystem_utilization() + :"system.filesystem.utilization" + + ### Erlang + + ```erlang + ?SYSTEM_FILESYSTEM_UTILIZATION. + 'system.filesystem.utilization' + ``` + + + """ + + @spec system_filesystem_utilization :: :"system.filesystem.utilization" + def system_filesystem_utilization do + :"system.filesystem.utilization" + end + + @doc """ + An estimate of how much memory is available for starting new applications, without causing swapping + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This is an alternative to `system.memory.usage` metric with `state=free`. + Linux starting from 3.14 exports "available" memory. It takes "free" memory as a baseline, and then factors in kernel-specific values. + This is supposed to be more accurate than just "free" memory. + For reference, see the calculations [here](https://superuser.com/a/980821). + See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_linux_memory_available() + :"system.linux.memory.available" + + ### Erlang + + ```erlang + ?SYSTEM_LINUX_MEMORY_AVAILABLE. + 'system.linux.memory.available' + ``` + + + """ + + @spec system_linux_memory_available :: :"system.linux.memory.available" + def system_linux_memory_available do + :"system.linux.memory.available" + end + + @doc """ + Reports the memory used by the Linux kernel for managing caches of frequently used objects. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + The sum over the `reclaimable` and `unreclaimable` state values in `linux.memory.slab.usage` **SHOULD** be equal to the total slab memory available on the system. + Note that the total slab memory is not constant and may vary over time. + See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_linux_memory_slab_usage() + :"system.linux.memory.slab.usage" + + ### Erlang + + ```erlang + ?SYSTEM_LINUX_MEMORY_SLAB_USAGE. + 'system.linux.memory.slab.usage' + ``` + + + """ + + @spec system_linux_memory_slab_usage :: :"system.linux.memory.slab.usage" + def system_linux_memory_slab_usage do + :"system.linux.memory.slab.usage" + end + + @doc """ + Total memory available in the system. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + Its value **SHOULD** equal the sum of `system.memory.state` over all states. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_limit() + :"system.memory.limit" + + ### Erlang + + ```erlang + ?SYSTEM_MEMORY_LIMIT. + 'system.memory.limit' + ``` + + + """ + + @spec system_memory_limit :: :"system.memory.limit" + def system_memory_limit do + :"system.memory.limit" + end + + @doc """ + Shared memory used (mostly by tmpfs). + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + Equivalent of `shared` from [`free` command](https://man7.org/linux/man-pages/man1/free.1.html) or + `Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)" + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_shared() + :"system.memory.shared" + + ### Erlang + + ```erlang + ?SYSTEM_MEMORY_SHARED. + 'system.memory.shared' + ``` + + + """ + + @spec system_memory_shared :: :"system.memory.shared" + def system_memory_shared do + :"system.memory.shared" + end + + @doc """ + Reports memory in use by state. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + The sum over all `system.memory.state` values **SHOULD** equal the total memory + available on the system, that is `system.memory.limit`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_usage() + :"system.memory.usage" + + ### Erlang + + ```erlang + ?SYSTEM_MEMORY_USAGE. + 'system.memory.usage' + ``` + + + """ + + @spec system_memory_usage :: :"system.memory.usage" + def system_memory_usage do + :"system.memory.usage" + end + + @doc """ + none + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_utilization() + :"system.memory.utilization" + + ### Erlang + + ```erlang + ?SYSTEM_MEMORY_UTILIZATION. + 'system.memory.utilization' + ``` + + + """ + + @spec system_memory_utilization :: :"system.memory.utilization" + def system_memory_utilization do + :"system.memory.utilization" + end + + @doc """ + none + + Instrument: `updowncounter` + Unit: `{connection}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_connections() + :"system.network.connections" + + ### Erlang + + ```erlang + ?SYSTEM_NETWORK_CONNECTIONS. + 'system.network.connections' + ``` + + + """ + + @spec system_network_connections :: :"system.network.connections" + def system_network_connections do + :"system.network.connections" + end + + @doc """ + Count of packets that are dropped or discarded even though there was no error + + Instrument: `counter` + Unit: `{packet}` + ### Notes + + Measured as: + + - Linux: the `drop` column in `/proc/dev/net` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)) + - Windows: [`InDiscards`/`OutDiscards`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) + from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2) + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_dropped() + :"system.network.dropped" + + ### Erlang + + ```erlang + ?SYSTEM_NETWORK_DROPPED. + 'system.network.dropped' + ``` + + + """ + + @spec system_network_dropped :: :"system.network.dropped" + def system_network_dropped do + :"system.network.dropped" + end + + @doc """ + Count of network errors detected + + Instrument: `counter` + Unit: `{error}` + ### Notes + + Measured as: + + - Linux: the `errs` column in `/proc/dev/net` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)). + - Windows: [`InErrors`/`OutErrors`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) + from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_errors() + :"system.network.errors" + + ### Erlang + + ```erlang + ?SYSTEM_NETWORK_ERRORS. + 'system.network.errors' + ``` + + + """ + + @spec system_network_errors :: :"system.network.errors" + def system_network_errors do + :"system.network.errors" + end + + @doc """ + none + + Instrument: `counter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_io() + :"system.network.io" + + ### Erlang + + ```erlang + ?SYSTEM_NETWORK_IO. + 'system.network.io' + ``` + + + """ + + @spec system_network_io :: :"system.network.io" + def system_network_io do + :"system.network.io" + end + + @doc """ + none + + Instrument: `counter` + Unit: `{packet}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_packets() + :"system.network.packets" + + ### Erlang + + ```erlang + ?SYSTEM_NETWORK_PACKETS. + 'system.network.packets' + ``` + + + """ + + @spec system_network_packets :: :"system.network.packets" + def system_network_packets do + :"system.network.packets" + end + + @doc """ + none + + Instrument: `counter` + Unit: `{fault}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_paging_faults() + :"system.paging.faults" + + ### Erlang + + ```erlang + ?SYSTEM_PAGING_FAULTS. + 'system.paging.faults' + ``` + + + """ + + @spec system_paging_faults :: :"system.paging.faults" + def system_paging_faults do + :"system.paging.faults" + end + + @doc """ + none + + Instrument: `counter` + Unit: `{operation}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_paging_operations() + :"system.paging.operations" + + ### Erlang + + ```erlang + ?SYSTEM_PAGING_OPERATIONS. + 'system.paging.operations' + ``` + + + """ + + @spec system_paging_operations :: :"system.paging.operations" + def system_paging_operations do + :"system.paging.operations" + end + + @doc """ + Unix swap or windows pagefile usage + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_paging_usage() + :"system.paging.usage" + + ### Erlang + + ```erlang + ?SYSTEM_PAGING_USAGE. + 'system.paging.usage' + ``` + + + """ + + @spec system_paging_usage :: :"system.paging.usage" + def system_paging_usage do + :"system.paging.usage" + end + + @doc """ + none + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_paging_utilization() + :"system.paging.utilization" + + ### Erlang + + ```erlang + ?SYSTEM_PAGING_UTILIZATION. + 'system.paging.utilization' + ``` + + + """ + + @spec system_paging_utilization :: :"system.paging.utilization" + def system_paging_utilization do + :"system.paging.utilization" + end + + @doc """ + Total number of processes in each state + + Instrument: `updowncounter` + Unit: `{process}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_process_count() + :"system.process.count" + + ### Erlang + + ```erlang + ?SYSTEM_PROCESS_COUNT. + 'system.process.count' + ``` + + + """ + + @spec system_process_count :: :"system.process.count" + def system_process_count do + :"system.process.count" + end + + @doc """ + Total number of processes created over uptime of the host + + Instrument: `counter` + Unit: `{process}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_process_created() + :"system.process.created" + + ### Erlang + + ```erlang + ?SYSTEM_PROCESS_CREATED. + 'system.process.created' + ``` + + + """ + + @spec system_process_created :: :"system.process.created" + def system_process_created do + :"system.process.created" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/metrics/http_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/metrics/http_metrics.ex new file mode 100644 index 00000000..d2e8f13b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/metrics/http_metrics.ex @@ -0,0 +1,59 @@ +defmodule OpenTelemetry.SemConv.Metrics.HTTPMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for HTTP metrics. + """ + @doc """ + Duration of HTTP client requests. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Metrics.HTTPMetrics.http_client_request_duration() + :"http.client.request.duration" + + ### Erlang + + ```erlang + ?HTTP_CLIENT_REQUEST_DURATION. + 'http.client.request.duration' + ``` + + + """ + + @spec http_client_request_duration :: :"http.client.request.duration" + def http_client_request_duration do + :"http.client.request.duration" + end + + @doc """ + Duration of HTTP server requests. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Metrics.HTTPMetrics.http_server_request_duration() + :"http.server.request.duration" + + ### Erlang + + ```erlang + ?HTTP_SERVER_REQUEST_DURATION. + 'http.server.request.duration' + ``` + + + """ + + @spec http_server_request_duration :: :"http.server.request.duration" + def http_server_request_duration do + :"http.server.request.duration" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/logs.ex b/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/logs.ex index e15c8af2..bf3c4f36 100644 --- a/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/logs.ex +++ b/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/logs.ex @@ -1,38 +1,24 @@ defmodule OpenTelemetry.SemanticConventions.Logs do - @doc """ - The schema url for telemetry resources. - - iex> OpenTelemetry.SemanticConventions.Logs.logs_schema_url() - "https://opentelemetry.io/schemas/1.13.0" + @moduledoc """ + WARNING: This module is deprecated and will be removed in a future release. + Migrate to >= v1.27.0 semantic conventions. """ + + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec logs_schema_url :: String.t() def logs_schema_url do "https://opentelemetry.io/schemas/1.13.0" end - @doc """ - The name identifies the event - iex> OpenTelemetry.SemanticConventions.Logs.event_name() - :"event.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec event_name :: :"event.name" def event_name do :"event.name" end - @doc """ - The domain identifies the context in which an event happened. An event name is unique only within a domain - ### Notes - - An `event.name` is supposed to be unique only in the context of an - `event.domain`, so this allows for two events in different domains to - have same `event.name`, yet be unrelated events - - iex> OpenTelemetry.SemanticConventions.Logs.event_domain() - :"event.domain" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec event_domain :: :"event.domain" def event_domain do :"event.domain" end -end \ No newline at end of file +end diff --git a/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/resource.ex b/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/resource.ex index 5734e518..e150f1e5 100644 --- a/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/resource.ex +++ b/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/resource.ex @@ -1,1005 +1,534 @@ defmodule OpenTelemetry.SemanticConventions.Resource do - @doc """ - The schema url for telemetry resources. - - iex> OpenTelemetry.SemanticConventions.Resource.resource_schema_url() - "https://opentelemetry.io/schemas/1.13.0" + @moduledoc """ + WARNING: This module is deprecated and will be removed in a future release. + Migrate to >= v1.27.0 semantic conventions. """ + + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec resource_schema_url :: String.t() def resource_schema_url do "https://opentelemetry.io/schemas/1.13.0" end - @doc """ - Array of brand name and version separated by a space - - ### Notes - This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (navigator.userAgentData.brands) - - iex> OpenTelemetry.SemanticConventions.Resource.browser_brands() - :"browser.brands" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec browser_brands :: :"browser.brands" def browser_brands do :"browser.brands" end - @doc """ - The platform on which the browser is running - ### Notes - - This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (navigator.userAgentData.platform). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent. - The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [os.type and os.name attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides - - iex> OpenTelemetry.SemanticConventions.Resource.browser_platform() - :"browser.platform" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec browser_platform :: :"browser.platform" def browser_platform do :"browser.platform" end - @doc """ - Full user-agent string provided by the browser - - ### Notes - The user-agent value SHOULD be provided only from browsers that do not have a mechanism to retrieve brands and platform individually from the User-Agent Client Hints API. To retrieve the value, the legacy `navigator.userAgent` API can be used - - iex> OpenTelemetry.SemanticConventions.Resource.browser_user_agent() - :"browser.user_agent" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec browser_user_agent :: :"browser.user_agent" def browser_user_agent do :"browser.user_agent" end - @doc """ - Name of the cloud provider - iex> OpenTelemetry.SemanticConventions.Resource.cloud_provider() - :"cloud.provider" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloud_provider :: :"cloud.provider" def cloud_provider do :"cloud.provider" end - @doc """ - The cloud account ID the resource is assigned to - iex> OpenTelemetry.SemanticConventions.Resource.cloud_account_id() - :"cloud.account.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloud_account_id :: :"cloud.account.id" def cloud_account_id do :"cloud.account.id" end - @doc """ - The geographical region the resource is running - ### Notes - - Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://intl.cloud.tencent.com/document/product/213/6091) - - iex> OpenTelemetry.SemanticConventions.Resource.cloud_region() - :"cloud.region" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloud_region :: :"cloud.region" def cloud_region do :"cloud.region" end - @doc """ - Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running - - ### Notes - Availability zones are called "zones" on Alibaba Cloud and Google Cloud - - iex> OpenTelemetry.SemanticConventions.Resource.cloud_availability_zone() - :"cloud.availability_zone" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloud_availability_zone :: :"cloud.availability_zone" def cloud_availability_zone do :"cloud.availability_zone" end - @doc """ - The cloud platform in use - - ### Notes - - The prefix of the service SHOULD match the one specified in `cloud.provider` - iex> OpenTelemetry.SemanticConventions.Resource.cloud_platform() - :"cloud.platform" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloud_platform :: :"cloud.platform" def cloud_platform do :"cloud.platform" end - @doc """ - The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html) - iex> OpenTelemetry.SemanticConventions.Resource.aws_ecs_container_arn() - :"aws.ecs.container.arn" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_ecs_container_arn :: :"aws.ecs.container.arn" def aws_ecs_container_arn do :"aws.ecs.container.arn" end - @doc """ - The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html) - iex> OpenTelemetry.SemanticConventions.Resource.aws_ecs_cluster_arn() - :"aws.ecs.cluster.arn" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_ecs_cluster_arn :: :"aws.ecs.cluster.arn" def aws_ecs_cluster_arn do :"aws.ecs.cluster.arn" end - @doc """ - The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task - iex> OpenTelemetry.SemanticConventions.Resource.aws_ecs_launchtype() - :"aws.ecs.launchtype" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_ecs_launchtype :: :"aws.ecs.launchtype" def aws_ecs_launchtype do :"aws.ecs.launchtype" end - @doc """ - The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) - iex> OpenTelemetry.SemanticConventions.Resource.aws_ecs_task_arn() - :"aws.ecs.task.arn" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_ecs_task_arn :: :"aws.ecs.task.arn" def aws_ecs_task_arn do :"aws.ecs.task.arn" end - @doc """ - The task definition family this task definition is a member of - iex> OpenTelemetry.SemanticConventions.Resource.aws_ecs_task_family() - :"aws.ecs.task.family" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_ecs_task_family :: :"aws.ecs.task.family" def aws_ecs_task_family do :"aws.ecs.task.family" end - @doc """ - The revision for this task definition - iex> OpenTelemetry.SemanticConventions.Resource.aws_ecs_task_revision() - :"aws.ecs.task.revision" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_ecs_task_revision :: :"aws.ecs.task.revision" def aws_ecs_task_revision do :"aws.ecs.task.revision" end - @doc """ - The ARN of an EKS cluster - iex> OpenTelemetry.SemanticConventions.Resource.aws_eks_cluster_arn() - :"aws.eks.cluster.arn" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_eks_cluster_arn :: :"aws.eks.cluster.arn" def aws_eks_cluster_arn do :"aws.eks.cluster.arn" end - @doc """ - The name(s) of the AWS log group(s) an application is writing to - ### Notes - - Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group - - iex> OpenTelemetry.SemanticConventions.Resource.aws_log_group_names() - :"aws.log.group.names" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_log_group_names :: :"aws.log.group.names" def aws_log_group_names do :"aws.log.group.names" end - @doc """ - The Amazon Resource Name(s) (ARN) of the AWS log group(s) - - ### Notes - See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format) - - iex> OpenTelemetry.SemanticConventions.Resource.aws_log_group_arns() - :"aws.log.group.arns" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_log_group_arns :: :"aws.log.group.arns" def aws_log_group_arns do :"aws.log.group.arns" end - @doc """ - The name(s) of the AWS log stream(s) an application is writing to - iex> OpenTelemetry.SemanticConventions.Resource.aws_log_stream_names() - :"aws.log.stream.names" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_log_stream_names :: :"aws.log.stream.names" def aws_log_stream_names do :"aws.log.stream.names" end - @doc """ - The ARN(s) of the AWS log stream(s) - - ### Notes - See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream - - iex> OpenTelemetry.SemanticConventions.Resource.aws_log_stream_arns() - :"aws.log.stream.arns" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_log_stream_arns :: :"aws.log.stream.arns" def aws_log_stream_arns do :"aws.log.stream.arns" end - @doc """ - Container name used by container runtime - iex> OpenTelemetry.SemanticConventions.Resource.container_name() - :"container.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec container_name :: :"container.name" def container_name do :"container.name" end - @doc """ - Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated - iex> OpenTelemetry.SemanticConventions.Resource.container_id() - :"container.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec container_id :: :"container.id" def container_id do :"container.id" end - @doc """ - The container runtime managing this container - iex> OpenTelemetry.SemanticConventions.Resource.container_runtime() - :"container.runtime" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec container_runtime :: :"container.runtime" def container_runtime do :"container.runtime" end - @doc """ - Name of the image the container was built on - iex> OpenTelemetry.SemanticConventions.Resource.container_image_name() - :"container.image.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec container_image_name :: :"container.image.name" def container_image_name do :"container.image.name" end - @doc """ - Container image tag - iex> OpenTelemetry.SemanticConventions.Resource.container_image_tag() - :"container.image.tag" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec container_image_tag :: :"container.image.tag" def container_image_tag do :"container.image.tag" end - @doc """ - Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier) - iex> OpenTelemetry.SemanticConventions.Resource.deployment_environment() - :"deployment.environment" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec deployment_environment :: :"deployment.environment" def deployment_environment do :"deployment.environment" end - @doc """ - A unique identifier representing the device - ### Notes - - The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence - - iex> OpenTelemetry.SemanticConventions.Resource.device_id() - :"device.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec device_id :: :"device.id" def device_id do :"device.id" end - @doc """ - The model identifier for the device - - ### Notes - It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device - - iex> OpenTelemetry.SemanticConventions.Resource.device_model_identifier() - :"device.model.identifier" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec device_model_identifier :: :"device.model.identifier" def device_model_identifier do :"device.model.identifier" end - @doc """ - The marketing name for the device model - - ### Notes - - It's recommended this value represents a human readable version of the device model rather than a machine readable alternative - iex> OpenTelemetry.SemanticConventions.Resource.device_model_name() - :"device.model.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec device_model_name :: :"device.model.name" def device_model_name do :"device.model.name" end - @doc """ - The name of the device manufacturer - - ### Notes - The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple` - - iex> OpenTelemetry.SemanticConventions.Resource.device_manufacturer() - :"device.manufacturer" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec device_manufacturer :: :"device.manufacturer" def device_manufacturer do :"device.manufacturer" end - @doc """ - The name of the single function that this runtime instance executes - - ### Notes - - This is the name of the function as configured/deployed on the FaaS - platform and is usually different from the name of the callback - function (which may be stored in the - [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) - span attributes). - - For some cloud providers, the above definition is ambiguous. The following - definition of function name MUST be used for this attribute - (and consequently the span name) for the listed cloud providers/products: - - * **Azure:** The full name `/`, i.e., function app name - followed by a forward slash followed by the function name (this form - can also be seen in the resource JSON for the function). - This means that a span attribute MUST be used, as an Azure function - app can host multiple functions that would usually share - a TracerProvider (see also the `faas.id` attribute) - - iex> OpenTelemetry.SemanticConventions.Resource.faas_name() - :"faas.name" - """ + + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_name :: :"faas.name" def faas_name do :"faas.name" end - @doc """ - The unique ID of the single function that this runtime instance executes - - ### Notes - - On some cloud providers, it may not be possible to determine the full ID at startup, - so consider setting `faas.id` as a span attribute instead. - - The exact value to use for `faas.id` depends on the cloud provider: - - * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - Take care not to use the "invoked ARN" directly but replace any - [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) - with the resolved function version, as the same runtime instance may be invocable with - multiple different aliases. - * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) - * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) of the invoked function, - *not* the function app, having the form - `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. - This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share - a TracerProvider - - iex> OpenTelemetry.SemanticConventions.Resource.faas_id() - :"faas.id" - """ + + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_id :: :"faas.id" def faas_id do :"faas.id" end - @doc """ - The immutable version of the function being executed - ### Notes - - Depending on the cloud provider and platform, use: - - * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - (an integer represented as a decimal string). - * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) - (i.e., the function name plus the revision suffix). - * **Google Cloud Functions:** The value of the - [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * **Azure Functions:** Not applicable. Do not set this attribute - - iex> OpenTelemetry.SemanticConventions.Resource.faas_version() - :"faas.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_version :: :"faas.version" def faas_version do :"faas.version" end - @doc """ - The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version - - ### Notes - * **AWS Lambda:** Use the (full) log stream name - - iex> OpenTelemetry.SemanticConventions.Resource.faas_instance() - :"faas.instance" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_instance :: :"faas.instance" def faas_instance do :"faas.instance" end - @doc """ - The amount of memory available to the serverless function in MiB - - ### Notes - - It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information - iex> OpenTelemetry.SemanticConventions.Resource.faas_max_memory() - :"faas.max_memory" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_max_memory :: :"faas.max_memory" def faas_max_memory do :"faas.max_memory" end - @doc """ - Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider - iex> OpenTelemetry.SemanticConventions.Resource.host_id() - :"host.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec host_id :: :"host.id" def host_id do :"host.id" end - @doc """ - Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user - iex> OpenTelemetry.SemanticConventions.Resource.host_name() - :"host.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec host_name :: :"host.name" def host_name do :"host.name" end - @doc """ - Type of host. For Cloud, this must be the machine type - iex> OpenTelemetry.SemanticConventions.Resource.host_type() - :"host.type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec host_type :: :"host.type" def host_type do :"host.type" end - @doc """ - The CPU architecture the host system is running on - iex> OpenTelemetry.SemanticConventions.Resource.host_arch() - :"host.arch" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec host_arch :: :"host.arch" def host_arch do :"host.arch" end - @doc """ - Name of the VM image or OS install the host was instantiated from - iex> OpenTelemetry.SemanticConventions.Resource.host_image_name() - :"host.image.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec host_image_name :: :"host.image.name" def host_image_name do :"host.image.name" end - @doc """ - VM image ID. For Cloud, this value is from the provider - iex> OpenTelemetry.SemanticConventions.Resource.host_image_id() - :"host.image.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec host_image_id :: :"host.image.id" def host_image_id do :"host.image.id" end - @doc """ - The version string of the VM image as defined in [Version Attributes](README.md#version-attributes) - iex> OpenTelemetry.SemanticConventions.Resource.host_image_version() - :"host.image.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec host_image_version :: :"host.image.version" def host_image_version do :"host.image.version" end - @doc """ - The name of the cluster - iex> OpenTelemetry.SemanticConventions.Resource.k8s_cluster_name() - :"k8s.cluster.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_cluster_name :: :"k8s.cluster.name" def k8s_cluster_name do :"k8s.cluster.name" end - @doc """ - The name of the Node - iex> OpenTelemetry.SemanticConventions.Resource.k8s_node_name() - :"k8s.node.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_node_name :: :"k8s.node.name" def k8s_node_name do :"k8s.node.name" end - @doc """ - The UID of the Node - iex> OpenTelemetry.SemanticConventions.Resource.k8s_node_uid() - :"k8s.node.uid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_node_uid :: :"k8s.node.uid" def k8s_node_uid do :"k8s.node.uid" end - @doc """ - The name of the namespace that the pod is running in - iex> OpenTelemetry.SemanticConventions.Resource.k8s_namespace_name() - :"k8s.namespace.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_namespace_name :: :"k8s.namespace.name" def k8s_namespace_name do :"k8s.namespace.name" end - @doc """ - The UID of the Pod - iex> OpenTelemetry.SemanticConventions.Resource.k8s_pod_uid() - :"k8s.pod.uid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_pod_uid :: :"k8s.pod.uid" def k8s_pod_uid do :"k8s.pod.uid" end - @doc """ - The name of the Pod - iex> OpenTelemetry.SemanticConventions.Resource.k8s_pod_name() - :"k8s.pod.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_pod_name :: :"k8s.pod.name" def k8s_pod_name do :"k8s.pod.name" end - @doc """ - The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`) - iex> OpenTelemetry.SemanticConventions.Resource.k8s_container_name() - :"k8s.container.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_container_name :: :"k8s.container.name" def k8s_container_name do :"k8s.container.name" end - @doc """ - Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec - iex> OpenTelemetry.SemanticConventions.Resource.k8s_container_restart_count() - :"k8s.container.restart_count" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_container_restart_count :: :"k8s.container.restart_count" def k8s_container_restart_count do :"k8s.container.restart_count" end - @doc """ - The UID of the ReplicaSet - iex> OpenTelemetry.SemanticConventions.Resource.k8s_replicaset_uid() - :"k8s.replicaset.uid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_replicaset_uid :: :"k8s.replicaset.uid" def k8s_replicaset_uid do :"k8s.replicaset.uid" end - @doc """ - The name of the ReplicaSet - iex> OpenTelemetry.SemanticConventions.Resource.k8s_replicaset_name() - :"k8s.replicaset.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_replicaset_name :: :"k8s.replicaset.name" def k8s_replicaset_name do :"k8s.replicaset.name" end - @doc """ - The UID of the Deployment - iex> OpenTelemetry.SemanticConventions.Resource.k8s_deployment_uid() - :"k8s.deployment.uid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_deployment_uid :: :"k8s.deployment.uid" def k8s_deployment_uid do :"k8s.deployment.uid" end - @doc """ - The name of the Deployment - iex> OpenTelemetry.SemanticConventions.Resource.k8s_deployment_name() - :"k8s.deployment.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_deployment_name :: :"k8s.deployment.name" def k8s_deployment_name do :"k8s.deployment.name" end - @doc """ - The UID of the StatefulSet - iex> OpenTelemetry.SemanticConventions.Resource.k8s_statefulset_uid() - :"k8s.statefulset.uid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_statefulset_uid :: :"k8s.statefulset.uid" def k8s_statefulset_uid do :"k8s.statefulset.uid" end - @doc """ - The name of the StatefulSet - iex> OpenTelemetry.SemanticConventions.Resource.k8s_statefulset_name() - :"k8s.statefulset.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_statefulset_name :: :"k8s.statefulset.name" def k8s_statefulset_name do :"k8s.statefulset.name" end - @doc """ - The UID of the DaemonSet - iex> OpenTelemetry.SemanticConventions.Resource.k8s_daemonset_uid() - :"k8s.daemonset.uid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_daemonset_uid :: :"k8s.daemonset.uid" def k8s_daemonset_uid do :"k8s.daemonset.uid" end - @doc """ - The name of the DaemonSet - iex> OpenTelemetry.SemanticConventions.Resource.k8s_daemonset_name() - :"k8s.daemonset.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_daemonset_name :: :"k8s.daemonset.name" def k8s_daemonset_name do :"k8s.daemonset.name" end - @doc """ - The UID of the Job - iex> OpenTelemetry.SemanticConventions.Resource.k8s_job_uid() - :"k8s.job.uid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_job_uid :: :"k8s.job.uid" def k8s_job_uid do :"k8s.job.uid" end - @doc """ - The name of the Job - iex> OpenTelemetry.SemanticConventions.Resource.k8s_job_name() - :"k8s.job.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_job_name :: :"k8s.job.name" def k8s_job_name do :"k8s.job.name" end - @doc """ - The UID of the CronJob - iex> OpenTelemetry.SemanticConventions.Resource.k8s_cronjob_uid() - :"k8s.cronjob.uid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_cronjob_uid :: :"k8s.cronjob.uid" def k8s_cronjob_uid do :"k8s.cronjob.uid" end - @doc """ - The name of the CronJob - iex> OpenTelemetry.SemanticConventions.Resource.k8s_cronjob_name() - :"k8s.cronjob.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec k8s_cronjob_name :: :"k8s.cronjob.name" def k8s_cronjob_name do :"k8s.cronjob.name" end - @doc """ - The operating system type - iex> OpenTelemetry.SemanticConventions.Resource.os_type() - :"os.type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec os_type :: :"os.type" def os_type do :"os.type" end - @doc """ - Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands - iex> OpenTelemetry.SemanticConventions.Resource.os_description() - :"os.description" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec os_description :: :"os.description" def os_description do :"os.description" end - @doc """ - Human readable operating system name - iex> OpenTelemetry.SemanticConventions.Resource.os_name() - :"os.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec os_name :: :"os.name" def os_name do :"os.name" end - @doc """ - The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes) - iex> OpenTelemetry.SemanticConventions.Resource.os_version() - :"os.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec os_version :: :"os.version" def os_version do :"os.version" end - @doc """ - Process identifier (PID) - iex> OpenTelemetry.SemanticConventions.Resource.process_pid() - :"process.pid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_pid :: :"process.pid" def process_pid do :"process.pid" end - @doc """ - Parent Process identifier (PID) - iex> OpenTelemetry.SemanticConventions.Resource.process_parent_pid() - :"process.parent_pid" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_parent_pid :: :"process.parent_pid" def process_parent_pid do :"process.parent_pid" end - @doc """ - The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW` - iex> OpenTelemetry.SemanticConventions.Resource.process_executable_name() - :"process.executable.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_executable_name :: :"process.executable.name" def process_executable_name do :"process.executable.name" end - @doc """ - The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW` - iex> OpenTelemetry.SemanticConventions.Resource.process_executable_path() - :"process.executable.path" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_executable_path :: :"process.executable.path" def process_executable_path do :"process.executable.path" end - @doc """ - The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW` - iex> OpenTelemetry.SemanticConventions.Resource.process_command() - :"process.command" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_command :: :"process.command" def process_command do :"process.command" end - @doc """ - The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead - iex> OpenTelemetry.SemanticConventions.Resource.process_command_line() - :"process.command_line" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_command_line :: :"process.command_line" def process_command_line do :"process.command_line" end - @doc """ - All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main` - iex> OpenTelemetry.SemanticConventions.Resource.process_command_args() - :"process.command_args" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_command_args :: :"process.command_args" def process_command_args do :"process.command_args" end - @doc """ - The username of the user that owns the process - iex> OpenTelemetry.SemanticConventions.Resource.process_owner() - :"process.owner" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_owner :: :"process.owner" def process_owner do :"process.owner" end - @doc """ - The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler - iex> OpenTelemetry.SemanticConventions.Resource.process_runtime_name() - :"process.runtime.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_runtime_name :: :"process.runtime.name" def process_runtime_name do :"process.runtime.name" end - @doc """ - The version of the runtime of this process, as returned by the runtime without modification - iex> OpenTelemetry.SemanticConventions.Resource.process_runtime_version() - :"process.runtime.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_runtime_version :: :"process.runtime.version" def process_runtime_version do :"process.runtime.version" end - @doc """ - An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment - iex> OpenTelemetry.SemanticConventions.Resource.process_runtime_description() - :"process.runtime.description" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec process_runtime_description :: :"process.runtime.description" def process_runtime_description do :"process.runtime.description" end - @doc """ - Logical name of the service - - ### Notes - MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service` - - iex> OpenTelemetry.SemanticConventions.Resource.service_name() - :"service.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec service_name :: :"service.name" def service_name do :"service.name" end - @doc """ - A namespace for `service.name` - - ### Notes - - A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace - iex> OpenTelemetry.SemanticConventions.Resource.service_namespace() - :"service.namespace" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec service_namespace :: :"service.namespace" def service_namespace do :"service.namespace" end - @doc """ - The string ID of the service instance - - ### Notes - MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations) - - iex> OpenTelemetry.SemanticConventions.Resource.service_instance_id() - :"service.instance.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec service_instance_id :: :"service.instance.id" def service_instance_id do :"service.instance.id" end - @doc """ - The version string of the service API or implementation - iex> OpenTelemetry.SemanticConventions.Resource.service_version() - :"service.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec service_version :: :"service.version" def service_version do :"service.version" end - @doc """ - The name of the telemetry SDK as defined above - iex> OpenTelemetry.SemanticConventions.Resource.telemetry_sdk_name() - :"telemetry.sdk.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec telemetry_sdk_name :: :"telemetry.sdk.name" def telemetry_sdk_name do :"telemetry.sdk.name" end - @doc """ - The language of the telemetry SDK - iex> OpenTelemetry.SemanticConventions.Resource.telemetry_sdk_language() - :"telemetry.sdk.language" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec telemetry_sdk_language :: :"telemetry.sdk.language" def telemetry_sdk_language do :"telemetry.sdk.language" end - @doc """ - The version string of the telemetry SDK - iex> OpenTelemetry.SemanticConventions.Resource.telemetry_sdk_version() - :"telemetry.sdk.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec telemetry_sdk_version :: :"telemetry.sdk.version" def telemetry_sdk_version do :"telemetry.sdk.version" end - @doc """ - The version string of the auto instrumentation agent, if used - iex> OpenTelemetry.SemanticConventions.Resource.telemetry_auto_version() - :"telemetry.auto.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec telemetry_auto_version :: :"telemetry.auto.version" def telemetry_auto_version do :"telemetry.auto.version" end - @doc """ - The name of the web engine - iex> OpenTelemetry.SemanticConventions.Resource.webengine_name() - :"webengine.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec webengine_name :: :"webengine.name" def webengine_name do :"webengine.name" end - @doc """ - The version of the web engine - iex> OpenTelemetry.SemanticConventions.Resource.webengine_version() - :"webengine.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec webengine_version :: :"webengine.version" def webengine_version do :"webengine.version" end - @doc """ - Additional description of the web engine (e.g. detailed version and edition information) - iex> OpenTelemetry.SemanticConventions.Resource.webengine_description() - :"webengine.description" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec webengine_description :: :"webengine.description" def webengine_description do :"webengine.description" end -end \ No newline at end of file +end diff --git a/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/trace.ex b/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/trace.ex index d15d8c25..e2542108 100644 --- a/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/trace.ex +++ b/apps/opentelemetry_semantic_conventions/lib/open_telemetry/semantic_conventions/trace.ex @@ -1,1612 +1,884 @@ defmodule OpenTelemetry.SemanticConventions.Trace do - @doc """ - The schema url for telemetry resources. - - iex> OpenTelemetry.SemanticConventions.Trace.trace_schema_url() - "https://opentelemetry.io/schemas/1.13.0" + @moduledoc """ + WARNING: This module is deprecated and will be removed in a future release. + Migrate to >= v1.27.0 semantic conventions. """ + + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec trace_schema_url :: String.t() def trace_schema_url do "https://opentelemetry.io/schemas/1.13.0" end - @doc """ - The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable) - - ### Notes - - This may be different from `faas.id` if an alias is involved - iex> OpenTelemetry.SemanticConventions.Trace.aws_lambda_invoked_arn() - :"aws.lambda.invoked_arn" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_lambda_invoked_arn :: :"aws.lambda.invoked_arn" def aws_lambda_invoked_arn do :"aws.lambda.invoked_arn" end - @doc """ - The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event - iex> OpenTelemetry.SemanticConventions.Trace.cloudevents_event_id() - :"cloudevents.event_id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloudevents_event_id :: :"cloudevents.event_id" def cloudevents_event_id do :"cloudevents.event_id" end - @doc """ - The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened - iex> OpenTelemetry.SemanticConventions.Trace.cloudevents_event_source() - :"cloudevents.event_source" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloudevents_event_source :: :"cloudevents.event_source" def cloudevents_event_source do :"cloudevents.event_source" end - @doc """ - The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses - iex> OpenTelemetry.SemanticConventions.Trace.cloudevents_event_spec_version() - :"cloudevents.event_spec_version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloudevents_event_spec_version :: :"cloudevents.event_spec_version" def cloudevents_event_spec_version do :"cloudevents.event_spec_version" end - @doc """ - The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence - iex> OpenTelemetry.SemanticConventions.Trace.cloudevents_event_type() - :"cloudevents.event_type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloudevents_event_type :: :"cloudevents.event_type" def cloudevents_event_type do :"cloudevents.event_type" end - @doc """ - The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source) - iex> OpenTelemetry.SemanticConventions.Trace.cloudevents_event_subject() - :"cloudevents.event_subject" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec cloudevents_event_subject :: :"cloudevents.event_subject" def cloudevents_event_subject do :"cloudevents.event_subject" end - @doc """ - Parent-child Reference type - ### Notes - - The causal relationship between a child Span and a parent Span - - iex> OpenTelemetry.SemanticConventions.Trace.opentracing_ref_type() - :"opentracing.ref_type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec opentracing_ref_type :: :"opentracing.ref_type" def opentracing_ref_type do :"opentracing.ref_type" end - @doc """ - An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers - iex> OpenTelemetry.SemanticConventions.Trace.db_system() - :"db.system" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_system :: :"db.system" def db_system do :"db.system" end - @doc """ - The connection string used to connect to the database. It is recommended to remove embedded credentials - iex> OpenTelemetry.SemanticConventions.Trace.db_connection_string() - :"db.connection_string" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_connection_string :: :"db.connection_string" def db_connection_string do :"db.connection_string" end - @doc """ - Username for accessing the database - iex> OpenTelemetry.SemanticConventions.Trace.db_user() - :"db.user" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_user :: :"db.user" def db_user do :"db.user" end - @doc """ - The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect - iex> OpenTelemetry.SemanticConventions.Trace.db_jdbc_driver_classname() - :"db.jdbc.driver_classname" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_jdbc_driver_classname :: :"db.jdbc.driver_classname" def db_jdbc_driver_classname do :"db.jdbc.driver_classname" end - @doc """ - This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails) - - ### Notes - - In some SQL databases, the database name to be used is called "schema name". In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name) - iex> OpenTelemetry.SemanticConventions.Trace.db_name() - :"db.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_name :: :"db.name" def db_name do :"db.name" end - @doc """ - The database statement being executed - - ### Notes - - The value may be sanitized to exclude sensitive information - iex> OpenTelemetry.SemanticConventions.Trace.db_statement() - :"db.statement" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_statement :: :"db.statement" def db_statement do :"db.statement" end - @doc """ - The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword - - ### Notes - - When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted - iex> OpenTelemetry.SemanticConventions.Trace.db_operation() - :"db.operation" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_operation :: :"db.operation" def db_operation do :"db.operation" end - @doc """ - Name of the database host - - ### Notes - `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup - - iex> OpenTelemetry.SemanticConventions.Trace.net_peer_name() - :"net.peer.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_peer_name :: :"net.peer.name" def net_peer_name do :"net.peer.name" end - @doc """ - Logical remote port number - iex> OpenTelemetry.SemanticConventions.Trace.net_peer_port() - :"net.peer.port" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_peer_port :: :"net.peer.port" def net_peer_port do :"net.peer.port" end - @doc """ - Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html) - iex> OpenTelemetry.SemanticConventions.Trace.net_sock_peer_addr() - :"net.sock.peer.addr" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_sock_peer_addr :: :"net.sock.peer.addr" def net_sock_peer_addr do :"net.sock.peer.addr" end - @doc """ - Remote socket peer port - iex> OpenTelemetry.SemanticConventions.Trace.net_sock_peer_port() - :"net.sock.peer.port" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_sock_peer_port :: :"net.sock.peer.port" def net_sock_peer_port do :"net.sock.peer.port" end - @doc """ - Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication - iex> OpenTelemetry.SemanticConventions.Trace.net_sock_family() - :"net.sock.family" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_sock_family :: :"net.sock.family" def net_sock_family do :"net.sock.family" end - @doc """ - Remote socket peer name - iex> OpenTelemetry.SemanticConventions.Trace.net_sock_peer_name() - :"net.sock.peer.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_sock_peer_name :: :"net.sock.peer.name" def net_sock_peer_name do :"net.sock.peer.name" end - @doc """ - Transport protocol used. See note below - iex> OpenTelemetry.SemanticConventions.Trace.net_transport() - :"net.transport" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_transport :: :"net.transport" def net_transport do :"net.transport" end - @doc """ - The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance - ### Notes - - If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard) - - iex> OpenTelemetry.SemanticConventions.Trace.db_mssql_instance_name() - :"db.mssql.instance_name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_mssql_instance_name :: :"db.mssql.instance_name" def db_mssql_instance_name do :"db.mssql.instance_name" end - @doc """ - The fetch size used for paging, i.e. how many rows will be returned at once - iex> OpenTelemetry.SemanticConventions.Trace.db_cassandra_page_size() - :"db.cassandra.page_size" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_cassandra_page_size :: :"db.cassandra.page_size" def db_cassandra_page_size do :"db.cassandra.page_size" end - @doc """ - The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html) - iex> OpenTelemetry.SemanticConventions.Trace.db_cassandra_consistency_level() - :"db.cassandra.consistency_level" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_cassandra_consistency_level :: :"db.cassandra.consistency_level" def db_cassandra_consistency_level do :"db.cassandra.consistency_level" end - @doc """ - The name of the primary table that the operation is acting upon, including the keyspace name (if applicable) - - ### Notes - This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set - - iex> OpenTelemetry.SemanticConventions.Trace.db_cassandra_table() - :"db.cassandra.table" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_cassandra_table :: :"db.cassandra.table" def db_cassandra_table do :"db.cassandra.table" end - @doc """ - Whether or not the query is idempotent - iex> OpenTelemetry.SemanticConventions.Trace.db_cassandra_idempotence() - :"db.cassandra.idempotence" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_cassandra_idempotence :: :"db.cassandra.idempotence" def db_cassandra_idempotence do :"db.cassandra.idempotence" end - @doc """ - The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively - iex> OpenTelemetry.SemanticConventions.Trace.db_cassandra_speculative_execution_count() - :"db.cassandra.speculative_execution_count" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_cassandra_speculative_execution_count :: :"db.cassandra.speculative_execution_count" def db_cassandra_speculative_execution_count do :"db.cassandra.speculative_execution_count" end - @doc """ - The ID of the coordinating node for a query - iex> OpenTelemetry.SemanticConventions.Trace.db_cassandra_coordinator_id() - :"db.cassandra.coordinator.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_cassandra_coordinator_id :: :"db.cassandra.coordinator.id" def db_cassandra_coordinator_id do :"db.cassandra.coordinator.id" end - @doc """ - The data center of the coordinating node for a query - iex> OpenTelemetry.SemanticConventions.Trace.db_cassandra_coordinator_dc() - :"db.cassandra.coordinator.dc" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_cassandra_coordinator_dc :: :"db.cassandra.coordinator.dc" def db_cassandra_coordinator_dc do :"db.cassandra.coordinator.dc" end - @doc """ - The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute - iex> OpenTelemetry.SemanticConventions.Trace.db_redis_database_index() - :"db.redis.database_index" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_redis_database_index :: :"db.redis.database_index" def db_redis_database_index do :"db.redis.database_index" end - @doc """ - The collection being accessed within the database stated in `db.name` - iex> OpenTelemetry.SemanticConventions.Trace.db_mongodb_collection() - :"db.mongodb.collection" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_mongodb_collection :: :"db.mongodb.collection" def db_mongodb_collection do :"db.mongodb.collection" end - @doc """ - The name of the primary table that the operation is acting upon, including the database name (if applicable) - - ### Notes - It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set - - iex> OpenTelemetry.SemanticConventions.Trace.db_sql_table() - :"db.sql.table" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec db_sql_table :: :"db.sql.table" def db_sql_table do :"db.sql.table" end - @doc """ - The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it - iex> OpenTelemetry.SemanticConventions.Trace.exception_type() - :"exception.type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec exception_type :: :"exception.type" def exception_type do :"exception.type" end - @doc """ - The exception message - iex> OpenTelemetry.SemanticConventions.Trace.exception_message() - :"exception.message" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec exception_message :: :"exception.message" def exception_message do :"exception.message" end - @doc """ - A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG - iex> OpenTelemetry.SemanticConventions.Trace.exception_stacktrace() - :"exception.stacktrace" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec exception_stacktrace :: :"exception.stacktrace" def exception_stacktrace do :"exception.stacktrace" end - @doc """ - SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span - - ### Notes - - An exception is considered to have escaped (or left) the scope of a span, - if that span is ended while the exception is still logically "in flight". - This may be actually "in flight" in some languages (e.g. if the exception - is passed to a Context manager's `__exit__` method in Python) but will - usually be caught at the point of recording the exception in most languages. - - It is usually not possible to determine at the point where an exception is thrown - whether it will escape the scope of a span. - However, it is trivial to know that an exception - will escape, if one checks for an active exception just before ending the span, - as done in the [example above](#recording-an-exception). - - It follows that an exception may still escape the scope of the span - even if the `exception.escaped` attribute was not set or set to false, - since the event might have been recorded at a time where it was not - clear whether the exception will escape - - iex> OpenTelemetry.SemanticConventions.Trace.exception_escaped() - :"exception.escaped" - """ + + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec exception_escaped :: :"exception.escaped" def exception_escaped do :"exception.escaped" end - @doc """ - Type of the trigger which caused this function execution - ### Notes - - For the server/consumer span on the incoming side, - `faas.trigger` MUST be set. - - Clients invoking FaaS instances usually cannot set `faas.trigger`, - since they would typically need to look in the payload to determine - the event type. If clients set it, it should be the same as the - trigger that corresponding incoming would have (i.e., this has - nothing to do with the underlying transport used to make the API - call to invoke the lambda, which is often HTTP) - - iex> OpenTelemetry.SemanticConventions.Trace.faas_trigger() - :"faas.trigger" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_trigger :: :"faas.trigger" def faas_trigger do :"faas.trigger" end - @doc """ - The execution ID of the current function execution - iex> OpenTelemetry.SemanticConventions.Trace.faas_execution() - :"faas.execution" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_execution :: :"faas.execution" def faas_execution do :"faas.execution" end - @doc """ - The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name - iex> OpenTelemetry.SemanticConventions.Trace.faas_document_collection() - :"faas.document.collection" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_document_collection :: :"faas.document.collection" def faas_document_collection do :"faas.document.collection" end - @doc """ - Describes the type of the operation that was performed on the data - iex> OpenTelemetry.SemanticConventions.Trace.faas_document_operation() - :"faas.document.operation" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_document_operation :: :"faas.document.operation" def faas_document_operation do :"faas.document.operation" end - @doc """ - A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime) - iex> OpenTelemetry.SemanticConventions.Trace.faas_document_time() - :"faas.document.time" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_document_time :: :"faas.document.time" def faas_document_time do :"faas.document.time" end - @doc """ - The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name - iex> OpenTelemetry.SemanticConventions.Trace.faas_document_name() - :"faas.document.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_document_name :: :"faas.document.name" def faas_document_name do :"faas.document.name" end - @doc """ - HTTP request method - iex> OpenTelemetry.SemanticConventions.Trace.http_method() - :"http.method" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_method :: :"http.method" def http_method do :"http.method" end - @doc """ - [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6) - iex> OpenTelemetry.SemanticConventions.Trace.http_status_code() - :"http.status_code" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_status_code :: :"http.status_code" def http_status_code do :"http.status_code" end - @doc """ - Kind of HTTP protocol used - - ### Notes - - If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed - iex> OpenTelemetry.SemanticConventions.Trace.http_flavor() - :"http.flavor" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_flavor :: :"http.flavor" def http_flavor do :"http.flavor" end - @doc """ - Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client - iex> OpenTelemetry.SemanticConventions.Trace.http_user_agent() - :"http.user_agent" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_user_agent :: :"http.user_agent" def http_user_agent do :"http.user_agent" end - @doc """ - The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size - iex> OpenTelemetry.SemanticConventions.Trace.http_request_content_length() - :"http.request_content_length" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_request_content_length :: :"http.request_content_length" def http_request_content_length do :"http.request_content_length" end - @doc """ - The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size - iex> OpenTelemetry.SemanticConventions.Trace.http_response_content_length() - :"http.response_content_length" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_response_content_length :: :"http.response_content_length" def http_response_content_length do :"http.response_content_length" end - @doc """ - The URI scheme identifying the used protocol - iex> OpenTelemetry.SemanticConventions.Trace.http_scheme() - :"http.scheme" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_scheme :: :"http.scheme" def http_scheme do :"http.scheme" end - @doc """ - The full request target as passed in a HTTP request line or equivalent - iex> OpenTelemetry.SemanticConventions.Trace.http_target() - :"http.target" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_target :: :"http.target" def http_target do :"http.target" end - @doc """ - The matched route (path template in the format used by the respective server framework). See note below - ### Notes - - 'http.route' MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it - - iex> OpenTelemetry.SemanticConventions.Trace.http_route() - :"http.route" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_route :: :"http.route" def http_route do :"http.route" end - @doc """ - The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)) - - ### Notes - - This is not necessarily the same as `net.sock.peer.addr`, which would - identify the network-level peer, which may be a proxy. - - This attribute should be set when a source of information different - from the one used for `net.sock.peer.addr`, is available even if that other - source just confirms the same value as `net.sock.peer.addr`. - Rationale: For `net.sock.peer.addr`, one typically does not know if it - comes from a proxy, reverse proxy, or the actual client. Setting - `http.client_ip` when it's the same as `net.sock.peer.addr` means that - one is at least somewhat confident that the address is not that of - the closest proxy - - iex> OpenTelemetry.SemanticConventions.Trace.http_client_ip() - :"http.client_ip" - """ + + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_client_ip :: :"http.client_ip" def http_client_ip do :"http.client_ip" end - @doc """ - Name of the local HTTP server that received the request - - ### Notes - Determined by using the first of the following that applies - - - The [primary server name](#http-server-definitions) of the matched virtual host. MUST only - include host identifier. - - Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) - if it's sent in absolute-form. - - Host identifier of the `Host` header - - SHOULD NOT be set if only IP address is available and capturing name would require a reverse DNS lookup - - iex> OpenTelemetry.SemanticConventions.Trace.net_host_name() - :"net.host.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_host_name :: :"net.host.name" def net_host_name do :"net.host.name" end - @doc """ - Port of the local HTTP server that received the request - - ### Notes - Determined by using the first of the following that applies - - - Port identifier of the [primary server host](#http-server-definitions) of the matched virtual host. - - Port identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) - if it's sent in absolute-form. - - Port identifier of the `Host` header - - iex> OpenTelemetry.SemanticConventions.Trace.net_host_port() - :"net.host.port" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_host_port :: :"net.host.port" def net_host_port do :"net.host.port" end - @doc """ - Local socket address. Useful in case of a multi-IP host - iex> OpenTelemetry.SemanticConventions.Trace.net_sock_host_addr() - :"net.sock.host.addr" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_sock_host_addr :: :"net.sock.host.addr" def net_sock_host_addr do :"net.sock.host.addr" end - @doc """ - Local socket port number - iex> OpenTelemetry.SemanticConventions.Trace.net_sock_host_port() - :"net.sock.host.port" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_sock_host_port :: :"net.sock.host.port" def net_sock_host_port do :"net.sock.host.port" end - @doc """ - Application layer protocol used. The value SHOULD be normalized to lowercase - iex> OpenTelemetry.SemanticConventions.Trace.net_app_protocol_name() - :"net.app.protocol.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_app_protocol_name :: :"net.app.protocol.name" def net_app_protocol_name do :"net.app.protocol.name" end - @doc """ - Version of the application layer protocol used. See note below - - ### Notes - `net.app.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1` - - iex> OpenTelemetry.SemanticConventions.Trace.net_app_protocol_version() - :"net.app.protocol.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_app_protocol_version :: :"net.app.protocol.version" def net_app_protocol_version do :"net.app.protocol.version" end - @doc """ - The internet connection type currently being used by the host - iex> OpenTelemetry.SemanticConventions.Trace.net_host_connection_type() - :"net.host.connection.type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_host_connection_type :: :"net.host.connection.type" def net_host_connection_type do :"net.host.connection.type" end - @doc """ - This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection - iex> OpenTelemetry.SemanticConventions.Trace.net_host_connection_subtype() - :"net.host.connection.subtype" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_host_connection_subtype :: :"net.host.connection.subtype" def net_host_connection_subtype do :"net.host.connection.subtype" end - @doc """ - The name of the mobile carrier - iex> OpenTelemetry.SemanticConventions.Trace.net_host_carrier_name() - :"net.host.carrier.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_host_carrier_name :: :"net.host.carrier.name" def net_host_carrier_name do :"net.host.carrier.name" end - @doc """ - The mobile carrier country code - iex> OpenTelemetry.SemanticConventions.Trace.net_host_carrier_mcc() - :"net.host.carrier.mcc" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_host_carrier_mcc :: :"net.host.carrier.mcc" def net_host_carrier_mcc do :"net.host.carrier.mcc" end - @doc """ - The mobile carrier network code - iex> OpenTelemetry.SemanticConventions.Trace.net_host_carrier_mnc() - :"net.host.carrier.mnc" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_host_carrier_mnc :: :"net.host.carrier.mnc" def net_host_carrier_mnc do :"net.host.carrier.mnc" end - @doc """ - The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network - iex> OpenTelemetry.SemanticConventions.Trace.net_host_carrier_icc() - :"net.host.carrier.icc" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec net_host_carrier_icc :: :"net.host.carrier.icc" def net_host_carrier_icc do :"net.host.carrier.icc" end - @doc """ - A string identifying the messaging system - iex> OpenTelemetry.SemanticConventions.Trace.messaging_system() - :"messaging.system" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_system :: :"messaging.system" def messaging_system do :"messaging.system" end - @doc """ - The message destination name. This might be equal to the span name but is required nevertheless - iex> OpenTelemetry.SemanticConventions.Trace.messaging_destination() - :"messaging.destination" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_destination :: :"messaging.destination" def messaging_destination do :"messaging.destination" end - @doc """ - The kind of message destination - iex> OpenTelemetry.SemanticConventions.Trace.messaging_destination_kind() - :"messaging.destination_kind" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_destination_kind :: :"messaging.destination_kind" def messaging_destination_kind do :"messaging.destination_kind" end - @doc """ - A boolean that is true if the message destination is temporary - iex> OpenTelemetry.SemanticConventions.Trace.messaging_temp_destination() - :"messaging.temp_destination" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_temp_destination :: :"messaging.temp_destination" def messaging_temp_destination do :"messaging.temp_destination" end - @doc """ - The name of the transport protocol - iex> OpenTelemetry.SemanticConventions.Trace.messaging_protocol() - :"messaging.protocol" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_protocol :: :"messaging.protocol" def messaging_protocol do :"messaging.protocol" end - @doc """ - The version of the transport protocol - iex> OpenTelemetry.SemanticConventions.Trace.messaging_protocol_version() - :"messaging.protocol_version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_protocol_version :: :"messaging.protocol_version" def messaging_protocol_version do :"messaging.protocol_version" end - @doc """ - Connection string - iex> OpenTelemetry.SemanticConventions.Trace.messaging_url() - :"messaging.url" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_url :: :"messaging.url" def messaging_url do :"messaging.url" end - @doc """ - A value used by the messaging system as an identifier for the message, represented as a string - iex> OpenTelemetry.SemanticConventions.Trace.messaging_message_id() - :"messaging.message_id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_message_id :: :"messaging.message_id" def messaging_message_id do :"messaging.message_id" end - @doc """ - The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID" - iex> OpenTelemetry.SemanticConventions.Trace.messaging_conversation_id() - :"messaging.conversation_id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_conversation_id :: :"messaging.conversation_id" def messaging_conversation_id do :"messaging.conversation_id" end - @doc """ - The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported - iex> OpenTelemetry.SemanticConventions.Trace.messaging_message_payload_size_bytes() - :"messaging.message_payload_size_bytes" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_message_payload_size_bytes :: :"messaging.message_payload_size_bytes" def messaging_message_payload_size_bytes do :"messaging.message_payload_size_bytes" end - @doc """ - The compressed size of the message payload in bytes - iex> OpenTelemetry.SemanticConventions.Trace.messaging_message_payload_compressed_size_bytes() - :"messaging.message_payload_compressed_size_bytes" - """ - @spec messaging_message_payload_compressed_size_bytes :: :"messaging.message_payload_compressed_size_bytes" + @deprecated "Upgrade to >= v1.27.0 semantic conventions" + @spec messaging_message_payload_compressed_size_bytes :: + :"messaging.message_payload_compressed_size_bytes" def messaging_message_payload_compressed_size_bytes do :"messaging.message_payload_compressed_size_bytes" end - @doc """ - A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime) - iex> OpenTelemetry.SemanticConventions.Trace.faas_time() - :"faas.time" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_time :: :"faas.time" def faas_time do :"faas.time" end - @doc """ - A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm) - iex> OpenTelemetry.SemanticConventions.Trace.faas_cron() - :"faas.cron" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_cron :: :"faas.cron" def faas_cron do :"faas.cron" end - @doc """ - A boolean that is true if the serverless function is executed for the first time (aka cold-start) - iex> OpenTelemetry.SemanticConventions.Trace.faas_coldstart() - :"faas.coldstart" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_coldstart :: :"faas.coldstart" def faas_coldstart do :"faas.coldstart" end - @doc """ - The name of the invoked function - ### Notes - - SHOULD be equal to the `faas.name` resource attribute of the invoked function - - iex> OpenTelemetry.SemanticConventions.Trace.faas_invoked_name() - :"faas.invoked_name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_invoked_name :: :"faas.invoked_name" def faas_invoked_name do :"faas.invoked_name" end - @doc """ - The cloud provider of the invoked function - ### Notes - - SHOULD be equal to the `cloud.provider` resource attribute of the invoked function - - iex> OpenTelemetry.SemanticConventions.Trace.faas_invoked_provider() - :"faas.invoked_provider" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_invoked_provider :: :"faas.invoked_provider" def faas_invoked_provider do :"faas.invoked_provider" end - @doc """ - The cloud region of the invoked function - ### Notes - - SHOULD be equal to the `cloud.region` resource attribute of the invoked function - - iex> OpenTelemetry.SemanticConventions.Trace.faas_invoked_region() - :"faas.invoked_region" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec faas_invoked_region :: :"faas.invoked_region" def faas_invoked_region do :"faas.invoked_region" end - @doc """ - The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any - iex> OpenTelemetry.SemanticConventions.Trace.peer_service() - :"peer.service" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec peer_service :: :"peer.service" def peer_service do :"peer.service" end - @doc """ - Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system - iex> OpenTelemetry.SemanticConventions.Trace.enduser_id() - :"enduser.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec enduser_id :: :"enduser.id" def enduser_id do :"enduser.id" end - @doc """ - Actual/assumed role the client is making the request under extracted from token or application security context - iex> OpenTelemetry.SemanticConventions.Trace.enduser_role() - :"enduser.role" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec enduser_role :: :"enduser.role" def enduser_role do :"enduser.role" end - @doc """ - Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html) - iex> OpenTelemetry.SemanticConventions.Trace.enduser_scope() - :"enduser.scope" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec enduser_scope :: :"enduser.scope" def enduser_scope do :"enduser.scope" end - @doc """ - Current "managed" thread ID (as opposed to OS thread ID) - iex> OpenTelemetry.SemanticConventions.Trace.thread_id() - :"thread.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec thread_id :: :"thread.id" def thread_id do :"thread.id" end - @doc """ - Current thread name - iex> OpenTelemetry.SemanticConventions.Trace.thread_name() - :"thread.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec thread_name :: :"thread.name" def thread_name do :"thread.name" end - @doc """ - The method or function name, or equivalent (usually rightmost part of the code unit's name) - iex> OpenTelemetry.SemanticConventions.Trace.code_function() - :"code.function" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec code_function :: :"code.function" def code_function do :"code.function" end - @doc """ - The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit - iex> OpenTelemetry.SemanticConventions.Trace.code_namespace() - :"code.namespace" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec code_namespace :: :"code.namespace" def code_namespace do :"code.namespace" end - @doc """ - The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path) - iex> OpenTelemetry.SemanticConventions.Trace.code_filepath() - :"code.filepath" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec code_filepath :: :"code.filepath" def code_filepath do :"code.filepath" end - @doc """ - The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function` - iex> OpenTelemetry.SemanticConventions.Trace.code_lineno() - :"code.lineno" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec code_lineno :: :"code.lineno" def code_lineno do :"code.lineno" end - @doc """ - Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless - - ### Notes - - `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/` - iex> OpenTelemetry.SemanticConventions.Trace.http_url() - :"http.url" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_url :: :"http.url" def http_url do :"http.url" end - @doc """ - The ordinal number of request re-sending attempt - iex> OpenTelemetry.SemanticConventions.Trace.http_retry_count() - :"http.retry_count" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec http_retry_count :: :"http.retry_count" def http_retry_count do :"http.retry_count" end - @doc """ - The value `aws-api` - iex> OpenTelemetry.SemanticConventions.Trace.rpc_system() - :"rpc.system" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec rpc_system :: :"rpc.system" def rpc_system do :"rpc.system" end - @doc """ - The name of the service to which a request is made, as returned by the AWS SDK - ### Notes - - This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side) - - iex> OpenTelemetry.SemanticConventions.Trace.rpc_service() - :"rpc.service" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec rpc_service :: :"rpc.service" def rpc_service do :"rpc.service" end - @doc """ - The name of the operation corresponding to the request, as returned by the AWS SDK - ### Notes - - This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side) - - iex> OpenTelemetry.SemanticConventions.Trace.rpc_method() - :"rpc.method" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec rpc_method :: :"rpc.method" def rpc_method do :"rpc.method" end - @doc """ - The keys in the `RequestItems` object field - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_table_names() - :"aws.dynamodb.table_names" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_table_names :: :"aws.dynamodb.table_names" def aws_dynamodb_table_names do :"aws.dynamodb.table_names" end - @doc """ - The JSON-serialized value of each item in the `ConsumedCapacity` response field - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_consumed_capacity() - :"aws.dynamodb.consumed_capacity" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_consumed_capacity :: :"aws.dynamodb.consumed_capacity" def aws_dynamodb_consumed_capacity do :"aws.dynamodb.consumed_capacity" end - @doc """ - The JSON-serialized value of the `ItemCollectionMetrics` response field - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_item_collection_metrics() - :"aws.dynamodb.item_collection_metrics" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_item_collection_metrics :: :"aws.dynamodb.item_collection_metrics" def aws_dynamodb_item_collection_metrics do :"aws.dynamodb.item_collection_metrics" end - @doc """ - The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_provisioned_read_capacity() - :"aws.dynamodb.provisioned_read_capacity" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_provisioned_read_capacity :: :"aws.dynamodb.provisioned_read_capacity" def aws_dynamodb_provisioned_read_capacity do :"aws.dynamodb.provisioned_read_capacity" end - @doc """ - The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_provisioned_write_capacity() - :"aws.dynamodb.provisioned_write_capacity" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_provisioned_write_capacity :: :"aws.dynamodb.provisioned_write_capacity" def aws_dynamodb_provisioned_write_capacity do :"aws.dynamodb.provisioned_write_capacity" end - @doc """ - The value of the `ConsistentRead` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_consistent_read() - :"aws.dynamodb.consistent_read" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_consistent_read :: :"aws.dynamodb.consistent_read" def aws_dynamodb_consistent_read do :"aws.dynamodb.consistent_read" end - @doc """ - The value of the `ProjectionExpression` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_projection() - :"aws.dynamodb.projection" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_projection :: :"aws.dynamodb.projection" def aws_dynamodb_projection do :"aws.dynamodb.projection" end - @doc """ - The value of the `Limit` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_limit() - :"aws.dynamodb.limit" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_limit :: :"aws.dynamodb.limit" def aws_dynamodb_limit do :"aws.dynamodb.limit" end - @doc """ - The value of the `AttributesToGet` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_attributes_to_get() - :"aws.dynamodb.attributes_to_get" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_attributes_to_get :: :"aws.dynamodb.attributes_to_get" def aws_dynamodb_attributes_to_get do :"aws.dynamodb.attributes_to_get" end - @doc """ - The value of the `IndexName` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_index_name() - :"aws.dynamodb.index_name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_index_name :: :"aws.dynamodb.index_name" def aws_dynamodb_index_name do :"aws.dynamodb.index_name" end - @doc """ - The value of the `Select` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_select() - :"aws.dynamodb.select" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_select :: :"aws.dynamodb.select" def aws_dynamodb_select do :"aws.dynamodb.select" end - @doc """ - The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_global_secondary_indexes() - :"aws.dynamodb.global_secondary_indexes" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_global_secondary_indexes :: :"aws.dynamodb.global_secondary_indexes" def aws_dynamodb_global_secondary_indexes do :"aws.dynamodb.global_secondary_indexes" end - @doc """ - The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_local_secondary_indexes() - :"aws.dynamodb.local_secondary_indexes" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_local_secondary_indexes :: :"aws.dynamodb.local_secondary_indexes" def aws_dynamodb_local_secondary_indexes do :"aws.dynamodb.local_secondary_indexes" end - @doc """ - The value of the `ExclusiveStartTableName` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_exclusive_start_table() - :"aws.dynamodb.exclusive_start_table" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_exclusive_start_table :: :"aws.dynamodb.exclusive_start_table" def aws_dynamodb_exclusive_start_table do :"aws.dynamodb.exclusive_start_table" end - @doc """ - The the number of items in the `TableNames` response parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_table_count() - :"aws.dynamodb.table_count" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_table_count :: :"aws.dynamodb.table_count" def aws_dynamodb_table_count do :"aws.dynamodb.table_count" end - @doc """ - The value of the `ScanIndexForward` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_scan_forward() - :"aws.dynamodb.scan_forward" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_scan_forward :: :"aws.dynamodb.scan_forward" def aws_dynamodb_scan_forward do :"aws.dynamodb.scan_forward" end - @doc """ - The value of the `Segment` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_segment() - :"aws.dynamodb.segment" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_segment :: :"aws.dynamodb.segment" def aws_dynamodb_segment do :"aws.dynamodb.segment" end - @doc """ - The value of the `TotalSegments` request parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_total_segments() - :"aws.dynamodb.total_segments" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_total_segments :: :"aws.dynamodb.total_segments" def aws_dynamodb_total_segments do :"aws.dynamodb.total_segments" end - @doc """ - The value of the `Count` response parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_count() - :"aws.dynamodb.count" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_count :: :"aws.dynamodb.count" def aws_dynamodb_count do :"aws.dynamodb.count" end - @doc """ - The value of the `ScannedCount` response parameter - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_scanned_count() - :"aws.dynamodb.scanned_count" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_scanned_count :: :"aws.dynamodb.scanned_count" def aws_dynamodb_scanned_count do :"aws.dynamodb.scanned_count" end - @doc """ - The JSON-serialized value of each item in the `AttributeDefinitions` request field - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_attribute_definitions() - :"aws.dynamodb.attribute_definitions" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec aws_dynamodb_attribute_definitions :: :"aws.dynamodb.attribute_definitions" def aws_dynamodb_attribute_definitions do :"aws.dynamodb.attribute_definitions" end - @doc """ - The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field - iex> OpenTelemetry.SemanticConventions.Trace.aws_dynamodb_global_secondary_index_updates() - :"aws.dynamodb.global_secondary_index_updates" - """ - @spec aws_dynamodb_global_secondary_index_updates :: :"aws.dynamodb.global_secondary_index_updates" + @deprecated "Upgrade to >= v1.27.0 semantic conventions" + @spec aws_dynamodb_global_secondary_index_updates :: + :"aws.dynamodb.global_secondary_index_updates" def aws_dynamodb_global_secondary_index_updates do :"aws.dynamodb.global_secondary_index_updates" end - @doc """ - The name of the operation being executed - iex> OpenTelemetry.SemanticConventions.Trace.graphql_operation_name() - :"graphql.operation.name" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec graphql_operation_name :: :"graphql.operation.name" def graphql_operation_name do :"graphql.operation.name" end - @doc """ - The type of the operation being executed - iex> OpenTelemetry.SemanticConventions.Trace.graphql_operation_type() - :"graphql.operation.type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec graphql_operation_type :: :"graphql.operation.type" def graphql_operation_type do :"graphql.operation.type" end - @doc """ - The GraphQL document being executed - - ### Notes - The value may be sanitized to exclude sensitive information - - iex> OpenTelemetry.SemanticConventions.Trace.graphql_document() - :"graphql.document" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec graphql_document :: :"graphql.document" def graphql_document do :"graphql.document" end - @doc """ - A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case - iex> OpenTelemetry.SemanticConventions.Trace.messaging_operation() - :"messaging.operation" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_operation :: :"messaging.operation" def messaging_operation do :"messaging.operation" end - @doc """ - The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message - iex> OpenTelemetry.SemanticConventions.Trace.messaging_consumer_id() - :"messaging.consumer_id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_consumer_id :: :"messaging.consumer_id" def messaging_consumer_id do :"messaging.consumer_id" end - @doc """ - RabbitMQ message routing key - iex> OpenTelemetry.SemanticConventions.Trace.messaging_rabbitmq_routing_key() - :"messaging.rabbitmq.routing_key" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_rabbitmq_routing_key :: :"messaging.rabbitmq.routing_key" def messaging_rabbitmq_routing_key do :"messaging.rabbitmq.routing_key" end - @doc """ - Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set - - ### Notes - If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value - - iex> OpenTelemetry.SemanticConventions.Trace.messaging_kafka_message_key() - :"messaging.kafka.message_key" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_kafka_message_key :: :"messaging.kafka.message_key" def messaging_kafka_message_key do :"messaging.kafka.message_key" end - @doc """ - Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers - iex> OpenTelemetry.SemanticConventions.Trace.messaging_kafka_consumer_group() - :"messaging.kafka.consumer_group" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_kafka_consumer_group :: :"messaging.kafka.consumer_group" def messaging_kafka_consumer_group do :"messaging.kafka.consumer_group" end - @doc """ - Client Id for the Consumer or Producer that is handling the message - iex> OpenTelemetry.SemanticConventions.Trace.messaging_kafka_client_id() - :"messaging.kafka.client_id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_kafka_client_id :: :"messaging.kafka.client_id" def messaging_kafka_client_id do :"messaging.kafka.client_id" end - @doc """ - Partition the message is sent to - iex> OpenTelemetry.SemanticConventions.Trace.messaging_kafka_partition() - :"messaging.kafka.partition" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_kafka_partition :: :"messaging.kafka.partition" def messaging_kafka_partition do :"messaging.kafka.partition" end - @doc """ - A boolean that is true if the message is a tombstone - iex> OpenTelemetry.SemanticConventions.Trace.messaging_kafka_tombstone() - :"messaging.kafka.tombstone" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_kafka_tombstone :: :"messaging.kafka.tombstone" def messaging_kafka_tombstone do :"messaging.kafka.tombstone" end - @doc """ - Namespace of RocketMQ resources, resources in different namespaces are individual - iex> OpenTelemetry.SemanticConventions.Trace.messaging_rocketmq_namespace() - :"messaging.rocketmq.namespace" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_rocketmq_namespace :: :"messaging.rocketmq.namespace" def messaging_rocketmq_namespace do :"messaging.rocketmq.namespace" end - @doc """ - Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind - iex> OpenTelemetry.SemanticConventions.Trace.messaging_rocketmq_client_group() - :"messaging.rocketmq.client_group" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_rocketmq_client_group :: :"messaging.rocketmq.client_group" def messaging_rocketmq_client_group do :"messaging.rocketmq.client_group" end - @doc """ - The unique identifier for each client - iex> OpenTelemetry.SemanticConventions.Trace.messaging_rocketmq_client_id() - :"messaging.rocketmq.client_id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_rocketmq_client_id :: :"messaging.rocketmq.client_id" def messaging_rocketmq_client_id do :"messaging.rocketmq.client_id" end - @doc """ - Type of message - iex> OpenTelemetry.SemanticConventions.Trace.messaging_rocketmq_message_type() - :"messaging.rocketmq.message_type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_rocketmq_message_type :: :"messaging.rocketmq.message_type" def messaging_rocketmq_message_type do :"messaging.rocketmq.message_type" end - @doc """ - The secondary classifier of message besides topic - iex> OpenTelemetry.SemanticConventions.Trace.messaging_rocketmq_message_tag() - :"messaging.rocketmq.message_tag" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_rocketmq_message_tag :: :"messaging.rocketmq.message_tag" def messaging_rocketmq_message_tag do :"messaging.rocketmq.message_tag" end - @doc """ - Key(s) of message, another way to mark message besides message id - iex> OpenTelemetry.SemanticConventions.Trace.messaging_rocketmq_message_keys() - :"messaging.rocketmq.message_keys" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_rocketmq_message_keys :: :"messaging.rocketmq.message_keys" def messaging_rocketmq_message_keys do :"messaging.rocketmq.message_keys" end - @doc """ - Model of message consumption. This only applies to consumer spans - iex> OpenTelemetry.SemanticConventions.Trace.messaging_rocketmq_consumption_model() - :"messaging.rocketmq.consumption_model" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec messaging_rocketmq_consumption_model :: :"messaging.rocketmq.consumption_model" def messaging_rocketmq_consumption_model do :"messaging.rocketmq.consumption_model" end - @doc """ - The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request - iex> OpenTelemetry.SemanticConventions.Trace.rpc_grpc_status_code() - :"rpc.grpc.status_code" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec rpc_grpc_status_code :: :"rpc.grpc.status_code" def rpc_grpc_status_code do :"rpc.grpc.status_code" end - @doc """ - Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted - iex> OpenTelemetry.SemanticConventions.Trace.rpc_jsonrpc_version() - :"rpc.jsonrpc.version" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec rpc_jsonrpc_version :: :"rpc.jsonrpc.version" def rpc_jsonrpc_version do :"rpc.jsonrpc.version" end - @doc """ - `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification - iex> OpenTelemetry.SemanticConventions.Trace.rpc_jsonrpc_request_id() - :"rpc.jsonrpc.request_id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec rpc_jsonrpc_request_id :: :"rpc.jsonrpc.request_id" def rpc_jsonrpc_request_id do :"rpc.jsonrpc.request_id" end - @doc """ - `error.code` property of response if it is an error response - iex> OpenTelemetry.SemanticConventions.Trace.rpc_jsonrpc_error_code() - :"rpc.jsonrpc.error_code" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec rpc_jsonrpc_error_code :: :"rpc.jsonrpc.error_code" def rpc_jsonrpc_error_code do :"rpc.jsonrpc.error_code" end - @doc """ - `error.message` property of response if it is an error response - iex> OpenTelemetry.SemanticConventions.Trace.rpc_jsonrpc_error_message() - :"rpc.jsonrpc.error_message" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec rpc_jsonrpc_error_message :: :"rpc.jsonrpc.error_message" def rpc_jsonrpc_error_message do :"rpc.jsonrpc.error_message" end - @doc """ - Whether this is a received or sent message - iex> OpenTelemetry.SemanticConventions.Trace.message_type() - :"message.type" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec message_type :: :"message.type" def message_type do :"message.type" end - @doc """ - MUST be calculated as two different counters starting from `1` one for sent messages and one for received message - - ### Notes - - This way we guarantee that the values will be consistent between different implementations - iex> OpenTelemetry.SemanticConventions.Trace.message_id() - :"message.id" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec message_id :: :"message.id" def message_id do :"message.id" end - @doc """ - Compressed size of the message in bytes - iex> OpenTelemetry.SemanticConventions.Trace.message_compressed_size() - :"message.compressed_size" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec message_compressed_size :: :"message.compressed_size" def message_compressed_size do :"message.compressed_size" end - @doc """ - Uncompressed size of the message in bytes - iex> OpenTelemetry.SemanticConventions.Trace.message_uncompressed_size() - :"message.uncompressed_size" - """ + @deprecated "Upgrade to >= v1.27.0 semantic conventions" @spec message_uncompressed_size :: :"message.uncompressed_size" def message_uncompressed_size do :"message.uncompressed_size" end -end \ No newline at end of file +end diff --git a/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex b/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex new file mode 100644 index 00000000..16b1e0b7 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex @@ -0,0 +1,3 @@ +defmodule OpenTelemetry.SemConv.Schemas do + def v1_27_0, do: "https://opentelemetry.io/schemas/1.27.0" +end diff --git a/apps/opentelemetry_semantic_conventions/lib/sem_conv.ex b/apps/opentelemetry_semantic_conventions/lib/sem_conv.ex new file mode 100644 index 00000000..a011e8ea --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/sem_conv.ex @@ -0,0 +1,127 @@ +defmodule OpenTelemetry.SemConv do + @moduledoc """ + OpenTelemetry Semantic Conventions + + + ## Lifecycle Status + + The support guarantees and allowed changes are governed by the lifecycle of the document. + + [OpenTelemetry Document Status](https://opentelemetry.io/docs/specs/otel/document-status) conventions. + + ### Experimental + + Experimental items are denoted as such, e.g. `attribute`^e^. These items _can_ be changed + but that does not happen frequently in practice. + + ## Usage + + Check out the Guides tab for detailed attribute information and usage. + + ### Migration from v1.13.0 (v0.2.0 package version) semantic conventions + + The structure of OpenTelemetry Semantic Conventions has evolved a great + deal since the last version we have published. All attributes now live + under a common attribute registry. In addition, attributes have been classified + as stable or experimental. + + Attributes are now organized by attribute group and stability. The prior code + has been kept in a deprecated status to allow backward compatability + during migration. + + ### Erlang + + For Erlang include the semantic conventions header for the particular kind you + need: + + ``` + -include_lib("opentelemetry_semantic_conventions/include/attributes/url_attributes.hrl"). + ``` + + You can then use the macros for the attribute keys: + + ``` + ?URL_PATH + ``` + + #### Enums + + Enum Attribute types define each value in a macro with the attribute name prefixed. + + Enum Attributes allow for a user-supplied value when no pre-defined option exists. Users + may set this value manually while paying attention to the required value type + + #### Incubating Attributes & Metrics + + Incubating attribute header files are located in the `incubating` folder and metrics under `incubating/metrics`. + + Experimental attributes are considered to be incubating. Attribute groups can + contain attributes which are stable, experimental, or both. Experimental + attributes are contained in an incubating header. Attribute groups containing + attributes of both stability levels will have two header files in this case. + + ``` + -include_lib("opentelemetry_semantic_conventions/include/incubating/attributes/url_attributes.hrl"). + ``` + + You can then use the macros for the experimental attribute keys: + + ``` + ?URL_DOMAIN + ``` + + ### Elixir + + Attributes in Elixir are defined as functions. To use an attribute, simply call it + with that attribute's name. + + ``` + iex> OpenTelemetry.SemConv.URLAttributes.url_path() + :"url.path" + ``` + + #### Enums + + Enum Attribute types are defined by a function that returns a map of all defined values. + To get a particular value, you can use map dot or access patterns. Enum keys are always atoms. + + ``` + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_system_values().postgresql + :postgresql + ``` + + Enum Attributes allow for a user-supplied value when no pre-defined option exists. Users + may set this value manually while paying attention to the required value type + + #### Incubating Attributes & Metrics + + Incubating attributes are located under the `OpenTelemetry.SemConv.Incubating` + and `OpenTelemetry.SemConv.Incubating.Metrics` namespaces. + + Experimental attributes are considered to be incubating. Attribute groups can + contain attributes which are stable, experimental, or both. Experimental + attributes are contained in an incubating module. Attribute groups containing + attributes of both stability levels will have two modules in this case. + + """ + + @typedoc """ + HTTP stability opt-in + """ + @type http_stability() :: :http | :http_dup | :default + + @typedoc """ + Map of stability opt-ins + """ + @type stability_opt_ins() :: %{http: http_stability()} + + @doc """ + Map of stability opt-ins defined by the `OTEL_SEMCONV_STABILITY_OPT_IN` env var. + + Current valid options: + + * [http](migration-guide.md) + """ + @spec stability_opt_in() :: stability_opt_ins() + defdelegate stability_opt_in(), to: :opentelemetry_sem_conv +end diff --git a/apps/opentelemetry_semantic_conventions/makefile b/apps/opentelemetry_semantic_conventions/makefile new file mode 100644 index 00000000..27cbddfb --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/makefile @@ -0,0 +1,47 @@ +SEMCON_VERSION = 1.27.0 + +.PHONY: setup clean-all checkout generate + +clean-all: clean-semconv clean-elixir clean-erlang + +clean-semconv: + rm -rf semtmp + rm -rf guides/ + +clean-elixir: + rm -rf lib/attributes + rm -rf lib/incubating + rm -rf lib/metrics + rm -rf doc + +clean-erlang: + rm -rf include/attributes + rm -rf include/incubating + rm -rf include/metrics + +setup: + curl --proto '=https' --tlsv1.2 -LsSf https://github.com/open-telemetry/weaver/releases/download/v0.9.2/weaver-installer.sh | sh + +checkout: + mkdir semtmp + git clone https://github.com/open-telemetry/semantic-conventions.git semtmp + cd semtmp; \ + git checkout v$(SEMCON_VERSION) && \ + cp -r docs ../guides + rm -rf guides/docs + rm -f $(addprefix guides/attributes-registry/, android.md aspnetcore.md dotnet.md go.md ios.md jvm.md kestrel.md nodejs.md signalr.md v8js.md veightjs.md webengine.md) + +generate: generate-elixir generate-erlang format-and-test + +generate-elixir: + weaver registry generate --registry=semtmp/model --templates=templates --param output=lib/ --param stability=stable elixir . + weaver registry generate --registry=semtmp/model --templates=templates --param output=lib/incubating/ --param stability=experimental elixir . + +generate-erlang: + weaver registry generate --registry=semtmp/model --templates=templates --param output=include/ --param stability=stable erlang . + weaver registry generate --registry=semtmp/model --templates=templates --param output=include/incubating/ --param stability=experimental erlang . + +format-and-test: + mix format + mix docs + mix test \ No newline at end of file diff --git a/apps/opentelemetry_semantic_conventions/mix.exs b/apps/opentelemetry_semantic_conventions/mix.exs index d00c5dac..944e7d3d 100644 --- a/apps/opentelemetry_semantic_conventions/mix.exs +++ b/apps/opentelemetry_semantic_conventions/mix.exs @@ -8,16 +8,61 @@ defmodule OpenTelemetry.SemanticConventions.MixProject do app: app, version: to_string(Keyword.fetch!(desc, :vsn)), description: to_string(Keyword.fetch!(desc, :description)), - elixir: "~> 1.8", + elixir: "~> 1.12", start_permanent: Mix.env() == :prod, deps: [ {:dialyxir, "~> 1.0", only: [:dev], runtime: false}, - {:covertool, ">= 0.0.0", only: :test} + {:covertool, ">= 0.0.0", only: :test}, + {:ex_doc, "~> 0.34", only: [:dev]} + ], + name: "OpenTelemetry.SemConv", + source_url: + "https://github.com/open-telemetry/opentelemetry-erlang/apps/opentelemetry_semantic_conventions", + docs: [ + markdown_processor: {ExDoc.Markdown.Earmark, [all: true]}, + main: "OpenTelemetry.SemConv", + extra_section: "GUIDES", + extras: guides() ++ [], + groups_for_extras: [ + "Attributes Registry": Path.wildcard("guides/attributes-registry/*.md"), + "Cloud Providers": Path.wildcard("guides/cloud-providers/*.md"), + "Cloud Events": Path.wildcard("guides/cloudevents/*.md"), + Database: Path.wildcard("guides/database/*.md"), + DNS: Path.wildcard("guides/dns/*.md"), + Exceptions: Path.wildcard("guides/exceptions/*.md"), + FAAS: Path.wildcard("guides/faas/*.md"), + "Feature Flags": Path.wildcard("guides/feature-flags/*.md"), + General: Path.wildcard("guides/general/*.md"), + "Generative AI": Path.wildcard("guides/gen-ai/*.md"), + GraphQL: Path.wildcard("guides/graphql/*.md"), + HTTP: Path.wildcard("guides/http/*.md"), + Messaging: Path.wildcard("guides/messaging/*.md"), + "Object Stores": Path.wildcard("guides/object-stores/*.md"), + Resource: Path.wildcard("guides/resource/**/*.md"), + RPC: Path.wildcard("guides/rpc/*.md"), + Runtime: Path.wildcard("guides/runtime/*.md"), + System: Path.wildcard("guides/system/*.md"), + URL: Path.wildcard("guides/url/*.md") + ], + groups_for_modules: [ + Attributes: + ~r/^OpenTelemetry\.SemConv(?!\.Metrics|\.Incubating)(\.[A-Z][A-Za-z0-9]*)+$/, + "Incubating Attributes": + ~r/^OpenTelemetry\.SemConv\.Incubating(?!\.Metrics)(\.[A-Z][A-Za-z0-9]*)+$/, + Metrics: ~r/OpenTelemetry.SemConv.Metrics/, + "Incubating Metrics": ~r/OpenTelemetry.SemConv.Incubating.Metrics/, + Deprecated: ~r/OpenTelemetry.SemanticConventions(\.[A-Z][A-Za-z0-9]*)+$/ + ], + nest_modules_by_prefix: [ + OpenTelemetry.SemConv, + OpenTelemetry.SemConv.Metrics, + OpenTelemetry.SemConv.Incubating, + OpenTelemetry.SemConv.Incubating.Metrics, + OpenTelemetry.SemanticConventions + ] ], - name: "OpenTelemetry.SemanticConventions", test_coverage: [tool: :covertool], - package: package(), - aliases: [docs: & &1] + package: package() ] end @@ -25,6 +70,7 @@ defmodule OpenTelemetry.SemanticConventions.MixProject do defp package() do [ + name: "opentelemetry_semantic_conventions", description: "OpenTelemetry Semantic Conventions", build_tools: ["rebar3", "mix"], files: ~w(lib mix.exs README.md LICENSE rebar.config include src), @@ -38,8 +84,22 @@ defmodule OpenTelemetry.SemanticConventions.MixProject do defp load_app do {:ok, [{:application, name, desc}]} = - :file.consult('src/opentelemetry_semantic_conventions.app.src') + :file.consult(~c"src/opentelemetry_semantic_conventions.app.src") {name, desc} end + + defp guides do + Path.wildcard("guides/**/*.md") + |> Enum.reject(fn path -> + path in ([ + "guides/attributes-registry/android.md", + "guides/attributes-registry/aspnetcore.md", + "guides/attributes-registry/dotnet.md", + "guides/attributes-registry/ios.md", + "guides/attributes-registry/jvm.md", + "guides/attributes-registry/signalr.md" + ] ++ Path.wildcard("guides/dotnet/*") ++ Path.wildcard("guides/mobile/*")) + end) + end end diff --git a/apps/opentelemetry_semantic_conventions/mix.lock b/apps/opentelemetry_semantic_conventions/mix.lock index a8087fcf..40ee58ee 100644 --- a/apps/opentelemetry_semantic_conventions/mix.lock +++ b/apps/opentelemetry_semantic_conventions/mix.lock @@ -1,5 +1,11 @@ %{ "covertool": {:hex, :covertool, "2.0.4", "54acff6cddd88d28dea663cd2e1fe20dd32fcf5f5d3aff7d59031ce44ce39efa", [:rebar3], [], "hexpm", "5c9568ba4308fda2082172737c80c31d991ea83961eb10791f06106a870d0cdc"}, "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, + "ex_doc": {:hex, :ex_doc, "0.34.1", "9751a0419bc15bc7580c73fde506b17b07f6402a1e5243be9e0f05a68c723368", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d441f1a86a235f59088978eff870de2e815e290e44a8bd976fe5d64470a4c9d2"}, + "makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.0", "6f0eff9c9c489f26b69b61440bf1b238d95badae49adac77973cbacae87e3c2e", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "ea7a9307de9d1548d2a72d299058d1fd2339e3d398560a0e46c27dab4891e4d2"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, } diff --git a/apps/opentelemetry_semantic_conventions/src/opentelemetry_sem_conv.erl b/apps/opentelemetry_semantic_conventions/src/opentelemetry_sem_conv.erl new file mode 100644 index 00000000..2c5881e0 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/src/opentelemetry_sem_conv.erl @@ -0,0 +1,29 @@ +-module(opentelemetry_sem_conv). + +-export([stability_opt_in/0]). + +-export_type([ + http_stability/0, + stability_opt_ins/0]). + +-type http_stability() :: http | http_dup | default. +-type stability_opt_ins() :: #{http => http_stability()}. + + +-spec stability_opt_in() -> stability_opt_ins(). +stability_opt_in() -> + OptInsList = string:split(os:getenv("OTEL_SEMCONV_STABILITY_OPT_IN", ""), ","), + HttpStability = http_stability(OptInsList), + #{http => HttpStability}. + +http_stability(OptIns) -> + Dup = lists:member("http/dup", OptIns), + Http = lists:member("http", OptIns), + case {Dup, Http} of + {true, _} -> + http_dup; + {_, true} -> + http; + _ -> + default + end. diff --git a/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.app.src b/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.app.src index 07a4d7e5..58a5779b 100644 --- a/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.app.src +++ b/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.app.src @@ -1,6 +1,6 @@ {application, opentelemetry_semantic_conventions, [{description, "Macros defining the keys of OpenTelemetry semantic conventions"}, - {vsn, "0.2.0"}, + {vsn, "1.27.0"}, {registered, []}, {applications, [kernel, diff --git a/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.erl b/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.erl index 2bb73025..ae23d471 100644 --- a/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.erl +++ b/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.erl @@ -1,12 +1,3 @@ -module(opentelemetry_semantic_conventions). -export([]). - --ifdef(TEST). --include_lib("eunit/include/eunit.hrl"). - --include("trace.hrl"). - -quick_test() -> - ?assertEqual('aws.lambda.invoked_arn', ?AWS_LAMBDA_INVOKED_ARN). --endif. diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/common.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/common.j2 new file mode 100644 index 00000000..6e4f16ab --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/common.j2 @@ -0,0 +1,70 @@ +{%- macro erl_attr_name(text) -%} + {{ text | acronym | replace(".", "_") | upper }} +{%- endmacro -%} + +{%- macro func_name(text) -%} + {{ text | acronym | replace(".", "_") | lower }} +{%- endmacro -%} + +{%- macro file_name(id) -%} + {{ id | acronym | replace(".", "_") | lower }} +{%- endmacro -%} + +{%- macro to_atom(text) -%} +{% if text | split_id | length > 1 -%}:"{{ text }}"{%- else -%}:{{ text }}{%- endif %} +{%- endmacro -%} + +{% macro to_elixir_type(member) -%} + {%- if member.id == member.value -%} + {{ to_atom(member.value) }} + {%- else -%} + {{ member }} + {{ member.type | type_mapping }} + {%- endif -%} +{%- endmacro %} + +{%- macro enum_value_to_elixir_type(value) -%} + {%- if value is string %}{{ to_atom(value) }}{% else -%}{{ value }}{%- endif %} +{%- endmacro -%} + +{%- macro enum_value_return_type(value) -%} + {%- if value is string -%} + atom() | String.t() + {%- elif value is integer -%} + integer() + {%- else -%} + NOT_MAPPED + {%- endif -%} +{%- endmacro -%} + +{%- macro enum_value_return_type_example(value) -%} + {%- if value is string -%} + :custom_value + {%- elif value is integer -%} + 27 + {%- else -%} + NOT_MAPPED + {%- endif -%} +{%- endmacro -%} + +{%- macro erlang_enum_value_return_type_example(value) -%} + {%- if value is string -%} + custom_value + {%- elif value is integer -%} + 27 + {%- else -%} + NOT_MAPPED + {%- endif -%} +{%- endmacro -%} + +{%- macro enum_to_map(members) -%} + {% raw %}%{{% endraw %} + {% for member in members %} + {{ to_atom(member.id) }} => {{ enum_value_to_elixir_type(member.value) }}{% if not loop.last %},{% endif %} + {% endfor %} + {% raw %}}{% endraw %} +{%- endmacro -%} + +{%- macro strong_reqs(string) -%} + {{ string | replace(" MUST ", " **MUST** ") | replace(" MUST NOT ", " **MUST NOT** ") | replace(" SHOULD ", " **SHOULD** ") | replace(" SHOULD NOT ", " **SHOULD NOT** ") | replace(" MAY ", " **MAY** ") | replace(" NOT ", " **NOT** ") }} +{%- endmacro -%} \ No newline at end of file diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_attributes.ex.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_attributes.ex.j2 new file mode 100644 index 00000000..0509b475 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_attributes.ex.j2 @@ -0,0 +1,126 @@ +{%- import 'common.j2' as c %} + +{%- set file_name = ctx.output ~ c.file_name(ctx.id) ~ "_attributes.ex" -%} +{{ template.set_file_name(file_name) }} + +{%- set module_name = ctx.id | pascal_case | acronym ~ "Attributes" -%} +{%- set incubating_module_namespace = "OpenTelemetry.SemConv.Incubating" -%} +{%- set stable_module_namespace = "OpenTelemetry.SemConv" -%} +{%- if params.stability == "experimental" -%} +{%- set module_namespace = incubating_module_namespace -%} +{%- else -%} +{%- set module_namespace = stable_module_namespace -%} +{%- endif -%} +defmodule {{ module_namespace }}.{{ module_name }} do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for {{ ctx.id | title | acronym }} attributes. + """ +{%- if params.stability == "experimental" and (ctx.all_attributes | length) > (ctx.attributes | length) %} +{%- for attribute in ctx.all_attributes | sort(attribute="name") %} + {%- if attribute is stable %} + defdelegate {{ c.func_name(attribute.name) }}(), to: {{ stable_module_namespace }}.{{ module_name }} + {% if attribute.type is mapping %} + defdelegate {{ c.func_name(attribute.name) }}_values(), to: {{ stable_module_namespace }}.{{ module_name }} + {% endif -%} + {% endif -%} +{% endfor %} +{% endif -%} +{%- for attribute in ctx.attributes | sort(attribute="name") %} + {% if attribute.type is mapping %} + @typedoc """ + {{ c.strong_reqs(attribute.brief) }} + + ### Enum Values + {% for member in attribute.type.members -%} + * `{{ c.to_atom(member.id) }}` + {%- if member is experimental %} ^[e](`m:OpenTelemetry.SemConv#experimental`)^{% endif %}{% if member.brief != none %} - {% if member is deprecated %}**deprecated** ~~{% endif %}{{ member.brief }}{% if member is deprecated %}~~{% endif %}{% endif %} + {% endfor -%} + """ + @type {{ c.func_name(attribute.name) }}_values() :: {{ c.enum_to_map(attribute.type.members) }} + {%- endif -%} + + {% if attribute is deprecated %} + @deprecated """ + {{ attribute.deprecated | replace("\n", "\n ") }} + """ + {%- endif -%} + {% if not(attribute is deprecated) %} + @doc """ + {{ c.strong_reqs(attribute.brief | replace("\n", "\n ")) }} + {% if (attribute.type is simple_type) or (attribute.type is template_type) -%} + ### Value type + + Value must be of type `{{ attribute.type | map_text("elixir_types") }}`. + {%- endif %} + {%- if attribute.note %} + ### Notes + + {{ c.strong_reqs(attribute.note | replace("\n", "\n ")) }} + {%- endif %} + {%- if attribute.examples %} + ### Examples + + ``` + {{ attribute.examples }} + ``` + + {%- endif %} + + + {%- if attribute.type is mapping %} + + ### Elixir + + iex> {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}() + {{ c.to_atom(attribute.name) }} + + iex> {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}_values().{{ attribute.type.members|first|attr('id') }} + {{ c.enum_value_to_elixir_type(attribute.type.members|first|attr('value')) }} + + iex> {% raw %}%{{% endraw %}{{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}() => {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}_values().{{ attribute.type.members|first|attr('id') }}{% raw %}}{% endraw %} + {% raw %}%{{% endraw %}{{ c.to_atom(attribute.name) }} => {{ c.enum_value_to_elixir_type(attribute.type.members|first|attr('value')) }}{% raw %}}{% endraw %} + + ### Erlang + + ```erlang + ?{{ c.erl_attr_name(attribute.name) }}. + '{{ attribute.name }}' + + ?{{ c.erl_attr_name(attribute.name) }}_VALUES_{{ attribute.type.members|first|attr('id') | screaming_snake_case }}. + '{{ attribute.type.members|first|attr('value') }}' + + {% raw %}\#{{% endraw %}?{{ c.erl_attr_name(attribute.name) }} => ?{{ c.erl_attr_name(attribute.name) }}_VALUES_{{ attribute.type.members|first|attr('id') | screaming_snake_case }}{% raw %}}{% endraw %}. + {% raw %}\#{{% endraw %}'{{ attribute.name }}' => '{{ attribute.type.members|first|attr('value') }}'{% raw %}}{% endraw %} + ``` + {%- else %} + + ### Elixir + + iex> {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}() + {{ c.to_atom(attribute.name) }} + + ### Erlang + + ```erlang + ?{{ c.erl_attr_name(attribute.name) }}. + '{{ attribute.name }}' + ``` + {%- endif %} + + + """ + {%- endif %} + @spec {{ c.func_name(attribute.name) }} :: {{ c.to_atom(attribute.name) }} + def {{ c.func_name(attribute.name) }} do + {{ c.to_atom(attribute.name) }} + end + + {%- if attribute.type is mapping %} + @spec {{ c.func_name(attribute.name) }}_values() :: {{ c.func_name(attribute.name) }}_values() + def {{ c.func_name(attribute.name) }}_values() do + {{ c.enum_to_map(attribute.type.members) }} + end + {%- endif %} +{% endfor %} +end diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_metrics.ex.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_metrics.ex.j2 new file mode 100644 index 00000000..d22fc609 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_metrics.ex.j2 @@ -0,0 +1,58 @@ +{%- import 'common.j2' as c %} +{%- set file_name = ctx.output ~ c.file_name(ctx.id) ~ "_metrics.ex" -%} +{%- set trim_blocks = true %} +{%- set trim_lstrip_blocks = true %} +{{ template.set_file_name(file_name) }} + +{%- set module_name = ctx.id | pascal_case | acronym ~ "Metrics" -%} +{%- if params.stability == "experimental" -%} +{%- set module_namespace = "OpenTelemetry.SemConv.Incubating.Metrics" -%} +{%- else -%} +{%- set module_namespace = "OpenTelemetry.SemConv.Metrics" -%} +{%- endif -%} +defmodule {{ module_namespace }}.{{ module_name }} do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for {{ ctx.id | title | acronym }} metrics. + """ +{%- for metric in ctx.metrics | sort(attribute="metric_name") %} + {% if metric is deprecated %} + @deprecated """ + {{ metric.deprecated | replace("\n", "\n ") }} + """ + {%- else -%} + @doc """ + {{ c.strong_reqs(metric.brief | replace("\n", "\n ")) }} + + Instrument: `{{ metric.instrument }}` + Unit: `{{ metric.unit }}` + + {%- if metric.note %} + ### Notes + + {{ c.strong_reqs(metric.note | replace("\n", "\n ")) }} + {%- endif %} + + + ### Elixir + + iex> {{ module_namespace }}.{{ module_name }}.{{ c.func_name(metric.metric_name) }}() + {{ c.to_atom(metric.metric_name) }} + + ### Erlang + + ```erlang + ?{{ c.erl_attr_name(metric.metric_name) }}. + '{{ metric.metric_name }}' + ``` + + + """ + {%- endif %} + + @spec {{ c.func_name(metric.metric_name) }} :: {{ c.to_atom(metric.metric_name) }} + def {{ c.func_name(metric.metric_name) }} do + {{ c.to_atom(metric.metric_name) }} + end +{% endfor %} +end diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml new file mode 100644 index 00000000..4e437050 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml @@ -0,0 +1,58 @@ +params: + stability: "stable" + excluded: ["aspnetcore", "dotnet", "go", "ios", "jvm", "kestrel", "nodejs", "signalr", "v8js", "veightjs", "webengine"] + excluded_attrs: ["messaging.client_id"] + +templates: + - pattern: semantic_attributes.ex.j2 + filter: > + .groups + | map(select(.type == "attribute_group")) + | map(select(.id | startswith("registry."))) + | map({ id: .id, group_id: .id | split(".") | .[1], attributes: .attributes}) + | map(select([.attributes[] | select(.stability == $stability)] | any)) + | group_by(.group_id) + | map({ + id: .[0].group_id, + attributes: [.[].attributes[] | select(.stability == $stability) | (select( .name as $id | any( $excluded_attrs[]; . == $id ) | not ))] | sort_by(.id), + all_attributes: [.[].attributes[]] | sort_by(.id), + output: $output + "/attributes/" + }) + | map(select( .id as $id | any( $excluded[]; . == $id) | not )) + | map(select(.attributes | length > 0)) + application_mode: each + - pattern: semantic_metrics.ex.j2 + filter: > + .groups + | map(select(.type == "metric")) + | map(select(.stability == $stability)) + | map({ id: .id, group_id: .id | split(".") | .[1], brief, unit, stability, deprecated, instrument, metric_name, note}) + | group_by(.group_id) + | map({ + id: .[0].group_id, + metrics: . | sort_by(.metric_name), + output: $output + "/metrics/" + }) + | map(select( .id as $id | any( $excluded[]; . == $id) | not )) + | map(select(.metrics | length > 0)) + application_mode: each +text_maps: + elixir_types: + "int": "integer()" + "int[]": "[integer()]" + "double": "float()" + "double[]": "[float()]" + "boolean": "boolean()" + "boolean[]": "[boolean()]" + "string": "atom() | String.t()" + "string[]": "[atom() | String.t()]" + "template[int]": "integer()" + "template[double]": "float()" + "template[boolean]": "boolean()" + "template[string]": "atom() | String.t()" + "template[string[]]": "[atom() | String.t()]" + "template[int[]]": "[integer()]" + "template[double[]]": "[float()]" + "template[boolean[]]": "[boolean()]" + +acronyms: ["iOS", "HTTP", "API", "SDK", "CLI", "URL", "JSON", "XML", "HTML", "TLS", "RPC", "OS", "OCI", "GCP", "FAAS", "DNS", "DB", "AWS", "S3", "K8S" ] diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/common.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/common.j2 new file mode 100644 index 00000000..a169d49d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/common.j2 @@ -0,0 +1,45 @@ +{%- macro attr_name(text) -%} + {{ text | acronym | replace(".", "_") | upper }} +{%- endmacro -%} + +{%- macro file_name(id) -%} + {{ id | acronym | replace(".", "_") | lower }} +{%- endmacro -%} + +{%- macro to_atom(text) -%} +{% if text | split_id | length > 1 -%}:"{{ text }}"{%- else -%}:{{ text }}{%- endif %} +{%- endmacro -%} + +{%- macro enum_value_return_type(value) -%} + {%- if value is string -%} + atom() | String.t() + {%- elif value is integer -%} + integer() + {%- else -%} + NOT_MAPPED + {%- endif -%} +{%- endmacro -%} + +{%- macro enum_value_return_type_example(value) -%} + {%- if value is string -%} + :custom_value + {%- elif value is integer -%} + 27 + {%- else -%} + NOT_MAPPED + {%- endif -%} +{%- endmacro -%} + +{%- macro erlang_enum_value_return_type_example(value) -%} + {%- if value is string -%} + custom_value + {%- elif value is integer -%} + 27 + {%- else -%} + NOT_MAPPED + {%- endif -%} +{%- endmacro -%} + +{%- macro strong_reqs(string) -%} + {{ string | replace(" MUST ", " **MUST** ") | replace(" MUST NOT ", " **MUST NOT** ") | replace(" SHOULD ", " **SHOULD** ") | replace(" SHOULD NOT ", " **SHOULD NOT** ") | replace(" MAY ", " **MAY** ") | replace(" NOT ", " **NOT** ") }} +{%- endmacro -%} \ No newline at end of file diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_attributes.hrl.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_attributes.hrl.j2 new file mode 100644 index 00000000..edc3f77d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_attributes.hrl.j2 @@ -0,0 +1,32 @@ +{%- import 'common.j2' as c %} +{%- set file_name = ctx.output ~ c.file_name(ctx.id) ~ "_attributes.hrl" -%} +{{ template.set_file_name(file_name) }} +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +{%- if params.stability == "experimental" and (ctx.all_attributes | length) > (ctx.attributes | length) %} +-include_lib("opentelemetry_semantic_conventions/include/attributes/{{ c.file_name(ctx.id) }}_attributes.hrl"). +{% endif -%} +{%- for attribute in ctx.attributes | sort(attribute="name") %} +{% if attribute is deprecated -%} +%% @deprecated {{ attribute.deprecated | replace("\n", "\n%% ") }} +{%- endif %} +%% {{ attribute.brief | replace("\n", "\n%% ") }} +-define({{ c.attr_name(attribute.name) }}, '{{ attribute.name }}'). +{%- if attribute.type is mapping %} +{% for member in attribute.type.members %} +-define({{ c.attr_name(attribute.name) }}_VALUES_{{ member.id | screaming_snake_case }}, '{{ member.value }}'). +{% endfor %} +{%- endif %} +{% endfor %} diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_metrics.hrl.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_metrics.hrl.j2 new file mode 100644 index 00000000..169b7e2a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_metrics.hrl.j2 @@ -0,0 +1,25 @@ +{%- import 'common.j2' as c %} +{%- set file_name = ctx.output ~ c.file_name(ctx.id) ~ "_metrics.hrl" -%} +{{ template.set_file_name(file_name) }} +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +{%- for metric in ctx.metrics | sort(attribute="metric_name") %} +{% if metric is deprecated -%} +%% @deprecated {{ metric.deprecated | replace("\n", "\n%% ") }} +{%- endif %} +%% {{ metric.brief | replace("\n", "\n%% ") }} +-define({{ c.attr_name(metric.metric_name) }}, '{{ metric.metric_name }}'). +{% endfor %} diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml new file mode 100644 index 00000000..a82e13ec --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml @@ -0,0 +1,59 @@ +params: + stability: "stable" + excluded: ["android", "aspnetcore", "dotnet", "go", "ios", "jvm", "kestrel", "nodejs", "signalr", "v8js", "veightjs", "webengine"] + excluded_attrs: ["messaging.client_id"] + +templates: + - pattern: semantic_attributes.hrl.j2 + filter: > + .groups + | map(select(.type == "attribute_group")) + | map(select(.id | startswith("registry."))) + | map({ id: .id, group_id: .id | split(".") | .[1], attributes: .attributes}) + | map(select([.attributes[] | select(.stability == $stability)] | any)) + | group_by(.group_id) + | map({ + id: .[0].group_id, + attributes: [.[].attributes[] | select(.stability == $stability) | (select( .name as $id | any( $excluded_attrs[]; . == $id ) | not ))] | sort_by(.id), + all_attributes: [.[].attributes[]], + output: $output + "/attributes/" + }) + | map(select( .id as $id | any( $excluded[]; . == $id) | not )) + | map(select(.attributes | length > 0)) + application_mode: each + - pattern: semantic_metrics.hrl.j2 + filter: > + .groups + | map(select(.type == "metric")) + | map(select(.stability == $stability)) + | map({ id: .id, group_id: .id | split(".") | .[1], brief, unit, stability, deprecated, instrument, metric_name, note}) + | group_by(.group_id) + | map({ + id: .[0].group_id, + metrics: . | sort_by(.metric_name), + output: $output + "/metrics/" + }) + | map(select( .id as $id | any( $excluded[]; . == $id) | not )) + | map(select(.metrics | length > 0)) + application_mode: each + +acronyms: ["iOS", "HTTP", "API", "SDK", "CLI", "URL", "JSON", "XML", "HTML", "TLS", "RPC", "OS", "OCI", "GCP", "FAAS", "DNS", "DB", "AWS", "S3", "K8S" ] + +text_maps: + erlang_types: + "int": "integer()" + "int[]": "[integer()]" + "double": "float()" + "double[]": "[float()]" + "boolean": "boolean()" + "boolean[]": "[boolean()]" + "string": "atom() | binary()" + "string[]": "[atom() | binary()]" + "template[int]": "integer()" + "template[double]": "float()" + "template[boolean]": "boolean()" + "template[string]": "atom() | binary()" + "template[string[]]": "[atom() | binary()]" + "template[int[]]": "[integer()]" + "template[double[]]": "[float()]" + "template[boolean[]]": "[boolean()]" diff --git a/apps/opentelemetry_semantic_conventions/templates/semantic_conventions.ex.j2 b/apps/opentelemetry_semantic_conventions/templates/semantic_conventions.ex.j2 deleted file mode 100644 index 59103d9f..00000000 --- a/apps/opentelemetry_semantic_conventions/templates/semantic_conventions.ex.j2 +++ /dev/null @@ -1,43 +0,0 @@ -{%- macro upFirst(text) -%} - {{ text[0] | upper}}{{text[1:] }} -{%- endmacro -%} -{%- macro funcName(text) -%} - {{ text | regex_replace(pattern="\.", replace="_") }} -{%- endmacro -%} -defmodule OpenTelemetry.SemanticConventions.{{ upFirst(module) }} do - @doc """ - The schema url for telemetry resources. - - iex> OpenTelemetry.SemanticConventions.{{ upFirst(module) }}.{{ module }}_schema_url() - "{{ schema_uri }}" - """ - @spec {{ module }}_schema_url :: String.t() - def {{ module }}_schema_url do - "{{ schema_uri }}" - end - -{%- for attribute in attributes | unique(attribute="fqn") %} - @doc """ - {{ attribute.brief | to_doc_brief | regex_replace(pattern="\n", replace="\n ") }} - {%- if attribute.note %} - - ### Notes - - {{attribute.note | to_doc_brief | regex_replace(pattern="\n", replace="\n ") }} - {%- endif %} - - iex> OpenTelemetry.SemanticConventions.{{ upFirst(module) }}.{{ funcName(attribute.fqn) }}() - :"{{ attribute.fqn }}" - """ - {%- if attribute.deprecated %} - @deprecated """ - {{ attribute.deprecated | to_doc_brief | regex_replace(pattern="\n", replace="\n ") }} - """ - {%- endif %} - @spec {{ funcName(attribute.fqn) }} :: :"{{ attribute.fqn }}" - def {{ funcName(attribute.fqn) }} do - :"{{ attribute.fqn }}" - end - -{%- endfor %} -end diff --git a/apps/opentelemetry_semantic_conventions/templates/semantic_conventions.hrl.j2 b/apps/opentelemetry_semantic_conventions/templates/semantic_conventions.hrl.j2 deleted file mode 100644 index 0af39716..00000000 --- a/apps/opentelemetry_semantic_conventions/templates/semantic_conventions.hrl.j2 +++ /dev/null @@ -1,14 +0,0 @@ -%% The schema url for telemetry resources --define({{ module | to_const_name }}_SCHEMA_URL, <<"{{ schema_uri }}">>). -{# blank line #} -{%- for attribute in attributes | unique(attribute="fqn") %} -%% {{ attribute.brief | to_doc_brief | regex_replace(pattern="\n", replace="\n%% ") }} -{%- if attribute.note %} -%% {{ attribute.note | to_doc_brief | regex_replace(pattern="\n", replace="\n%% ") }} -{%- endif %} -{%- if attribute.deprecated %} -%% @deprecated {{ attribute.deprecated | to_doc_brief | regex_replace(pattern="\n", replace="\n %% ") }} -{%- endif %} --define({{ attribute.fqn | to_const_name }}, '{{ attribute.fqn }}'). -{# blank line #} -{%- endfor %} diff --git a/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/logs_test.exs b/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/logs_test.exs deleted file mode 100644 index 8fb3caa5..00000000 --- a/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/logs_test.exs +++ /dev/null @@ -1,4 +0,0 @@ -defmodule OpenTelemetry.SemanticConventions.LogsTest do - use ExUnit.Case, async: true - doctest OpenTelemetry.SemanticConventions.Logs -end diff --git a/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/registry_test.exs b/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/registry_test.exs new file mode 100644 index 00000000..8489b99c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/registry_test.exs @@ -0,0 +1,22 @@ +contents = + quote do + use ExUnit.Case, async: true + + {:ok, modules} = :application.get_key(:opentelemetry_semantic_conventions, :modules) + + modules_to_test = + Enum.filter(modules, fn module -> + module = to_string(module) + String.starts_with?(module, "Elixir") && String.contains?(module, "SemConv") + end) + + for module <- modules_to_test do + doctest(module) + end + end + +Module.create( + OpenTelemetry.SemanticConventions.RegistryTest, + contents, + Macro.Env.location(__ENV__) +) diff --git a/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/resource_test.exs b/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/resource_test.exs deleted file mode 100644 index ab5c11b0..00000000 --- a/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/resource_test.exs +++ /dev/null @@ -1,4 +0,0 @@ -defmodule OpenTelemetry.SemanticConventions.ResourceTest do - use ExUnit.Case, async: true - doctest OpenTelemetry.SemanticConventions.Resource -end diff --git a/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/sem_conv_test.exs b/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/sem_conv_test.exs new file mode 100644 index 00000000..a8885fbd --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/sem_conv_test.exs @@ -0,0 +1,34 @@ +defmodule OpenTelemetry.SemConvTest do + use ExUnit.Case, async: false + + alias OpenTelemetry.SemConv + + describe "stability_opt_in" do + test "http" do + assert SemConv.stability_opt_in() == %{http: :default} + + System.put_env("OTEL_SEMCONV_STABILITY_OPT_IN", "") + assert SemConv.stability_opt_in() == %{http: :default} + + System.put_env("OTEL_SEMCONV_STABILITY_OPT_IN", "unsupported") + assert SemConv.stability_opt_in() == %{http: :default} + + System.put_env("OTEL_SEMCONV_STABILITY_OPT_IN", "http") + assert SemConv.stability_opt_in() == %{http: :http} + + System.put_env("OTEL_SEMCONV_STABILITY_OPT_IN", "http/dup,http") + assert SemConv.stability_opt_in() == %{http: :http_dup} + + # dup takes precedence + System.put_env("OTEL_SEMCONV_STABILITY_OPT_IN", "http,http/dup") + assert SemConv.stability_opt_in() == %{http: :http_dup} + + System.delete_env("OTEL_SEMCONV_STABILITY_OPT_IN") + end + end + + test "stable attrs are delegated in incubating module" do + assert SemConv.Incubating.HTTPAttributes.http_route() == + SemConv.HTTPAttributes.http_route() + end +end diff --git a/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/trace_test.exs b/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/trace_test.exs deleted file mode 100644 index bc8bf69d..00000000 --- a/apps/opentelemetry_semantic_conventions/test/open_telemetry/semantic_conventions/trace_test.exs +++ /dev/null @@ -1,4 +0,0 @@ -defmodule OpenTelemetry.SemanticConventions.TraceTest do - use ExUnit.Case, async: true - doctest OpenTelemetry.SemanticConventions.Trace -end diff --git a/apps/opentelemetry_semantic_conventions/test/opentelemetry_semconv_SUITE.erl b/apps/opentelemetry_semantic_conventions/test/opentelemetry_semconv_SUITE.erl new file mode 100644 index 00000000..fea72e1e --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/test/opentelemetry_semconv_SUITE.erl @@ -0,0 +1,18 @@ +-module(opentelemetry_semconv_SUITE). + +-compile(export_all). + +-include_lib("stdlib/include/assert.hrl"). +-include_lib("common_test/include/ct.hrl"). + +-include("incubating/attributes/db_attributes.hrl"). +-include("incubating/attributes/http_attributes.hrl"). + +all() -> + [registry_macros]. + +registry_macros(_Config) -> + ?assertEqual('db.system', ?'DB_SYSTEM'), + ?assertEqual('postgresql', ?'DB_SYSTEM_VALUES_POSTGRESQL'), + ?assertEqual('http.route', ?'HTTP_ROUTE'), + ok. diff --git a/apps/opentelemetry_zipkin/src/opentelemetry_zipkin.app.src b/apps/opentelemetry_zipkin/src/opentelemetry_zipkin.app.src index e91f6c63..3191b997 100644 --- a/apps/opentelemetry_zipkin/src/opentelemetry_zipkin.app.src +++ b/apps/opentelemetry_zipkin/src/opentelemetry_zipkin.app.src @@ -8,6 +8,7 @@ inets, opentelemetry_api ]}, + {exclude_paths, ["rebar.lock"]}, {env,[]}, {modules, []}, diff --git a/config/otel-collector-config.yaml b/config/otel-collector-config.yaml index 26729c04..04fd8639 100644 --- a/config/otel-collector-config.yaml +++ b/config/otel-collector-config.yaml @@ -19,8 +19,8 @@ exporters: tls: insecure: true - logging: - loglevel: debug + debug: + verbosity: detailed sampling_initial: 1 sampling_thereafter: 1 extensions: @@ -31,12 +31,12 @@ service: traces: receivers: [otlp] processors: [batch] - exporters: [logging, zipkin, otlp/jaeger] + exporters: [debug, zipkin, otlp/jaeger] metrics: receivers: [otlp] processors: [batch] - exporters: [logging] + exporters: [debug] logs: receivers: [otlp] processors: [batch] - exporters: [logging] + exporters: [debug] diff --git a/docker-compose.yml b/docker-compose.yml index 38fe1ee4..39a3c5ea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3" services: otel: - image: otel/opentelemetry-collector-contrib:0.108.0 + image: otel/opentelemetry-collector-contrib:0.110.0 command: ["--config=/conf/otel-collector-config.yaml"] privileged: true ports: diff --git a/test/otel_tests.exs b/test/otel_tests.exs index 786e0f65..677bda51 100644 --- a/test/otel_tests.exs +++ b/test/otel_tests.exs @@ -259,7 +259,7 @@ defmodule OtelTests do :infinity, 0, [ - {:event, _, "exception", ^attributes} + {:event, _, :exception, ^attributes} ] } )}