diff --git a/.gitignore b/.gitignore index 0180838..9416b9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +.DS_Store .zig-cache/ zig-out/ *.o + +semantic-conventions/ diff --git a/build.zig b/build.zig index 60aba84..05b4607 100644 --- a/build.zig +++ b/build.zig @@ -1,98 +1,31 @@ const std = @import("std"); -// Although this function looks imperative, note that its job is to -// declaratively construct a build graph that will be executed by an external -// runner. pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - const test_filter = b.option([]const u8, "test-filter", "filter for tests") orelse &.{}; - - // This creates a "module", which represents a collection of source files alongside - // some compilation options, such as optimization mode and linked system libraries. - // Every executable or library we compile will be based on one or more modules. const lib_mod = b.addModule("opentelemetry-semconv", .{ - // `root_source_file` is the Zig "entry point" of the module. If a module - // only contains e.g. external object files, you can make this `null`. - // In this case the main source file is merely a path, however, in more - // complicated build scripts, this could be a generated file. - .root_source_file = b.path("src/root.zig"), + .root_source_file = b.path("src/lib.zig"), .target = target, .optimize = optimize, }); - // Now, we will create a static library based on the module we created above. - // This creates a `std.Build.Step.Compile`, which is the build step responsible - // for actually invoking the compiler. const lib = b.addLibrary(.{ .linkage = .static, - .name = "opentelemetry_semconv", + .name = "opentelemetry-semconv", .root_module = lib_mod, }); - // This declares intent for the library to be installed into the standard - // location when the user invokes the "install" step (the default step when - // running `zig build`). b.installArtifact(lib); - // Creates a step for unit testing. This only builds the test executable - // but does not run it. const lib_unit_tests = b.addTest(.{ .root_module = lib_mod, - .filters = &.{test_filter}, }); const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests); - - // Similar to creating the run step earlier, this exposes a `test` step to - // the `zig build --help` menu, providing a way for the user to request - // running the unit tests. - const test_step = b.step("test", "Run unit tests for generated code and tooling"); + const test_step = b.step("test", "Run library tests"); test_step.dependOn(&run_lib_unit_tests.step); - // Automation tool executable - const automation_exe = b.addExecutable(.{ - .name = "semconv-generator", - .root_source_file = b.path("tools/generator/main.zig"), - .target = target, - .optimize = optimize, - }); - - // Add yaml dependency to the automation tool - const yaml_dep = b.dependency("zig_yaml", .{ - .target = target, - .optimize = optimize, - }); - automation_exe.root_module.addImport("yaml", yaml_dep.module("yaml")); - - b.installArtifact(automation_exe); - - // Run command - const run_cmd = b.addRunArtifact(automation_exe); - run_cmd.step.dependOn(b.getInstallStep()); - - if (b.args) |args| { - run_cmd.addArgs(args); - } - - const run_step = b.step("generate", "Run the automation tool to generate semantic convention files"); - run_step.dependOn(&run_cmd.step); - - // Tests - const tool_unit_tests = b.addTest(.{ - .root_source_file = b.path("tools/generator/test.zig"), - .target = target, - .optimize = .Debug, - .filters = &.{test_filter}, - }); - - // Add yaml dependency to tests too - tool_unit_tests.root_module.addImport("yaml", yaml_dep.module("yaml")); - - const run_unit_tests = b.addRunArtifact(tool_unit_tests); - test_step.dependOn(&run_unit_tests.step); - // Examples step const examples_step = b.step("examples", "Build and run all example executables"); diff --git a/build.zig.zon b/build.zig.zon index 2dc3c31..bfbcc01 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,51 +1,16 @@ .{ - // This is the default name used by packages depending on this one. For - // example, when a user runs `zig fetch --save `, this field is used - // as the key in the `dependencies` table. Although the user can choose a - // different name, most users will stick with this provided value. - // - // It is redundant to include "zig" in this name because it is already - // within the Zig package namespace. .name = .opentelemetry_semconv, - - // This is a [Semantic Version](https://semver.org/). - // In a future version of Zig it will be used for package deduplication. - .version = "0.0.0", - - // Together with name, this represents a globally unique package - // identifier. This field is generated by the Zig toolchain when the - // package is first created, and then *never changes*. This allows - // unambiguous detection of one package being an updated version of - // another. - // - // When forking a Zig project, this id should be regenerated (delete the - // field and run `zig build`) if the upstream project is still maintained. - // Otherwise, the fork is *hostile*, attempting to take control over the - // original project's identity. Thus it is recommended to leave the comment - // on the following line intact, so that it shows up in code reviews that - // modify the field. - .fingerprint = 0x87fe0fe4bb512c4, // Changing this has security and trust implications. - - // Tracks the earliest Zig version that the package considers to be a - // supported use case. - .minimum_zig_version = "0.14.1", - - // This field is optional. - // Each dependency must either provide a `url` and `hash`, or a `path`. - // `zig build --fetch` can be used to fetch all dependencies of a package, recursively. - // Once all dependencies are fetched, `zig build` no longer requires - // internet connectivity. - .dependencies = .{ - .zig_yaml = .{ - .url = "https://github.com/kubkon/zig-yaml/archive/refs/tags/0.1.1.tar.gz", - .hash = "zig_yaml-0.1.0-C1161miEAgBCwL3YAEQZwV_4GyaaT2Xqj9nKB6hNe_TL", - }, - }, + .version = "0.1.0", + .minimum_zig_version = "0.15.1", + .dependencies = .{}, .paths = .{ "build.zig", "build.zig.zon", "src", + "examples", + "scripts", "LICENSE", "README.md", }, + .fingerprint = 0x87fe0fed413e058, } diff --git a/examples/basic_usage.zig b/examples/basic_usage.zig index 19fd8fc..04e13cb 100644 --- a/examples/basic_usage.zig +++ b/examples/basic_usage.zig @@ -11,19 +11,19 @@ pub fn main() !void { std.debug.print("--------------------------\n", .{}); // Access HTTP request method attribute - const http_method = semconv.http.Registry.http_request_method; + const http_method = semconv.attribute.http_request_method; std.debug.print("HTTP method attribute: {s}\n", .{http_method.base.name}); std.debug.print(" Brief: {s}\n", .{http_method.base.brief}); std.debug.print(" Stability: {s}\n", .{@tagName(http_method.base.stability)}); // Show available HTTP method values std.debug.print(" Available method values:\n", .{}); - std.debug.print(" GET: {s}\n", .{semconv.http.Registry.requestMethodValue.get.toString()}); - std.debug.print(" POST: {s}\n", .{semconv.http.Registry.requestMethodValue.post.toString()}); - std.debug.print(" PUT: {s}\n", .{semconv.http.Registry.requestMethodValue.put.toString()}); + std.debug.print(" GET: {s}\n", .{semconv.attribute.http_request_methodValue.get.toString()}); + std.debug.print(" POST: {s}\n", .{semconv.attribute.http_request_methodValue.post.toString()}); + std.debug.print(" PUT: {s}\n", .{semconv.attribute.http_request_methodValue.put.toString()}); // Access HTTP status code attribute - const http_status = semconv.http.Registry.http_response_status_code; + const http_status = semconv.attribute.http_response_status_code; std.debug.print("\nHTTP status code attribute: {s}\n", .{http_status.name}); std.debug.print(" Brief: {s}\n", .{http_status.brief}); std.debug.print(" Stability: {s}\n", .{@tagName(http_status.stability)}); @@ -35,16 +35,16 @@ pub fn main() !void { std.debug.print("-------------------------\n", .{}); // Access JVM memory type attribute - const jvm_memory_type = semconv.jvm.Registry.jvm_memory_type; + const jvm_memory_type = semconv.attribute.jvm_memory_type; std.debug.print("JVM memory type attribute: {s}\n", .{jvm_memory_type.base.name}); std.debug.print(" Brief: {s}\n", .{jvm_memory_type.base.brief}); std.debug.print(" Stability: {s}\n", .{@tagName(jvm_memory_type.base.stability)}); std.debug.print(" Available values:\n", .{}); - std.debug.print(" Heap: {s}\n", .{semconv.jvm.Registry.memoryTypeValue.heap.toString()}); - std.debug.print(" Non-heap: {s}\n", .{semconv.jvm.Registry.memoryTypeValue.non_heap.toString()}); + std.debug.print(" Heap: {s}\n", .{semconv.attribute.jvm_memory_typeValue.heap.toString()}); + std.debug.print(" Non-heap: {s}\n", .{semconv.attribute.jvm_memory_typeValue.non_heap.toString()}); // Access JVM GC name attribute - const jvm_gc_name = semconv.jvm.Registry.jvm_gc_name; + const jvm_gc_name = semconv.attribute.jvm_gc_name; std.debug.print("\nJVM GC name attribute: {s}\n", .{jvm_gc_name.name}); std.debug.print(" Brief: {s}\n", .{jvm_gc_name.brief}); std.debug.print(" Stability: {s}\n", .{@tagName(jvm_gc_name.stability)}); @@ -66,4 +66,4 @@ pub fn main() !void { std.debug.print(" - Stability level\n", .{}); std.debug.print(" - Requirement level\n", .{}); std.debug.print(" - Well-known values (for enum attributes)\n", .{}); -} \ No newline at end of file +} diff --git a/scripts/generate-consts-from-spec.sh b/scripts/generate-consts-from-spec.sh new file mode 100755 index 0000000..6227605 --- /dev/null +++ b/scripts/generate-consts-from-spec.sh @@ -0,0 +1,61 @@ +#!/bin/bash +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_DIR="${SCRIPT_DIR}/.." + +# freeze the spec version and generator version to make generation reproducible +SPEC_VERSION=1.36.0 +WEAVER_VERSION=v0.16.1 + +cd "$PROJECT_DIR" + +rm -rf semantic-conventions || true +mkdir semantic-conventions +cd semantic-conventions + +git init +git remote add origin https://github.com/open-telemetry/semantic-conventions.git +git fetch origin "v$SPEC_VERSION" +git reset --hard FETCH_HEAD +cd "$PROJECT_DIR" + +SED=(sed -i) +if [[ "$(uname)" = "Darwin" ]]; then + SED=(sed -i "") +fi + +# Keep `SCHEMA_URL` key in sync with spec version +"${SED[@]}" "s/\(opentelemetry.io\/schemas\/\)[^\"]*\"/\1$SPEC_VERSION\"/" scripts/templates/registry/zig/weaver.yaml + +docker run --rm \ + --mount type=bind,source=$PROJECT_DIR/semantic-conventions/model,target=/home/weaver/source,readonly \ + --mount type=bind,source=$PROJECT_DIR/scripts/templates,target=/home/weaver/templates,readonly \ + --mount type=bind,source=$PROJECT_DIR/src,target=/home/weaver/target \ + otel/weaver:$WEAVER_VERSION \ + registry generate \ + --registry=/home/weaver/source \ + --templates=/home/weaver/templates \ + zig \ + /home/weaver/target/ + +# handle doc generation failures - remove trailing [2] from doc comments +"${SED[@]}" 's/\[2\]\.$//' src/attribute.zig + +# handle escaping ranges like [0,n] / [0.0, ...] in descriptions/notes which will cause broken links +# unescape any mistakenly escaped ranges which actually contained a link +expression=' + s/\[([a-zA-Z0-9\.\s]+,[a-zA-Z0-9\.\s]+)\]/\\[\1\\]/g + s/\\\[([^\]]+)\]\(([^)]+)\)/[\1](\2)/g +' + +"${SED[@]}" -E "${expression}" src/metric.zig +"${SED[@]}" -E "${expression}" src/attribute.zig + +# Fix unclosed HTML tag warnings for in doc comments. +# We replace with Markdown code formatting `key` to prevent the error. +"${SED[@]}" 's//`key`/g' src/attribute.zig + +zig fmt . + +echo "Zig semantic conventions generated successfully!" diff --git a/scripts/templates/registry/zig/attribute.zig.j2 b/scripts/templates/registry/zig/attribute.zig.j2 new file mode 100644 index 0000000..492cac6 --- /dev/null +++ b/scripts/templates/registry/zig/attribute.zig.j2 @@ -0,0 +1,70 @@ +//! Generated from OpenTelemetry semantic conventions specification v{{ params.schema_url | replace('https://opentelemetry.io/schemas/', '') }} +//! This file contains semantic convention attribute definitions. + +const std = @import("std"); +const types = @import("types.zig"); + +{% for root_ns in ctx -%} +{%- for attr in root_ns.attributes | rejectattr("name", "in", params.excluded_attributes) %} +{%- set attr_name = attr.name | replace('.', '_') | replace('-', '_') %} + +{%- if attr.type is mapping and attr.type.members is defined %} +pub const {{ attr_name }}Value = enum { +{%- for member in attr.type.members %} + {%- set member_id = member.id | replace('-', '_') | replace('.', '_') %} + {%- if member_id in ['type', 'align', 'async', 'await', 'break', 'const', 'continue', 'defer', 'else', 'enum', 'error', 'export', 'extern', 'fn', 'for', 'if', 'inline', 'noalias', 'null', 'or', 'orelse', 'packed', 'pub', 'resume', 'return', 'struct', 'suspend', 'switch', 'test', 'threadlocal', 'try', 'union', 'unreachable', 'usingnamespace', 'var', 'volatile', 'while'] or '.' in member.id %} + @"{{ member_id }}", + {%- else %} + {{ member_id }}, + {%- endif %} +{%- endfor %} + + pub fn toString(self: @This()) []const u8 { + return switch (self) { +{%- for member in attr.type.members %} + {%- set member_id = member.id | replace('-', '_') | replace('.', '_') %} + {%- if member_id in ['type', 'align', 'async', 'await', 'break', 'const', 'continue', 'defer', 'else', 'enum', 'error', 'export', 'extern', 'fn', 'for', 'if', 'inline', 'noalias', 'null', 'or', 'orelse', 'packed', 'pub', 'resume', 'return', 'struct', 'suspend', 'switch', 'test', 'threadlocal', 'try', 'union', 'unreachable', 'usingnamespace', 'var', 'volatile', 'while'] or '.' in member.id %} + .@"{{ member_id }}" => "{{ member.value }}", + {%- else %} + .{{ member_id }} => "{{ member.value }}", + {%- endif %} +{%- endfor %} + }; + } +}; + +/// {{ attr.brief }} +pub const {{ attr_name }} = types.EnumAttribute({{ attr_name }}Value){ + .base = types.StringAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('"', '\\"') | replace('\n', ' ') | trim }}", + {%- if attr.note %} + .note = {{ '"' + attr.note | replace('\\', '\\\\') | replace('<', '[') | replace('>', ']') | replace('"', '\\"') | replace('\n', ' ') | trim + '"' }}, + {%- endif %} + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.recommended' }}, + }, + .well_known_values = {{ attr_name }}Value.{% set first_member = attr.type.members[0].id | replace('-', '_') | replace('.', '_') %}{% if first_member in ['type', 'align', 'async', 'await', 'break', 'const', 'continue', 'defer', 'else', 'enum', 'error', 'export', 'extern', 'fn', 'for', 'if', 'inline', 'noalias', 'null', 'or', 'orelse', 'packed', 'pub', 'resume', 'return', 'struct', 'suspend', 'switch', 'test', 'threadlocal', 'try', 'union', 'unreachable', 'usingnamespace', 'var', 'volatile', 'while'] or '.' in attr.type.members[0].id %}@"{{ first_member }}"{% else %}{{ first_member }}{% endif %}, +}; + +{%- else %} + +/// {{ attr.brief }} +pub const {{ attr_name }} = types.StringAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('"', '\\"') | replace('\n', ' ') | trim }}", + {%- if attr.note %} + .note = {{ '"' + attr.note | replace('\\', '\\\\') | replace('<', '[') | replace('>', ']') | replace('"', '\\"') | replace('\n', ' ') | trim + '"' }}, + {%- endif %} + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.recommended' }}, +}; + +{%- endif %} + +{%- endfor %} +{%- endfor %} + +test "semantic attributes" { + std.testing.refAllDecls(@This()); +} diff --git a/scripts/templates/registry/zig/lib.zig.j2 b/scripts/templates/registry/zig/lib.zig.j2 new file mode 100644 index 0000000..c368428 --- /dev/null +++ b/scripts/templates/registry/zig/lib.zig.j2 @@ -0,0 +1,18 @@ +//! OpenTelemetry semantic conventions are agreed standardized naming patterns +//! for OpenTelemetry things. This module aims to be the centralized place to +//! interact with these conventions. +//! +//! Generated from OpenTelemetry semantic conventions specification. + +pub const attribute = @import("attribute.zig"); +pub const metric = @import("metric.zig"); +pub const resource = @import("resource.zig"); +pub const trace = @import("trace.zig"); + +/// The schema URL that matches the version of the semantic conventions that +/// this module defines. +pub const SCHEMA_URL: []const u8 = "{{ params.schema_url }}"; + +test "semantic conventions" { + @import("std").testing.refAllDecls(@This()); +} \ No newline at end of file diff --git a/scripts/templates/registry/zig/metric.zig.j2 b/scripts/templates/registry/zig/metric.zig.j2 new file mode 100644 index 0000000..28b1c36 --- /dev/null +++ b/scripts/templates/registry/zig/metric.zig.j2 @@ -0,0 +1,87 @@ +// DO NOT EDIT, this is an auto-generated file +// +// If you want to update the file: +// - Edit the template at scripts/templates/registry/zig/metric.zig.j2 +// - Run the script at scripts/generate-consts-from-spec.sh + +//! # Semantic Metrics +//! +//! The entire set of semantic metrics (or [conventions](https://opentelemetry.io/docs/concepts/semantic-conventions/)) defined by the project. + +const std = @import("std"); +const types = @import("types.zig"); + +{% for root_ns in ctx %} + {% for metric in root_ns.metrics %} +{# Escape any `<...>` tags to `[...]` to avoid documentation parsing issues. #} +{% set safe_note = metric.note | replace('<', '[') | replace('>', ']') %} +{% if metric.brief and metric.brief is string %} +{% set brief_lines = metric.brief | split('\n') %} +{% for line in brief_lines %} +/// {{ line | trim }} +{% endfor %} +{% else %} +/// {{ metric.brief | default('') }} +{% endif %} +{% if safe_note %} +/// +/// Notes: {{ safe_note | replace('\n', ' ') | replace(' ', ' ') | trim }} +{% endif %} +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `{{ metric.instrument }}` | `{{ metric.unit }}` | `{{ metric.stability | capitalize }}` | +{% if metric.attributes %} +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | + {% for attribute in metric.attributes | rejectattr("name", "in", params.excluded_attributes) | sort(attribute="name") %} + {% if attribute.requirement_level %} + {% if attribute.requirement_level.conditionally_required %} + {% set req_level = "Conditionally_required" %} + {% set req_message = attribute.requirement_level.conditionally_required %} + {% else %} + {% set req_level = (attribute.requirement_level | capitalize) %} + {% set req_message = attribute.requirement_level_msg %} + {% endif %} + {% else %} + {% set req_level = "Unspecified" %} + {% set req_message = '' %} + {% endif %} +/// | `{{ attribute.name }}` | `{{ req_level }}`{{ (': ' + req_message.replace('\n', ' ') if req_message else '') }} | + {% endfor %} +{% endif %} +{% if metric.examples %} +/// +/// ## Examples + {% for example in metric.examples %} +/// - {{ example | replace('\n', '\\n') | replace('"', '\\"') }} + {% endfor %} +{% endif %} +{% if metric.stability == 'experimental' or metric.requirement_level == 'opt_in' %} +/// +/// Note: This metric is experimental and may change in the future. +{% endif %} +{% if metric.deprecated %} +/// +/// Note: This metric is deprecated. {{ metric.deprecated.note | default(metric.deprecated) }} +{% endif %} +pub const {{ metric.metric_name | snake_case }} = types.Metric{ + .name = "{{ metric.metric_name }}", + .brief = "{{ metric.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if metric.stability == 'stable' else '.development' if metric.stability == 'development' else '.experimental' if metric.stability == 'experimental' else '.deprecated' if metric.deprecated else '.development' }}, + .instrument = {{ '.counter' if metric.instrument == 'counter' else '.gauge' if metric.instrument == 'gauge' else '.updowncounter' if metric.instrument == 'updowncounter' else '.histogram' if metric.instrument == 'histogram' else '.gauge' }}, + .unit = "{{ metric.unit | default('') }}", + .value_type = {{ '.int' if metric.value_type == 'int' else '.double' }}, +{% if metric.deprecated %} .deprecated_reason = "{{ metric.deprecated.note | default(metric.deprecated) | replace('"', '\\"') }}", +{% endif %} +}; + + {% endfor %} +{% endfor %} + +test "semantic metrics" { + @import("std").testing.refAllDecls(@This()); +} \ No newline at end of file diff --git a/scripts/templates/registry/zig/resource.zig.j2 b/scripts/templates/registry/zig/resource.zig.j2 new file mode 100644 index 0000000..074336f --- /dev/null +++ b/scripts/templates/registry/zig/resource.zig.j2 @@ -0,0 +1,86 @@ +// DO NOT EDIT, this is an auto-generated file +// +// If you want to update the file: +// - Edit the template at scripts/templates/registry/zig/resource.zig.j2 +// - Run the script at scripts/generate-consts-from-spec.sh + +//! # Semantic Resource Attributes +//! +//! The entire set of semantic resource attributes (or [conventions](https://opentelemetry.io/docs/concepts/semantic-conventions/)) defined by the project. + +const std = @import("std"); +const types = @import("types.zig"); + +{% for attr in ctx %} +{# Escape any `<...>` tags to `[...]` to avoid documentation parsing issues. #} +{% set safe_note = attr.note | replace('<', '[') | replace('>', ']') %} +/// {{ attr.brief }} +{% if safe_note %} +/// +/// ## Notes +/// +/// {{ safe_note }} +{% endif %} +{% if attr.examples %} +/// +/// # Examples +/// +{% if attr.examples is sequence %} + {% for example in attr.examples %} +/// - {{ example | replace('\n', '\\n') | replace('"', '\\"') }} + {% endfor %} +{% else %} +/// - {{ attr.examples | replace('\n', '\\n') | replace('"', '\\"') }} +{% endif %} +{% endif %} +{% if attr is experimental %} +/// Note: This attribute is experimental and may change in the future. +{% endif %} +{% if attr is deprecated %} +/// Note: This attribute is deprecated. {{ attr.deprecated }} +{% endif %} +{# Generate simple attribute #} +{% set attr_name = attr.name | replace('.', '_') | replace('-', '_') | snake_case %} +{% if attr.type == 'string' %} +pub const {{ attr_name }} = types.StringAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% elif attr.type == 'int' %} +pub const {{ attr_name }} = types.IntAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% elif attr.type == 'double' %} +pub const {{ attr_name }} = types.DoubleAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% elif attr.type == 'boolean' %} +pub const {{ attr_name }} = types.BooleanAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% else %} +{# Fallback to StringAttribute #} +pub const {{ attr_name }} = types.StringAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% endif %} + +{% endfor %} + +test "semantic resource attributes" { + @import("std").testing.refAllDecls(@This()); +} \ No newline at end of file diff --git a/scripts/templates/registry/zig/trace.zig.j2 b/scripts/templates/registry/zig/trace.zig.j2 new file mode 100644 index 0000000..adb5fa6 --- /dev/null +++ b/scripts/templates/registry/zig/trace.zig.j2 @@ -0,0 +1,86 @@ +// DO NOT EDIT, this is an auto-generated file +// +// If you want to update the file: +// - Edit the template at scripts/templates/registry/zig/trace.zig.j2 +// - Run the script at scripts/generate-consts-from-spec.sh + +//! # Semantic Trace Attributes +//! +//! The entire set of semantic trace attributes (or [conventions](https://opentelemetry.io/docs/concepts/semantic-conventions/)) defined by the project. + +const std = @import("std"); +const types = @import("types.zig"); + +{% for attr in ctx %} +{# Escape any `<...>` tags to `[...]` to avoid documentation parsing issues. #} +{% set safe_note = attr.note | replace('<', '[') | replace('>', ']') %} +/// {{ attr.brief }} +{% if safe_note %} +/// +/// ## Notes +/// +/// {{ safe_note }} +{% endif %} +{% if attr.examples %} +/// +/// # Examples +/// +{% if attr.examples is sequence %} + {% for example in attr.examples %} +/// - {{ example | replace('\n', '\\n') | replace('"', '\\"') }} + {% endfor %} +{% else %} +/// - {{ attr.examples | replace('\n', '\\n') | replace('"', '\\"') }} +{% endif %} +{% endif %} +{% if attr is experimental %} +/// Note: This attribute is experimental and may change in the future. +{% endif %} +{% if attr is deprecated %} +/// Note: This attribute is deprecated. {{ attr.deprecated }} +{% endif %} +{# Generate simple attribute #} +{% set attr_name = attr.name | replace('.', '_') | replace('-', '_') | snake_case %} +{% if attr.type == 'string' %} +pub const {{ attr_name }} = types.StringAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% elif attr.type == 'int' %} +pub const {{ attr_name }} = types.IntAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% elif attr.type == 'double' %} +pub const {{ attr_name }} = types.DoubleAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% elif attr.type == 'boolean' %} +pub const {{ attr_name }} = types.BooleanAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% else %} +{# Fallback to StringAttribute #} +pub const {{ attr_name }} = types.StringAttribute{ + .name = "{{ attr.name }}", + .brief = "{{ attr.brief | replace('\\', '\\\\') | replace('"', '\\"') | replace('\n', ' ') | trim }}", + .stability = {{ '.stable' if attr.stability == 'stable' else '.development' if attr.stability == 'development' else '.experimental' if attr.stability == 'experimental' else '.deprecated' if attr.deprecated else '.development' }}, + .requirement_level = {{ '.required' if attr.requirement_level == 'required' else '.recommended' if attr.requirement_level == 'recommended' else '.opt_in' if attr.requirement_level == 'opt_in' else '.conditionally_required' if attr.requirement_level == 'conditionally_required' else '.opt_in' }}, +}; +{% endif %} + +{% endfor %} + +test "semantic trace attributes" { + @import("std").testing.refAllDecls(@This()); +} \ No newline at end of file diff --git a/scripts/templates/registry/zig/weaver.yaml b/scripts/templates/registry/zig/weaver.yaml new file mode 100644 index 0000000..4078f78 --- /dev/null +++ b/scripts/templates/registry/zig/weaver.yaml @@ -0,0 +1,88 @@ +# Whitespace control settings to simplify the definition of templates +whitespace_control: + trim_blocks: true + lstrip_blocks: true + +# Configuration for the comment formatting +comment_formats: + zig: + format: markdown + prefix: "/// " + trim: true + remove_trailing_dots: true + escape_square_brackets: true +default_comment_format: zig + +params: + schema_url: "https://opentelemetry.io/schemas/1.36.0" + exclude_root_namespace: [] + excluded_attributes: ["messaging.client_id"] + +templates: + - pattern: lib.zig.j2 + filter: . + application_mode: single + file_name: lib.zig + - pattern: attribute.zig.j2 + filter: semconv_grouped_attributes($params) + application_mode: single + file_name: attribute.zig + - pattern: metric.zig.j2 + filter: semconv_grouped_metrics($params) + application_mode: single + file_name: metric.zig + - pattern: resource.zig.j2 + filter: > + semconv_signal("resource"; $params) + | map(.attributes[]) + | unique_by(.name) + | sort_by(.name) + | map({name, brief, examples, deprecated, requirement_level, stability, type}) + application_mode: single + file_name: resource.zig + - pattern: trace.zig.j2 + filter: > + semconv_signal("span"; $params) + semconv_signal("event"; $params) + | map(.attributes[]) + | unique_by(.name) + | sort_by(.name) + | map({name, brief, examples, deprecated, requirement_level, stability, type}) + application_mode: single + file_name: trace.zig + +acronyms: + - AI + - AWS + - CICD + - CloudEvents + - CloudFoundry + - CLR + - CPython + - CPU + - CSI + - DB + - DNS + - DynamoDB + - ECS + - EKS + - GCE + - GCP + - GraphQL + - HTTP + - iOS + - JVM + - NodeJS + - OCI + - OpenTracing + - OracleDB + - OS + - OTel + - RabbitMQ + - RocketMQ + - RPC + - S3 + - SignalR + - TLS + - URL + - VCS + - zOS \ No newline at end of file diff --git a/src/android/android.zig b/src/android/android.zig deleted file mode 100644 index b2808cf..0000000 --- a/src/android/android.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! android semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/android/registry.zig b/src/android/registry.zig deleted file mode 100644 index 8e832f5..0000000 --- a/src/android/registry.zig +++ /dev/null @@ -1,45 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: android -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const appStateValue = enum { - /// Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time. - created, - /// 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. - background, - /// 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. - foreground, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .created => "created", - .background => "background", - .foreground => "foreground", - }; - } -}; - -/// Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found in the [Android API levels documentation](https://developer.android.com/guide/topics/manifest/uses-sdk-element -pub const android_os_api_level = types.StringAttribute{ - .name = "android.os.api_level", - .brief = "Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found in the [Android API levels documentation](https://developer.android.com/guide/topics/manifest/uses-sdk-element", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// This attribute represents the state of the application. -pub const android_app_state = types.EnumAttribute(appStateValue){ - .base = types.StringAttribute{ - .name = "android.app.state", - .brief = "This attribute represents the state of the application.", - .note = "The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle and from which the `OS identifiers` are derived.", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = appStateValue.created, -}; - diff --git a/src/app/app.zig b/src/app/app.zig deleted file mode 100644 index dd78ef8..0000000 --- a/src/app/app.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! app semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/app/registry.zig b/src/app/registry.zig deleted file mode 100644 index 01dbf85..0000000 --- a/src/app/registry.zig +++ /dev/null @@ -1,88 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: app -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// A unique identifier representing the installation of an application on a specific device -pub const app_installation_id = types.StringAttribute{ - .name = "app.installation.id", - .brief = "A unique identifier representing the installation of an application on a specific device", - .note = "Its value SHOULD persist across launches of the same application installation, including through application upgrades.\nIt SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled.\nAdditionally, users might be able to reset this value (e.g. by clearing application data).\nIf an app is installed multiple times on the same device (e.g. in different accounts on Android), each `app.installation.id` SHOULD have a different value.\nIf multiple OpenTelemetry SDKs are used within the same application, they SHOULD use the same value for `app.installation.id`.\nHardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the `app.installation.id`.\n\nFor iOS, this value SHOULD be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor).\n\nFor Android, examples of `app.installation.id` implementations include:\n\n- [Firebase Installation ID](https://firebase.google.com/docs/projects/manage-installations).\n- A globally unique UUID which is persisted across sessions in your application.\n- [App set ID](https://developer.android.com/identity/app-set-id).\n- [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure\n\nMore information about Android identifier best practices can be found in the [Android user data IDs guide](https://developer.android.com/training/articles/user-data-ids).", - .stability = .development, - .requirement_level = .recommended, -}; - -/// A number of frame renders that experienced jank. -pub const app_jank_frame_count = types.StringAttribute{ - .name = "app.jank.frame_count", - .brief = "A number of frame renders that experienced jank.", - .note = "Depending on platform limitations, the value provided MAY be approximation.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The minimum rendering threshold for this jank, in seconds. -pub const app_jank_threshold = types.StringAttribute{ - .name = "app.jank.threshold", - .brief = "The minimum rendering threshold for this jank, in seconds.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The time period, in seconds, for which this jank is being reported. -pub const app_jank_period = types.StringAttribute{ - .name = "app.jank.period", - .brief = "The time period, in seconds, for which this jank is being reported.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The x (horizontal) coordinate of a screen coordinate, in screen pixels. -pub const app_screen_coordinate_x = types.StringAttribute{ - .name = "app.screen.coordinate.x", - .brief = "The x (horizontal) coordinate of a screen coordinate, in screen pixels.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The y (vertical) component of a screen coordinate, in screen pixels. -pub const app_screen_coordinate_y = types.StringAttribute{ - .name = "app.screen.coordinate.y", - .brief = "The y (vertical) component of a screen coordinate, in screen pixels.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// An identifier that uniquely differentiates this widget from other widgets in the same application. -pub const app_widget_id = types.StringAttribute{ - .name = "app.widget.id", - .brief = "An identifier that uniquely differentiates this widget from other widgets in the same application.", - .note = "A widget is an application component, typically an on-screen visual GUI element.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of an application widget. -pub const app_widget_name = types.StringAttribute{ - .name = "app.widget.name", - .brief = "The name of an application widget.", - .note = "A widget is an application component, typically an on-screen visual GUI element.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Unique identifier for a particular build or compilation of the application. -pub const app_build_id = types.StringAttribute{ - .name = "app.build_id", - .brief = "Unique identifier for a particular build or compilation of the application.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/attribute.zig b/src/attribute.zig new file mode 100644 index 0000000..65d649a --- /dev/null +++ b/src/attribute.zig @@ -0,0 +1,8249 @@ +//! Generated from OpenTelemetry semantic conventions specification v1.36.0 +//! This file contains semantic convention attribute definitions. + +const std = @import("std"); +const types = @import("types.zig"); + +pub const android_app_stateValue = enum { + created, + background, + foreground, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .created => "created", + .background => "background", + .foreground => "foreground", + }; + } +}; + +/// This attribute represents the state of the application. +pub const android_app_state = types.EnumAttribute(android_app_stateValue){ + .base = types.StringAttribute{ + .name = "android.app.state", + .brief = "This attribute represents the state of the application.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = android_app_stateValue.created, +}; +/// 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). +pub const android_os_api_level = types.StringAttribute{ + .name = "android.os.api_level", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +pub const android_stateValue = enum { + created, + background, + foreground, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .created => "created", + .background => "background", + .foreground => "foreground", + }; + } +}; + +/// Deprecated. Use `android.app.state` body field instead. +pub const android_state = types.EnumAttribute(android_stateValue){ + .base = types.StringAttribute{ + .name = "android.state", + .brief = "Deprecated. Use `android.app.state` body field instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = android_stateValue.created, +}; +/// A unique identifier representing the installation of an application on a specific device +pub const app_installation_id = types.StringAttribute{ + .name = "app.installation.id", + .brief = "A unique identifier representing the installation of an application on a specific device", + .note = "Its value SHOULD persist across launches of the same application installation, including through application upgrades. It SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled. Additionally, users might be able to reset this value (e.g. by clearing application data). If an app is installed multiple times on the same device (e.g. in different accounts on Android), each `app.installation.id` SHOULD have a different value. If multiple OpenTelemetry SDKs are used within the same application, they SHOULD use the same value for `app.installation.id`. Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the `app.installation.id`. For iOS, this value SHOULD be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor). For Android, examples of `app.installation.id` implementations include: - [Firebase Installation ID](https://firebase.google.com/docs/projects/manage-installations). - A globally unique UUID which is persisted across sessions in your application. - [App set ID](https://developer.android.com/identity/app-set-id). - [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID). More information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The x (horizontal) coordinate of a screen coordinate, in screen pixels. +pub const app_screen_coordinate_x = types.StringAttribute{ + .name = "app.screen.coordinate.x", + .brief = "The x (horizontal) coordinate of a screen coordinate, in screen pixels.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The y (vertical) component of a screen coordinate, in screen pixels. +pub const app_screen_coordinate_y = types.StringAttribute{ + .name = "app.screen.coordinate.y", + .brief = "The y (vertical) component of a screen coordinate, in screen pixels.", + .stability = .development, + .requirement_level = .recommended, +}; +/// An identifier that uniquely differentiates this widget from other widgets in the same application. +pub const app_widget_id = types.StringAttribute{ + .name = "app.widget.id", + .brief = "An identifier that uniquely differentiates this widget from other widgets in the same application.", + .note = "A widget is an application component, typically an on-screen visual GUI element.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of an application widget. +pub const app_widget_name = types.StringAttribute{ + .name = "app.widget.name", + .brief = "The name of an application widget.", + .note = "A widget is an application component, typically an on-screen visual GUI element.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const artifact_attestation_filename = types.StringAttribute{ + .name = "artifact.attestation.filename", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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](https://github.com/in-toto/attestation/tree/main/spec) also refer to this as the **digest**. +pub const artifact_attestation_hash = types.StringAttribute{ + .name = "artifact.attestation.hash", + .brief = "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](https://github.com/in-toto/attestation/tree/main/spec) also refer to this as the **digest**.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The id of the build [software attestation](https://slsa.dev/attestation-model). +pub const artifact_attestation_id = types.StringAttribute{ + .name = "artifact.attestation.id", + .brief = "The id of the build [software attestation](https://slsa.dev/attestation-model).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const artifact_filename = types.StringAttribute{ + .name = "artifact.filename", + .brief = "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.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const artifact_hash = types.StringAttribute{ + .name = "artifact.hash", + .brief = "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.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const artifact_purl = types.StringAttribute{ + .name = "artifact.purl", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version of the artifact. +pub const artifact_version = types.StringAttribute{ + .name = "artifact.version", + .brief = "The version of the artifact.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const aspnetcore_diagnostics_exception_resultValue = enum { + handled, + unhandled, + skipped, + aborted, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .handled => "handled", + .unhandled => "unhandled", + .skipped => "skipped", + .aborted => "aborted", + }; + } +}; + +/// ASP.NET Core exception middleware handling result +pub const aspnetcore_diagnostics_exception_result = types.EnumAttribute(aspnetcore_diagnostics_exception_resultValue){ + .base = types.StringAttribute{ + .name = "aspnetcore.diagnostics.exception.result", + .brief = "ASP.NET Core exception middleware handling result", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = aspnetcore_diagnostics_exception_resultValue.handled, +}; +/// Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception. +pub const aspnetcore_diagnostics_handler_type = types.StringAttribute{ + .name = "aspnetcore.diagnostics.handler.type", + .brief = "Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Rate limiting policy name. +pub const aspnetcore_rate_limiting_policy = types.StringAttribute{ + .name = "aspnetcore.rate_limiting.policy", + .brief = "Rate limiting policy name.", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const aspnetcore_rate_limiting_resultValue = enum { + acquired, + endpoint_limiter, + global_limiter, + request_canceled, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .acquired => "acquired", + .endpoint_limiter => "endpoint_limiter", + .global_limiter => "global_limiter", + .request_canceled => "request_canceled", + }; + } +}; + +/// Rate-limiting result, shows whether the lease was acquired or contains a rejection reason +pub const aspnetcore_rate_limiting_result = types.EnumAttribute(aspnetcore_rate_limiting_resultValue){ + .base = types.StringAttribute{ + .name = "aspnetcore.rate_limiting.result", + .brief = "Rate-limiting result, shows whether the lease was acquired or contains a rejection reason", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = aspnetcore_rate_limiting_resultValue.acquired, +}; +/// Flag indicating if request was handled by the application pipeline. +pub const aspnetcore_request_is_unhandled = types.StringAttribute{ + .name = "aspnetcore.request.is_unhandled", + .brief = "Flag indicating if request was handled by the application pipeline.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// A value that indicates whether the matched route is a fallback route. +pub const aspnetcore_routing_is_fallback = types.StringAttribute{ + .name = "aspnetcore.routing.is_fallback", + .brief = "A value that indicates whether the matched route is a fallback route.", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const aspnetcore_routing_match_statusValue = enum { + success, + failure, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .success => "success", + .failure => "failure", + }; + } +}; + +/// Match result - success or failure +pub const aspnetcore_routing_match_status = types.EnumAttribute(aspnetcore_routing_match_statusValue){ + .base = types.StringAttribute{ + .name = "aspnetcore.routing.match_status", + .brief = "Match result - success or failure", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = aspnetcore_routing_match_statusValue.success, +}; +/// The unique identifier of the AWS Bedrock Guardrail. A [guardrail](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) helps safeguard and prevent unwanted behavior from model responses or user messages. +pub const aws_bedrock_guardrail_id = types.StringAttribute{ + .name = "aws.bedrock.guardrail.id", + .brief = "The unique identifier of the AWS Bedrock Guardrail. A [guardrail](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) helps safeguard and prevent unwanted behavior from model responses or user messages.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier of the AWS Bedrock Knowledge base. A [knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) is a bank of information that can be queried by models to generate more relevant responses and augment prompts. +pub const aws_bedrock_knowledge_base_id = types.StringAttribute{ + .name = "aws.bedrock.knowledge_base.id", + .brief = "The unique identifier of the AWS Bedrock Knowledge base. A [knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) is a bank of information that can be queried by models to generate more relevant responses and augment prompts.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The JSON-serialized value of each item in the `AttributeDefinitions` request field. +pub const aws_dynamodb_attribute_definitions = types.StringAttribute{ + .name = "aws.dynamodb.attribute_definitions", + .brief = "The JSON-serialized value of each item in the `AttributeDefinitions` request field.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `AttributesToGet` request parameter. +pub const aws_dynamodb_attributes_to_get = types.StringAttribute{ + .name = "aws.dynamodb.attributes_to_get", + .brief = "The value of the `AttributesToGet` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `ConsistentRead` request parameter. +pub const aws_dynamodb_consistent_read = types.StringAttribute{ + .name = "aws.dynamodb.consistent_read", + .brief = "The value of the `ConsistentRead` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The JSON-serialized value of each item in the `ConsumedCapacity` response field. +pub const aws_dynamodb_consumed_capacity = types.StringAttribute{ + .name = "aws.dynamodb.consumed_capacity", + .brief = "The JSON-serialized value of each item in the `ConsumedCapacity` response field.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `Count` response parameter. +pub const aws_dynamodb_count = types.StringAttribute{ + .name = "aws.dynamodb.count", + .brief = "The value of the `Count` response parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `ExclusiveStartTableName` request parameter. +pub const aws_dynamodb_exclusive_start_table = types.StringAttribute{ + .name = "aws.dynamodb.exclusive_start_table", + .brief = "The value of the `ExclusiveStartTableName` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. +pub const aws_dynamodb_global_secondary_index_updates = types.StringAttribute{ + .name = "aws.dynamodb.global_secondary_index_updates", + .brief = "The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field +pub const aws_dynamodb_global_secondary_indexes = types.StringAttribute{ + .name = "aws.dynamodb.global_secondary_indexes", + .brief = "The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `IndexName` request parameter. +pub const aws_dynamodb_index_name = types.StringAttribute{ + .name = "aws.dynamodb.index_name", + .brief = "The value of the `IndexName` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The JSON-serialized value of the `ItemCollectionMetrics` response field. +pub const aws_dynamodb_item_collection_metrics = types.StringAttribute{ + .name = "aws.dynamodb.item_collection_metrics", + .brief = "The JSON-serialized value of the `ItemCollectionMetrics` response field.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `Limit` request parameter. +pub const aws_dynamodb_limit = types.StringAttribute{ + .name = "aws.dynamodb.limit", + .brief = "The value of the `Limit` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. +pub const aws_dynamodb_local_secondary_indexes = types.StringAttribute{ + .name = "aws.dynamodb.local_secondary_indexes", + .brief = "The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `ProjectionExpression` request parameter. +pub const aws_dynamodb_projection = types.StringAttribute{ + .name = "aws.dynamodb.projection", + .brief = "The value of the `ProjectionExpression` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. +pub const aws_dynamodb_provisioned_read_capacity = types.StringAttribute{ + .name = "aws.dynamodb.provisioned_read_capacity", + .brief = "The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. +pub const aws_dynamodb_provisioned_write_capacity = types.StringAttribute{ + .name = "aws.dynamodb.provisioned_write_capacity", + .brief = "The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `ScanIndexForward` request parameter. +pub const aws_dynamodb_scan_forward = types.StringAttribute{ + .name = "aws.dynamodb.scan_forward", + .brief = "The value of the `ScanIndexForward` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `ScannedCount` response parameter. +pub const aws_dynamodb_scanned_count = types.StringAttribute{ + .name = "aws.dynamodb.scanned_count", + .brief = "The value of the `ScannedCount` response parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `Segment` request parameter. +pub const aws_dynamodb_segment = types.StringAttribute{ + .name = "aws.dynamodb.segment", + .brief = "The value of the `Segment` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `Select` request parameter. +pub const aws_dynamodb_select = types.StringAttribute{ + .name = "aws.dynamodb.select", + .brief = "The value of the `Select` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The number of items in the `TableNames` response parameter. +pub const aws_dynamodb_table_count = types.StringAttribute{ + .name = "aws.dynamodb.table_count", + .brief = "The number of items in the `TableNames` response parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The keys in the `RequestItems` object field. +pub const aws_dynamodb_table_names = types.StringAttribute{ + .name = "aws.dynamodb.table_names", + .brief = "The keys in the `RequestItems` object field.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The value of the `TotalSegments` request parameter. +pub const aws_dynamodb_total_segments = types.StringAttribute{ + .name = "aws.dynamodb.total_segments", + .brief = "The value of the `TotalSegments` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). +pub const aws_ecs_cluster_arn = types.StringAttribute{ + .name = "aws.ecs.cluster.arn", + .brief = "The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). +pub const aws_ecs_container_arn = types.StringAttribute{ + .name = "aws.ecs.container.arn", + .brief = "The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).", + .stability = .development, + .requirement_level = .recommended, +}; +pub const aws_ecs_launchtypeValue = enum { + ec2, + fargate, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .ec2 => "ec2", + .fargate => "fargate", + }; + } +}; + +/// The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. +pub const aws_ecs_launchtype = types.EnumAttribute(aws_ecs_launchtypeValue){ + .base = types.StringAttribute{ + .name = "aws.ecs.launchtype", + .brief = "The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = aws_ecs_launchtypeValue.ec2, +}; +/// The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). +pub const aws_ecs_task_arn = types.StringAttribute{ + .name = "aws.ecs.task.arn", + .brief = "The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const aws_ecs_task_family = types.StringAttribute{ + .name = "aws.ecs.task.family", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ID of a running ECS task. The ID MUST be extracted from `task.arn`. +pub const aws_ecs_task_id = types.StringAttribute{ + .name = "aws.ecs.task.id", + .brief = "The ID of a running ECS task. The ID MUST be extracted from `task.arn`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The revision for the task definition used to create the ECS task. +pub const aws_ecs_task_revision = types.StringAttribute{ + .name = "aws.ecs.task.revision", + .brief = "The revision for the task definition used to create the ECS task.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ARN of an EKS cluster. +pub const aws_eks_cluster_arn = types.StringAttribute{ + .name = "aws.eks.cluster.arn", + .brief = "The ARN of an EKS cluster.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The AWS extended request ID as returned in the response header `x-amz-id-2`. +pub const aws_extended_request_id = types.StringAttribute{ + .name = "aws.extended_request_id", + .brief = "The AWS extended request ID as returned in the response header `x-amz-id-2`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the AWS Kinesis [stream](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) the request refers to. Corresponds to the `--stream-name` parameter of the Kinesis [describe-stream](https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html) operation. +pub const aws_kinesis_stream_name = types.StringAttribute{ + .name = "aws.kinesis.stream_name", + .brief = "The name of the AWS Kinesis [stream](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) the request refers to. Corresponds to the `--stream-name` parameter of the Kinesis [describe-stream](https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html) operation.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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). +pub const aws_lambda_invoked_arn = types.StringAttribute{ + .name = "aws.lambda.invoked_arn", + .brief = "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).", + .note = "This may be different from `cloud.resource_id` if an alias is involved.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environtment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping. +pub const aws_lambda_resource_mapping_id = types.StringAttribute{ + .name = "aws.lambda.resource_mapping.id", + .brief = "The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environtment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The Amazon Resource Name(s) (ARN) of the AWS log group(s). +pub const aws_log_group_arns = types.StringAttribute{ + .name = "aws.log.group.arns", + .brief = "The Amazon Resource Name(s) (ARN) of the AWS log group(s).", + .note = "See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name(s) of the AWS log group(s) an application is writing to. +pub const aws_log_group_names = types.StringAttribute{ + .name = "aws.log.group.names", + .brief = "The name(s) of the AWS log group(s) an application is writing to.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ARN(s) of the AWS log stream(s). +pub const aws_log_stream_arns = types.StringAttribute{ + .name = "aws.log.stream.arns", + .brief = "The ARN(s) of the AWS log stream(s).", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name(s) of the AWS log stream(s) an application is writing to. +pub const aws_log_stream_names = types.StringAttribute{ + .name = "aws.log.stream.names", + .brief = "The name(s) of the AWS log stream(s) an application is writing to.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. +pub const aws_request_id = types.StringAttribute{ + .name = "aws.request_id", + .brief = "The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const aws_s3_bucket = types.StringAttribute{ + .name = "aws.s3.bucket", + .brief = "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.", + .note = "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`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The source object (in the form `bucket`/`key`) for the copy operation. +pub const aws_s3_copy_source = types.StringAttribute{ + .name = "aws.s3.copy_source", + .brief = "The source object (in the form `bucket`/`key`) for the copy operation.", + .note = "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)", + .stability = .development, + .requirement_level = .recommended, +}; +/// The delete request container that specifies the objects to be deleted. +pub const aws_s3_delete = types.StringAttribute{ + .name = "aws.s3.delete", + .brief = "The delete request container that specifies the objects to be deleted.", + .note = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const aws_s3_key = types.StringAttribute{ + .name = "aws.s3.key", + .brief = "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.", + .note = "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)", + .stability = .development, + .requirement_level = .recommended, +}; +/// The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000. +pub const aws_s3_part_number = types.StringAttribute{ + .name = "aws.s3.part_number", + .brief = "The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.", + .note = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Upload ID that identifies the multipart upload. +pub const aws_s3_upload_id = types.StringAttribute{ + .name = "aws.s3.upload_id", + .brief = "Upload ID that identifies the multipart upload.", + .note = "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)", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ARN of the Secret stored in the Secrets Mangger +pub const aws_secretsmanager_secret_arn = types.StringAttribute{ + .name = "aws.secretsmanager.secret.arn", + .brief = "The ARN of the Secret stored in the Secrets Mangger", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ARN of the AWS SNS Topic. An Amazon SNS [topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) is a logical access point that acts as a communication channel. +pub const aws_sns_topic_arn = types.StringAttribute{ + .name = "aws.sns.topic.arn", + .brief = "The ARN of the AWS SNS Topic. An Amazon SNS [topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) is a logical access point that acts as a communication channel.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The URL of the AWS SQS Queue. It's a unique identifier for a queue in Amazon Simple Queue Service (SQS) and is used to access the queue and perform actions on it. +pub const aws_sqs_queue_url = types.StringAttribute{ + .name = "aws.sqs.queue.url", + .brief = "The URL of the AWS SQS Queue. It's a unique identifier for a queue in Amazon Simple Queue Service (SQS) and is used to access the queue and perform actions on it.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ARN of the AWS Step Functions Activity. +pub const aws_step_functions_activity_arn = types.StringAttribute{ + .name = "aws.step_functions.activity.arn", + .brief = "The ARN of the AWS Step Functions Activity.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ARN of the AWS Step Functions State Machine. +pub const aws_step_functions_state_machine_arn = types.StringAttribute{ + .name = "aws.step_functions.state_machine.arn", + .brief = "The ARN of the AWS Step Functions State Machine.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `azure.resource_provider.namespace` instead. +pub const az_namespace = types.StringAttribute{ + .name = "az.namespace", + .brief = "Deprecated, use `azure.resource_provider.namespace` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `azure.service.request.id` instead. +pub const az_service_request_id = types.StringAttribute{ + .name = "az.service_request_id", + .brief = "Deprecated, use `azure.service.request.id` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier of the client instance. +pub const azure_client_id = types.StringAttribute{ + .name = "azure.client.id", + .brief = "The unique identifier of the client instance.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const azure_cosmosdb_connection_modeValue = enum { + gateway, + direct, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .gateway => "gateway", + .direct => "direct", + }; + } +}; + +/// Cosmos client connection mode. +pub const azure_cosmosdb_connection_mode = types.EnumAttribute(azure_cosmosdb_connection_modeValue){ + .base = types.StringAttribute{ + .name = "azure.cosmosdb.connection.mode", + .brief = "Cosmos client connection mode.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = azure_cosmosdb_connection_modeValue.gateway, +}; +pub const azure_cosmosdb_consistency_levelValue = enum { + strong, + bounded_staleness, + session, + eventual, + consistent_prefix, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .strong => "Strong", + .bounded_staleness => "BoundedStaleness", + .session => "Session", + .eventual => "Eventual", + .consistent_prefix => "ConsistentPrefix", + }; + } +}; + +/// Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). +pub const azure_cosmosdb_consistency_level = types.EnumAttribute(azure_cosmosdb_consistency_levelValue){ + .base = types.StringAttribute{ + .name = "azure.cosmosdb.consistency.level", + .brief = "Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels).", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = azure_cosmosdb_consistency_levelValue.strong, +}; +/// List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. +pub const azure_cosmosdb_operation_contacted_regions = types.StringAttribute{ + .name = "azure.cosmosdb.operation.contacted_regions", + .brief = "List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call.", + .note = "Region name matches the format of `displayName` in [Azure Location API](https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location)", + .stability = .development, + .requirement_level = .recommended, +}; +/// The number of request units consumed by the operation. +pub const azure_cosmosdb_operation_request_charge = types.StringAttribute{ + .name = "azure.cosmosdb.operation.request_charge", + .brief = "The number of request units consumed by the operation.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Request payload size in bytes. +pub const azure_cosmosdb_request_body_size = types.StringAttribute{ + .name = "azure.cosmosdb.request.body.size", + .brief = "Request payload size in bytes.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Cosmos DB sub status code. +pub const azure_cosmosdb_response_sub_status_code = types.StringAttribute{ + .name = "azure.cosmosdb.response.sub_status_code", + .brief = "Cosmos DB sub status code.", + .stability = .development, + .requirement_level = .recommended, +}; +/// [Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client. +pub const azure_resource_provider_namespace = types.StringAttribute{ + .name = "azure.resource_provider.namespace", + .brief = "[Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier of the service request. It's generated by the Azure service and returned with the response. +pub const azure_service_request_id = types.StringAttribute{ + .name = "azure.service.request.id", + .brief = "The unique identifier of the service request. It's generated by the Azure service and returned with the response.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Array of brand name and version separated by a space +pub const browser_brands = types.StringAttribute{ + .name = "browser.brands", + .brief = "Array of brand name and version separated by a space", + .note = "This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Preferred language of the user using the browser +pub const browser_language = types.StringAttribute{ + .name = "browser.language", + .brief = "Preferred language of the user using the browser", + .note = "This value is intended to be taken from the Navigator API `navigator.language`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A boolean that is true if the browser is running on a mobile device +pub const browser_mobile = types.StringAttribute{ + .name = "browser.mobile", + .brief = "A boolean that is true if the browser is running on a mobile device", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The platform on which the browser is running +pub const browser_platform = types.StringAttribute{ + .name = "browser.platform", + .brief = "The platform on which the browser is running", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cassandra_consistency_levelValue = enum { + all, + each_quorum, + quorum, + local_quorum, + one, + two, + three, + local_one, + any, + serial, + local_serial, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + }; + } +}; + +/// 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). +pub const cassandra_consistency_level = types.EnumAttribute(cassandra_consistency_levelValue){ + .base = types.StringAttribute{ + .name = "cassandra.consistency.level", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cassandra_consistency_levelValue.all, +}; +/// The data center of the coordinating node for a query. +pub const cassandra_coordinator_dc = types.StringAttribute{ + .name = "cassandra.coordinator.dc", + .brief = "The data center of the coordinating node for a query.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ID of the coordinating node for a query. +pub const cassandra_coordinator_id = types.StringAttribute{ + .name = "cassandra.coordinator.id", + .brief = "The ID of the coordinating node for a query.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The fetch size used for paging, i.e. how many rows will be returned at once. +pub const cassandra_page_size = types.StringAttribute{ + .name = "cassandra.page.size", + .brief = "The fetch size used for paging, i.e. how many rows will be returned at once.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Whether or not the query is idempotent. +pub const cassandra_query_idempotent = types.StringAttribute{ + .name = "cassandra.query.idempotent", + .brief = "Whether or not the query is idempotent.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. +pub const cassandra_speculative_execution_count = types.StringAttribute{ + .name = "cassandra.speculative_execution.count", + .brief = "The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cicd_pipeline_action_nameValue = enum { + build, + run, + sync, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .build => "BUILD", + .run => "RUN", + .sync => "SYNC", + }; + } +}; + +/// The kind of action a pipeline run is performing. +pub const cicd_pipeline_action_name = types.EnumAttribute(cicd_pipeline_action_nameValue){ + .base = types.StringAttribute{ + .name = "cicd.pipeline.action.name", + .brief = "The kind of action a pipeline run is performing.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cicd_pipeline_action_nameValue.build, +}; +/// The human readable name of the pipeline within a CI/CD system. +pub const cicd_pipeline_name = types.StringAttribute{ + .name = "cicd.pipeline.name", + .brief = "The human readable name of the pipeline within a CI/CD system.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cicd_pipeline_resultValue = enum { + success, + failure, + @"error", + timeout, + cancellation, + skip, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .success => "success", + .failure => "failure", + .@"error" => "error", + .timeout => "timeout", + .cancellation => "cancellation", + .skip => "skip", + }; + } +}; + +/// The result of a pipeline run. +pub const cicd_pipeline_result = types.EnumAttribute(cicd_pipeline_resultValue){ + .base = types.StringAttribute{ + .name = "cicd.pipeline.result", + .brief = "The result of a pipeline run.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cicd_pipeline_resultValue.success, +}; +/// The unique identifier of a pipeline run within a CI/CD system. +pub const cicd_pipeline_run_id = types.StringAttribute{ + .name = "cicd.pipeline.run.id", + .brief = "The unique identifier of a pipeline run within a CI/CD system.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cicd_pipeline_run_stateValue = enum { + pending, + executing, + finalizing, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .pending => "pending", + .executing => "executing", + .finalizing => "finalizing", + }; + } +}; + +/// The pipeline run goes through these states during its lifecycle. +pub const cicd_pipeline_run_state = types.EnumAttribute(cicd_pipeline_run_stateValue){ + .base = types.StringAttribute{ + .name = "cicd.pipeline.run.state", + .brief = "The pipeline run goes through these states during its lifecycle.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cicd_pipeline_run_stateValue.pending, +}; +/// The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run. +pub const cicd_pipeline_run_url_full = types.StringAttribute{ + .name = "cicd.pipeline.run.url.full", + .brief = "The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. +pub const cicd_pipeline_task_name = types.StringAttribute{ + .name = "cicd.pipeline.task.name", + .brief = "The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier of a task run within a pipeline. +pub const cicd_pipeline_task_run_id = types.StringAttribute{ + .name = "cicd.pipeline.task.run.id", + .brief = "The unique identifier of a task run within a pipeline.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cicd_pipeline_task_run_resultValue = enum { + success, + failure, + @"error", + timeout, + cancellation, + skip, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .success => "success", + .failure => "failure", + .@"error" => "error", + .timeout => "timeout", + .cancellation => "cancellation", + .skip => "skip", + }; + } +}; + +/// The result of a task run. +pub const cicd_pipeline_task_run_result = types.EnumAttribute(cicd_pipeline_task_run_resultValue){ + .base = types.StringAttribute{ + .name = "cicd.pipeline.task.run.result", + .brief = "The result of a task run.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cicd_pipeline_task_run_resultValue.success, +}; +/// The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. +pub const cicd_pipeline_task_run_url_full = types.StringAttribute{ + .name = "cicd.pipeline.task.run.url.full", + .brief = "The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cicd_pipeline_task_typeValue = enum { + build, + @"test", + deploy, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .build => "build", + .@"test" => "test", + .deploy => "deploy", + }; + } +}; + +/// The type of the task within a pipeline. +pub const cicd_pipeline_task_type = types.EnumAttribute(cicd_pipeline_task_typeValue){ + .base = types.StringAttribute{ + .name = "cicd.pipeline.task.type", + .brief = "The type of the task within a pipeline.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cicd_pipeline_task_typeValue.build, +}; +/// The name of a component of the CICD system. +pub const cicd_system_component = types.StringAttribute{ + .name = "cicd.system.component", + .brief = "The name of a component of the CICD system.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier of a worker within a CICD system. +pub const cicd_worker_id = types.StringAttribute{ + .name = "cicd.worker.id", + .brief = "The unique identifier of a worker within a CICD system.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of a worker within a CICD system. +pub const cicd_worker_name = types.StringAttribute{ + .name = "cicd.worker.name", + .brief = "The name of a worker within a CICD system.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cicd_worker_stateValue = enum { + available, + busy, + offline, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .available => "available", + .busy => "busy", + .offline => "offline", + }; + } +}; + +/// The state of a CICD worker / agent. +pub const cicd_worker_state = types.EnumAttribute(cicd_worker_stateValue){ + .base = types.StringAttribute{ + .name = "cicd.worker.state", + .brief = "The state of a CICD worker / agent.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cicd_worker_stateValue.available, +}; +/// The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker. +pub const cicd_worker_url_full = types.StringAttribute{ + .name = "cicd.worker.url.full", + .brief = "The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +pub const client_address = types.StringAttribute{ + .name = "client.address", + .brief = "Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Client port number. +pub const client_port = types.StringAttribute{ + .name = "client.port", + .brief = "Client port number.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The cloud account ID the resource is assigned to. +pub const cloud_account_id = types.StringAttribute{ + .name = "cloud.account.id", + .brief = "The cloud account ID the resource is assigned to.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. +pub const cloud_availability_zone = types.StringAttribute{ + .name = "cloud.availability_zone", + .brief = "Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.", + .note = "Availability zones are called \"zones\" on Alibaba Cloud and Google Cloud.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cloud_platformValue = enum { + alibaba_cloud_ecs, + alibaba_cloud_fc, + alibaba_cloud_openshift, + aws_ec2, + aws_ecs, + aws_eks, + aws_lambda, + aws_elastic_beanstalk, + aws_app_runner, + aws_openshift, + azure_vm, + azure_container_apps, + azure_container_instances, + azure_aks, + azure_functions, + azure_app_service, + azure_openshift, + gcp_bare_metal_solution, + gcp_compute_engine, + gcp_cloud_run, + gcp_kubernetes_engine, + gcp_cloud_functions, + gcp_app_engine, + gcp_openshift, + ibm_cloud_openshift, + oracle_cloud_compute, + oracle_cloud_oke, + tencent_cloud_cvm, + tencent_cloud_eks, + tencent_cloud_scf, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + .oracle_cloud_compute => "oracle_cloud_compute", + .oracle_cloud_oke => "oracle_cloud_oke", + .tencent_cloud_cvm => "tencent_cloud_cvm", + .tencent_cloud_eks => "tencent_cloud_eks", + .tencent_cloud_scf => "tencent_cloud_scf", + }; + } +}; + +/// The cloud platform in use. +pub const cloud_platform = types.EnumAttribute(cloud_platformValue){ + .base = types.StringAttribute{ + .name = "cloud.platform", + .brief = "The cloud platform in use.", + .note = "The prefix of the service SHOULD match the one specified in `cloud.provider`.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cloud_platformValue.alibaba_cloud_ecs, +}; +pub const cloud_providerValue = enum { + alibaba_cloud, + aws, + azure, + gcp, + heroku, + ibm_cloud, + oracle_cloud, + tencent_cloud, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .alibaba_cloud => "alibaba_cloud", + .aws => "aws", + .azure => "azure", + .gcp => "gcp", + .heroku => "heroku", + .ibm_cloud => "ibm_cloud", + .oracle_cloud => "oracle_cloud", + .tencent_cloud => "tencent_cloud", + }; + } +}; + +/// Name of the cloud provider. +pub const cloud_provider = types.EnumAttribute(cloud_providerValue){ + .base = types.StringAttribute{ + .name = "cloud.provider", + .brief = "Name of the cloud provider.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cloud_providerValue.alibaba_cloud, +}; +/// The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. +pub const cloud_region = types.StringAttribute{ + .name = "cloud.region", + .brief = "The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed.", + .note = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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://google.aip.dev/122#full-resource-names) on GCP) +pub const cloud_resource_id = types.StringAttribute{ + .name = "cloud.resource_id", + .brief = "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://google.aip.dev/122#full-resource-names) on GCP)", + .note = "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://learn.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function, *not* the function app, having the form `/subscriptions/[SUBSCRIPTION_GUID]/resourceGroups/[RG]/providers/Microsoft.Web/sites/[FUNCAPP]/functions/[FUNC]`. This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share a TracerProvider.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. +pub const cloudevents_event_id = types.StringAttribute{ + .name = "cloudevents.event_id", + .brief = "The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. +pub const cloudevents_event_source = types.StringAttribute{ + .name = "cloudevents.event_source", + .brief = "The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. +pub const cloudevents_event_spec_version = types.StringAttribute{ + .name = "cloudevents.event_spec_version", + .brief = "The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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). +pub const cloudevents_event_subject = types.StringAttribute{ + .name = "cloudevents.event_subject", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const cloudevents_event_type = types.StringAttribute{ + .name = "cloudevents.event_type", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The guid of the application. +pub const cloudfoundry_app_id = types.StringAttribute{ + .name = "cloudfoundry.app.id", + .brief = "The guid of the application.", + .note = "Application instrumentation should use the value from environment variable `VCAP_APPLICATION.application_id`. This is the same value as reported by `cf app [app-name] --guid`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The index of the application instance. 0 when just one instance is active. +pub const cloudfoundry_app_instance_id = types.StringAttribute{ + .name = "cloudfoundry.app.instance.id", + .brief = "The index of the application instance. 0 when just one instance is active.", + .note = "CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is used for logs and metrics emitted by CloudFoundry. It is supposed to contain the application instance index for applications deployed on the runtime. Application instrumentation should use the value from environment variable `CF_INSTANCE_INDEX`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the application. +pub const cloudfoundry_app_name = types.StringAttribute{ + .name = "cloudfoundry.app.name", + .brief = "The name of the application.", + .note = "Application instrumentation should use the value from environment variable `VCAP_APPLICATION.application_name`. This is the same value as reported by `cf apps`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The guid of the CloudFoundry org the application is running in. +pub const cloudfoundry_org_id = types.StringAttribute{ + .name = "cloudfoundry.org.id", + .brief = "The guid of the CloudFoundry org the application is running in.", + .note = "Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_id`. This is the same value as reported by `cf org [org-name] --guid`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the CloudFoundry organization the app is running in. +pub const cloudfoundry_org_name = types.StringAttribute{ + .name = "cloudfoundry.org.name", + .brief = "The name of the CloudFoundry organization the app is running in.", + .note = "Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_name`. This is the same value as reported by `cf orgs`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID identifying the process. +pub const cloudfoundry_process_id = types.StringAttribute{ + .name = "cloudfoundry.process.id", + .brief = "The UID identifying the process.", + .note = "Application instrumentation should use the value from environment variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to `VCAP_APPLICATION.app_id` for applications deployed to the runtime. For system components, this could be the actual PID.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The type of process. +pub const cloudfoundry_process_type = types.StringAttribute{ + .name = "cloudfoundry.process.type", + .brief = "The type of process.", + .note = "CloudFoundry applications can consist of multiple jobs. Usually the main process will be of type `web`. There can be additional background tasks or side-cars with different process types.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The guid of the CloudFoundry space the application is running in. +pub const cloudfoundry_space_id = types.StringAttribute{ + .name = "cloudfoundry.space.id", + .brief = "The guid of the CloudFoundry space the application is running in.", + .note = "Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_id`. This is the same value as reported by `cf space [space-name] --guid`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the CloudFoundry space the application is running in. +pub const cloudfoundry_space_name = types.StringAttribute{ + .name = "cloudfoundry.space.name", + .brief = "The name of the CloudFoundry space the application is running in.", + .note = "Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_name`. This is the same value as reported by `cf spaces`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A guid or another name describing the event source. +pub const cloudfoundry_system_id = types.StringAttribute{ + .name = "cloudfoundry.system.id", + .brief = "A guid or another name describing the event source.", + .note = "CloudFoundry defines the `source_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is used for logs and metrics emitted by CloudFoundry. It is supposed to contain the component name, e.g. \"gorouter\", for CloudFoundry components. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) should be used. The `system.id` should be set to `spec.deployment/spec.name`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A guid describing the concrete instance of the event source. +pub const cloudfoundry_system_instance_id = types.StringAttribute{ + .name = "cloudfoundry.system.instance.id", + .brief = "A guid describing the concrete instance of the event source.", + .note = "CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is used for logs and metrics emitted by CloudFoundry. It is supposed to contain the vm id for CloudFoundry components. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) should be used. The `system.instance.id` should be set to `spec.id`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `code.column.number` +pub const code_column = types.StringAttribute{ + .name = "code.column", + .brief = "Deprecated, use `code.column.number`", + .stability = .development, + .requirement_level = .recommended, +}; +/// The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity. +pub const code_column_number = types.StringAttribute{ + .name = "code.column.number", + .brief = "The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity. +pub const code_file_path = types.StringAttribute{ + .name = "code.file.path", + .brief = "The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Deprecated, use `code.file.path` instead +pub const code_filepath = types.StringAttribute{ + .name = "code.filepath", + .brief = "Deprecated, use `code.file.path` instead", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `code.function.name` instead +pub const code_function = types.StringAttribute{ + .name = "code.function", + .brief = "Deprecated, use `code.function.name` instead", + .stability = .development, + .requirement_level = .recommended, +}; +/// The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity. +pub const code_function_name = types.StringAttribute{ + .name = "code.function.name", + .brief = "The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.", + .note = "Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples. The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in `code.stacktrace` without information on arguments. Examples: * Java method: `com.example.MyHttpService.serveRequest` * Java anonymous class method: `com.mycompany.Main$1.myMethod` * Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod` * PHP function: `GuzzleHttp\\Client::transfer` * Go function: `github.com/my/repo/pkg.foo.func5` * Elixir: `OpenTelemetry.Ctx.new` * Erlang: `opentelemetry_ctx:new` * Rust: `playground::my_module::my_cool_func` * C function: `fopen`", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity. +pub const code_line_number = types.StringAttribute{ + .name = "code.line.number", + .brief = "The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Deprecated, use `code.line.number` instead +pub const code_lineno = types.StringAttribute{ + .name = "code.lineno", + .brief = "Deprecated, use `code.line.number` instead", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, namespace is now included into `code.function.name` +pub const code_namespace = types.StringAttribute{ + .name = "code.namespace", + .brief = "Deprecated, namespace is now included into `code.function.name`", + .stability = .development, + .requirement_level = .recommended, +}; +/// A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data integrity. +pub const code_stacktrace = types.StringAttribute{ + .name = "code.stacktrace", + .brief = "A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data integrity.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The command used to run the container (i.e. the command name). +pub const container_command = types.StringAttribute{ + .name = "container.command", + .brief = "The command used to run the container (i.e. the command name).", + .note = "If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.", + .stability = .development, + .requirement_level = .recommended, +}; +/// All the command arguments (including the command/executable itself) run by the container. +pub const container_command_args = types.StringAttribute{ + .name = "container.command_args", + .brief = "All the command arguments (including the command/executable itself) run by the container.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The full command run by the container as a single string representing the full command. +pub const container_command_line = types.StringAttribute{ + .name = "container.command_line", + .brief = "The full command run by the container as a single string representing the full command.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const container_cpu_stateValue = enum { + user, + system, + kernel, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .user => "user", + .system => "system", + .kernel => "kernel", + }; + } +}; + +/// Deprecated, use `cpu.mode` instead. +pub const container_cpu_state = types.EnumAttribute(container_cpu_stateValue){ + .base = types.StringAttribute{ + .name = "container.cpu.state", + .brief = "Deprecated, use `cpu.mode` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = container_cpu_stateValue.user, +}; +/// The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume. +pub const container_csi_plugin_name = types.StringAttribute{ + .name = "container.csi.plugin.name", + .brief = "The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume.", + .note = "This can sometimes be referred to as a \"driver\" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin. +pub const container_csi_volume_id = types.StringAttribute{ + .name = "container.csi.volume.id", + .brief = "The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin.", + .note = "This can sometimes be referred to as a \"volume handle\" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. +pub const container_id = types.StringAttribute{ + .name = "container.id", + .brief = "Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Runtime specific image identifier. Usually a hash algorithm followed by a UUID. +pub const container_image_id = types.StringAttribute{ + .name = "container.image.id", + .brief = "Runtime specific image identifier. Usually a hash algorithm followed by a UUID.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the image the container was built on. +pub const container_image_name = types.StringAttribute{ + .name = "container.image.name", + .brief = "Name of the image the container was built on.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Repo digests of the container image as provided by the container runtime. +pub const container_image_repo_digests = types.StringAttribute{ + .name = "container.image.repo_digests", + .brief = "Repo digests of the container image as provided by the container runtime.", + .note = "[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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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:`. +pub const container_image_tags = types.StringAttribute{ + .name = "container.image.tags", + .brief = "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:`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Container labels, ``key`` being the label name, the value being the label value. +pub const container_label = types.StringAttribute{ + .name = "container.label", + .brief = "Container labels, ``key`` being the label name, the value being the label value.", + .note = "For example, a docker container label `app` with value `nginx` SHOULD be recorded as the `container.label.app` attribute with value `\"nginx\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `container.label` instead. +pub const container_labels = types.StringAttribute{ + .name = "container.labels", + .brief = "Deprecated, use `container.label` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Container name used by container runtime. +pub const container_name = types.StringAttribute{ + .name = "container.name", + .brief = "Container name used by container runtime.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The container runtime managing this container. +pub const container_runtime = types.StringAttribute{ + .name = "container.runtime", + .brief = "The container runtime managing this container.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The logical CPU number [0..n-1] +pub const cpu_logical_number = types.StringAttribute{ + .name = "cpu.logical_number", + .brief = "The logical CPU number [0..n-1]", + .stability = .development, + .requirement_level = .recommended, +}; +pub const cpu_modeValue = enum { + user, + system, + nice, + idle, + iowait, + interrupt, + steal, + kernel, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .user => "user", + .system => "system", + .nice => "nice", + .idle => "idle", + .iowait => "iowait", + .interrupt => "interrupt", + .steal => "steal", + .kernel => "kernel", + }; + } +}; + +/// The mode of the CPU +pub const cpu_mode = types.EnumAttribute(cpu_modeValue){ + .base = types.StringAttribute{ + .name = "cpu.mode", + .brief = "The mode of the CPU", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cpu_modeValue.user, +}; +pub const cpython_gc_generationValue = enum { + generation_0, + generation_1, + generation_2, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .generation_0 => "0", + .generation_1 => "1", + .generation_2 => "2", + }; + } +}; + +/// Value of the garbage collector collection generation. +pub const cpython_gc_generation = types.EnumAttribute(cpython_gc_generationValue){ + .base = types.StringAttribute{ + .name = "cpython.gc.generation", + .brief = "Value of the garbage collector collection generation.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = cpython_gc_generationValue.generation_0, +}; +pub const db_cassandra_consistency_levelValue = enum { + all, + each_quorum, + quorum, + local_quorum, + one, + two, + three, + local_one, + any, + serial, + local_serial, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + }; + } +}; + +/// Deprecated, use `cassandra.consistency.level` instead. +pub const db_cassandra_consistency_level = types.EnumAttribute(db_cassandra_consistency_levelValue){ + .base = types.StringAttribute{ + .name = "db.cassandra.consistency_level", + .brief = "Deprecated, use `cassandra.consistency.level` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = db_cassandra_consistency_levelValue.all, +}; +/// Deprecated, use `cassandra.coordinator.dc` instead. +pub const db_cassandra_coordinator_dc = types.StringAttribute{ + .name = "db.cassandra.coordinator.dc", + .brief = "Deprecated, use `cassandra.coordinator.dc` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `cassandra.coordinator.id` instead. +pub const db_cassandra_coordinator_id = types.StringAttribute{ + .name = "db.cassandra.coordinator.id", + .brief = "Deprecated, use `cassandra.coordinator.id` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `cassandra.query.idempotent` instead. +pub const db_cassandra_idempotence = types.StringAttribute{ + .name = "db.cassandra.idempotence", + .brief = "Deprecated, use `cassandra.query.idempotent` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `cassandra.page.size` instead. +pub const db_cassandra_page_size = types.StringAttribute{ + .name = "db.cassandra.page_size", + .brief = "Deprecated, use `cassandra.page.size` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `cassandra.speculative_execution.count` instead. +pub const db_cassandra_speculative_execution_count = types.StringAttribute{ + .name = "db.cassandra.speculative_execution_count", + .brief = "Deprecated, use `cassandra.speculative_execution.count` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.collection.name` instead. +pub const db_cassandra_table = types.StringAttribute{ + .name = "db.cassandra.table", + .brief = "Deprecated, use `db.collection.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const db_client_connection_pool_name = types.StringAttribute{ + .name = "db.client.connection.pool.name", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const db_client_connection_stateValue = enum { + idle, + used, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .idle => "idle", + .used => "used", + }; + } +}; + +/// The state of a connection in the pool +pub const db_client_connection_state = types.EnumAttribute(db_client_connection_stateValue){ + .base = types.StringAttribute{ + .name = "db.client.connection.state", + .brief = "The state of a connection in the pool", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = db_client_connection_stateValue.idle, +}; +/// Deprecated, use `db.client.connection.pool.name` instead. +pub const db_client_connections_pool_name = types.StringAttribute{ + .name = "db.client.connections.pool.name", + .brief = "Deprecated, use `db.client.connection.pool.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const db_client_connections_stateValue = enum { + idle, + used, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .idle => "idle", + .used => "used", + }; + } +}; + +/// Deprecated, use `db.client.connection.state` instead. +pub const db_client_connections_state = types.EnumAttribute(db_client_connections_stateValue){ + .base = types.StringAttribute{ + .name = "db.client.connections.state", + .brief = "Deprecated, use `db.client.connection.state` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = db_client_connections_stateValue.idle, +}; +/// The name of a collection (table, container) within the database. +pub const db_collection_name = types.StringAttribute{ + .name = "db.collection.name", + .brief = "The name of a collection (table, container) within the database.", + .note = "It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. The collection name SHOULD NOT be extracted from `db.query.text`, when the database system supports query text with multiple collections in non-batch operations. For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Deprecated, use `server.address`, `server.port` attributes instead. +pub const db_connection_string = types.StringAttribute{ + .name = "db.connection_string", + .brief = "Deprecated, use `server.address`, `server.port` attributes instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `azure.client.id` instead. +pub const db_cosmosdb_client_id = types.StringAttribute{ + .name = "db.cosmosdb.client_id", + .brief = "Deprecated, use `azure.client.id` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const db_cosmosdb_connection_modeValue = enum { + gateway, + direct, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .gateway => "gateway", + .direct => "direct", + }; + } +}; + +/// Deprecated, use `azure.cosmosdb.connection.mode` instead. +pub const db_cosmosdb_connection_mode = types.EnumAttribute(db_cosmosdb_connection_modeValue){ + .base = types.StringAttribute{ + .name = "db.cosmosdb.connection_mode", + .brief = "Deprecated, use `azure.cosmosdb.connection.mode` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = db_cosmosdb_connection_modeValue.gateway, +}; +pub const db_cosmosdb_consistency_levelValue = enum { + strong, + bounded_staleness, + session, + eventual, + consistent_prefix, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .strong => "Strong", + .bounded_staleness => "BoundedStaleness", + .session => "Session", + .eventual => "Eventual", + .consistent_prefix => "ConsistentPrefix", + }; + } +}; + +/// Deprecated, use `cosmosdb.consistency.level` instead. +pub const db_cosmosdb_consistency_level = types.EnumAttribute(db_cosmosdb_consistency_levelValue){ + .base = types.StringAttribute{ + .name = "db.cosmosdb.consistency_level", + .brief = "Deprecated, use `cosmosdb.consistency.level` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = db_cosmosdb_consistency_levelValue.strong, +}; +/// Deprecated, use `db.collection.name` instead. +pub const db_cosmosdb_container = types.StringAttribute{ + .name = "db.cosmosdb.container", + .brief = "Deprecated, use `db.collection.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const db_cosmosdb_operation_typeValue = enum { + batch, + create, + delete, + execute, + execute_javascript, + invalid, + head, + head_feed, + patch, + query, + query_plan, + read, + read_feed, + replace, + upsert, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .batch => "batch", + .create => "create", + .delete => "delete", + .execute => "execute", + .execute_javascript => "execute_javascript", + .invalid => "invalid", + .head => "head", + .head_feed => "head_feed", + .patch => "patch", + .query => "query", + .query_plan => "query_plan", + .read => "read", + .read_feed => "read_feed", + .replace => "replace", + .upsert => "upsert", + }; + } +}; + +/// Deprecated, no replacement at this time. +pub const db_cosmosdb_operation_type = types.EnumAttribute(db_cosmosdb_operation_typeValue){ + .base = types.StringAttribute{ + .name = "db.cosmosdb.operation_type", + .brief = "Deprecated, no replacement at this time.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = db_cosmosdb_operation_typeValue.batch, +}; +/// Deprecated, use `azure.cosmosdb.operation.contacted_regions` instead. +pub const db_cosmosdb_regions_contacted = types.StringAttribute{ + .name = "db.cosmosdb.regions_contacted", + .brief = "Deprecated, use `azure.cosmosdb.operation.contacted_regions` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `azure.cosmosdb.operation.request_charge` instead. +pub const db_cosmosdb_request_charge = types.StringAttribute{ + .name = "db.cosmosdb.request_charge", + .brief = "Deprecated, use `azure.cosmosdb.operation.request_charge` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `azure.cosmosdb.request.body.size` instead. +pub const db_cosmosdb_request_content_length = types.StringAttribute{ + .name = "db.cosmosdb.request_content_length", + .brief = "Deprecated, use `azure.cosmosdb.request.body.size` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.response.status_code` instead. +pub const db_cosmosdb_status_code = types.StringAttribute{ + .name = "db.cosmosdb.status_code", + .brief = "Deprecated, use `db.response.status_code` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `azure.cosmosdb.response.sub_status_code` instead. +pub const db_cosmosdb_sub_status_code = types.StringAttribute{ + .name = "db.cosmosdb.sub_status_code", + .brief = "Deprecated, use `azure.cosmosdb.response.sub_status_code` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.namespace` instead. +pub const db_elasticsearch_cluster_name = types.StringAttribute{ + .name = "db.elasticsearch.cluster.name", + .brief = "Deprecated, use `db.namespace` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `elasticsearch.node.name` instead. +pub const db_elasticsearch_node_name = types.StringAttribute{ + .name = "db.elasticsearch.node.name", + .brief = "Deprecated, use `elasticsearch.node.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.operation.parameter` instead. +pub const db_elasticsearch_path_parts = types.StringAttribute{ + .name = "db.elasticsearch.path_parts", + .brief = "Deprecated, use `db.operation.parameter` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. +pub const db_instance_id = types.StringAttribute{ + .name = "db.instance.id", + .brief = "Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Removed, no replacement at this time. +pub const db_jdbc_driver_classname = types.StringAttribute{ + .name = "db.jdbc.driver_classname", + .brief = "Removed, no replacement at this time.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.collection.name` instead. +pub const db_mongodb_collection = types.StringAttribute{ + .name = "db.mongodb.collection", + .brief = "Deprecated, use `db.collection.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, SQL Server instance is now populated as a part of `db.namespace` attribute. +pub const db_mssql_instance_name = types.StringAttribute{ + .name = "db.mssql.instance_name", + .brief = "Deprecated, SQL Server instance is now populated as a part of `db.namespace` attribute.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.namespace` instead. +pub const db_name = types.StringAttribute{ + .name = "db.name", + .brief = "Deprecated, use `db.namespace` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the database, fully qualified within the server address and port. +pub const db_namespace = types.StringAttribute{ + .name = "db.namespace", + .brief = "The name of the database, fully qualified within the server address and port.", + .note = "If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted. 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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.operation.name` instead. +pub const db_operation = types.StringAttribute{ + .name = "db.operation", + .brief = "Deprecated, use `db.operation.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The number of queries included in a batch operation. +pub const db_operation_batch_size = types.StringAttribute{ + .name = "db.operation.batch.size", + .brief = "The number of queries included in a batch operation.", + .note = "Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The name of the operation or command being executed. +pub const db_operation_name = types.StringAttribute{ + .name = "db.operation.name", + .brief = "The name of the operation or command being executed.", + .note = "It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. The operation name SHOULD NOT be extracted from `db.query.text`, when the database system supports query text with multiple operations in non-batch operations. If spaces can occur in the operation name, multiple consecutive spaces SHOULD be normalized to a single space. 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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// A database operation parameter, with ``key`` being the parameter name, and the attribute value being a string representation of the parameter value. +pub const db_operation_parameter = types.StringAttribute{ + .name = "db.operation.parameter", + .brief = "A database operation parameter, with ``key`` being the parameter name, and the attribute value being a string representation of the parameter value.", + .note = "For example, a client-side maximum number of rows to read from the database MAY be recorded as the `db.operation.parameter.max_rows` attribute. `db.query.text` parameters SHOULD be captured using `db.query.parameter.[key]` instead of `db.operation.parameter.[key]`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A database query parameter, with ``key`` being the parameter name, and the attribute value being a string representation of the parameter value. +pub const db_query_parameter = types.StringAttribute{ + .name = "db.query.parameter", + .brief = "A database query parameter, with ``key`` being the parameter name, and the attribute value being a string representation of the parameter value.", + .note = "If a query parameter has no name and instead is referenced only by index, then `[key]` SHOULD be the 0-based index. `db.query.parameter.[key]` SHOULD match up with the parameterized placeholders present in `db.query.text`. `db.query.parameter.[key]` SHOULD NOT be captured on batch operations. Examples: - For a query `SELECT * FROM users where username = %s` with the parameter `\"jdoe\"`, the attribute `db.query.parameter.0` SHOULD be set to `\"jdoe\"`. - For a query `\"SELECT * FROM users WHERE username = %(username)s;` with parameter `username = \"jdoe\"`, the attribute `db.query.parameter.username` SHOULD be set to `\"jdoe\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Low cardinality summary of a database query. +pub const db_query_summary = types.StringAttribute{ + .name = "db.query.summary", + .brief = "Low cardinality summary of a database query.", + .note = "The query summary describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries. Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](/docs/database/database-spans.md#generating-a-summary-of-the-query) section.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The database query being executed. +pub const db_query_text = types.StringAttribute{ + .name = "db.query.text", + .brief = "The database query being executed.", + .note = "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. Parameterized query text SHOULD NOT be sanitized. 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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.namespace` instead. +pub const db_redis_database_index = types.StringAttribute{ + .name = "db.redis.database_index", + .brief = "Deprecated, use `db.namespace` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Number of rows returned by the operation. +pub const db_response_returned_rows = types.StringAttribute{ + .name = "db.response.returned_rows", + .brief = "Number of rows returned by the operation.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Database response status code. +pub const db_response_status_code = types.StringAttribute{ + .name = "db.response.status_code", + .brief = "Database response status code.", + .note = "The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.collection.name` instead. +pub const db_sql_table = types.StringAttribute{ + .name = "db.sql.table", + .brief = "Deprecated, use `db.collection.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The database statement being executed. +pub const db_statement = types.StringAttribute{ + .name = "db.statement", + .brief = "The database statement being executed.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of a stored procedure within the database. +pub const db_stored_procedure_name = types.StringAttribute{ + .name = "db.stored_procedure.name", + .brief = "The name of a stored procedure within the database.", + .note = "It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. For batch operations, if the individual operations are known to have the same stored procedure name then that stored procedure name SHOULD be used.", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const db_systemValue = enum { + other_sql, + adabas, + cache, + intersystems_cache, + cassandra, + clickhouse, + cloudscape, + cockroachdb, + coldfusion, + cosmosdb, + couchbase, + couchdb, + db2, + derby, + dynamodb, + edb, + elasticsearch, + filemaker, + firebird, + firstsql, + geode, + h2, + hanadb, + hbase, + hive, + hsqldb, + influxdb, + informix, + ingres, + instantdb, + interbase, + mariadb, + maxdb, + memcached, + mongodb, + mssql, + mssqlcompact, + mysql, + neo4j, + netezza, + opensearch, + oracle, + pervasive, + pointbase, + postgresql, + progress, + redis, + redshift, + spanner, + sqlite, + sybase, + teradata, + trino, + vertica, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + }; + } +}; + +/// Deprecated, use `db.system.name` instead. +pub const db_system = types.EnumAttribute(db_systemValue){ + .base = types.StringAttribute{ + .name = "db.system", + .brief = "Deprecated, use `db.system.name` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = db_systemValue.other_sql, +}; +pub const db_system_nameValue = enum { + other_sql, + softwareag_adabas, + actian_ingres, + aws_dynamodb, + aws_redshift, + azure_cosmosdb, + intersystems_cache, + cassandra, + clickhouse, + cockroachdb, + couchbase, + couchdb, + derby, + elasticsearch, + firebirdsql, + gcp_spanner, + geode, + h2database, + hbase, + hive, + hsqldb, + ibm_db2, + ibm_informix, + ibm_netezza, + influxdb, + instantdb, + mariadb, + memcached, + mongodb, + microsoft_sql_server, + mysql, + neo4j, + opensearch, + oracle_db, + postgresql, + redis, + sap_hana, + sap_maxdb, + sqlite, + teradata, + trino, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .other_sql => "other_sql", + .softwareag_adabas => "softwareag.adabas", + .actian_ingres => "actian.ingres", + .aws_dynamodb => "aws.dynamodb", + .aws_redshift => "aws.redshift", + .azure_cosmosdb => "azure.cosmosdb", + .intersystems_cache => "intersystems.cache", + .cassandra => "cassandra", + .clickhouse => "clickhouse", + .cockroachdb => "cockroachdb", + .couchbase => "couchbase", + .couchdb => "couchdb", + .derby => "derby", + .elasticsearch => "elasticsearch", + .firebirdsql => "firebirdsql", + .gcp_spanner => "gcp.spanner", + .geode => "geode", + .h2database => "h2database", + .hbase => "hbase", + .hive => "hive", + .hsqldb => "hsqldb", + .ibm_db2 => "ibm.db2", + .ibm_informix => "ibm.informix", + .ibm_netezza => "ibm.netezza", + .influxdb => "influxdb", + .instantdb => "instantdb", + .mariadb => "mariadb", + .memcached => "memcached", + .mongodb => "mongodb", + .microsoft_sql_server => "microsoft.sql_server", + .mysql => "mysql", + .neo4j => "neo4j", + .opensearch => "opensearch", + .oracle_db => "oracle.db", + .postgresql => "postgresql", + .redis => "redis", + .sap_hana => "sap.hana", + .sap_maxdb => "sap.maxdb", + .sqlite => "sqlite", + .teradata => "teradata", + .trino => "trino", + }; + } +}; + +/// The database management system (DBMS) product as identified by the client instrumentation. +pub const db_system_name = types.EnumAttribute(db_system_nameValue){ + .base = types.StringAttribute{ + .name = "db.system.name", + .brief = "The database management system (DBMS) product as identified by the client instrumentation.", + .note = "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.name` is set to `postgresql` based on the instrumentation's best knowledge.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = db_system_nameValue.other_sql, +}; +/// Deprecated, no replacement at this time. +pub const db_user = types.StringAttribute{ + .name = "db.user", + .brief = "Deprecated, no replacement at this time.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 'Deprecated, use `deployment.environment.name` instead.' +pub const deployment_environment = types.StringAttribute{ + .name = "deployment.environment", + .brief = "'Deprecated, use `deployment.environment.name` instead.'", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). +pub const deployment_environment_name = types.StringAttribute{ + .name = "deployment.environment.name", + .brief = "Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier).", + .note = "`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`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The id of the deployment. +pub const deployment_id = types.StringAttribute{ + .name = "deployment.id", + .brief = "The id of the deployment.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the deployment. +pub const deployment_name = types.StringAttribute{ + .name = "deployment.name", + .brief = "The name of the deployment.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const deployment_statusValue = enum { + failed, + succeeded, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .failed => "failed", + .succeeded => "succeeded", + }; + } +}; + +/// The status of the deployment. +pub const deployment_status = types.EnumAttribute(deployment_statusValue){ + .base = types.StringAttribute{ + .name = "deployment.status", + .brief = "The status of the deployment.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = deployment_statusValue.failed, +}; +/// Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +pub const destination_address = types.StringAttribute{ + .name = "destination.address", + .brief = "Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Destination port number +pub const destination_port = types.StringAttribute{ + .name = "destination.port", + .brief = "Destination port number", + .stability = .development, + .requirement_level = .recommended, +}; +/// A unique identifier representing the device +pub const device_id = types.StringAttribute{ + .name = "device.id", + .brief = "A unique identifier representing the device", + .note = "Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is uninstalled and re-installed. However, it might be resettable by the user for all apps on a device. Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as values. More information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids). ] [!WARNING] ] ] This attribute may contain sensitive (PII) information. 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. ] ] Due to these reasons, this identifier is not recommended for consumer applications and will likely result in rejection from both Google Play and App Store. ] However, it may be appropriate for specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with appropriate compliance clearance. ] Any instrumentation providing this identifier MUST implement it as an opt-in feature. ] ] See [`app.installation.id`](/docs/registry/attributes/app.md#app-installation-id) for a more privacy-preserving alternative.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the device manufacturer +pub const device_manufacturer = types.StringAttribute{ + .name = "device.manufacturer", + .brief = "The name of the device manufacturer", + .note = "The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The model identifier for the device +pub const device_model_identifier = types.StringAttribute{ + .name = "device.model.identifier", + .brief = "The model identifier for the device", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The marketing name for the device model +pub const device_model_name = types.StringAttribute{ + .name = "device.model.name", + .brief = "The marketing name for the device model", + .note = "It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const disk_io_directionValue = enum { + read, + write, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .read => "read", + .write => "write", + }; + } +}; + +/// The disk IO operation direction. +pub const disk_io_direction = types.EnumAttribute(disk_io_directionValue){ + .base = types.StringAttribute{ + .name = "disk.io.direction", + .brief = "The disk IO operation direction.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = disk_io_directionValue.read, +}; +/// The list of IPv4 or IPv6 addresses resolved during DNS lookup. +pub const dns_answers = types.StringAttribute{ + .name = "dns.answers", + .brief = "The list of IPv4 or IPv6 addresses resolved during DNS lookup.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name being queried. +pub const dns_question_name = types.StringAttribute{ + .name = "dns.question.name", + .brief = "The name being queried.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const dotnet_gc_heap_generationValue = enum { + gen0, + gen1, + gen2, + loh, + poh, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .gen0 => "gen0", + .gen1 => "gen1", + .gen2 => "gen2", + .loh => "loh", + .poh => "poh", + }; + } +}; + +/// Name of the garbage collector managed heap generation. +pub const dotnet_gc_heap_generation = types.EnumAttribute(dotnet_gc_heap_generationValue){ + .base = types.StringAttribute{ + .name = "dotnet.gc.heap.generation", + .brief = "Name of the garbage collector managed heap generation.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = dotnet_gc_heap_generationValue.gen0, +}; +/// Represents the human-readable identifier of the node/instance to which a request was routed. +pub const elasticsearch_node_name = types.StringAttribute{ + .name = "elasticsearch.node.name", + .brief = "Represents the human-readable identifier of the node/instance to which a request was routed.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Unique identifier of an end user in the system. It maybe a username, email address, or other identifier. +pub const enduser_id = types.StringAttribute{ + .name = "enduser.id", + .brief = "Unique identifier of an end user in the system. It maybe a username, email address, or other identifier.", + .note = "Unique identifier of an end user in the system. ] [!Warning] ] This field contains sensitive (PII) information.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity. +pub const enduser_pseudo_id = types.StringAttribute{ + .name = "enduser.pseudo.id", + .brief = "Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity.", + .note = "Pseudonymous identifier of an end user. ] [!Warning] ] This field contains sensitive (linkable PII) information.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `user.roles` instead. +pub const enduser_role = types.StringAttribute{ + .name = "enduser.role", + .brief = "Deprecated, use `user.roles` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, no replacement at this time. +pub const enduser_scope = types.StringAttribute{ + .name = "enduser.scope", + .brief = "Deprecated, no replacement at this time.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A message providing more detail about an error in human-readable form. +pub const error_message = types.StringAttribute{ + .name = "error.message", + .brief = "A message providing more detail about an error in human-readable form.", + .note = "`error.message` should provide additional context and detail about an error. It is NOT RECOMMENDED to duplicate the value of `error.type` in `error.message`. It is also NOT RECOMMENDED to duplicate the value of `exception.message` in `error.message`. `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded cardinality and overlap with span status.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const error_typeValue = enum { + other, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .other => "_OTHER", + }; + } +}; + +/// Describes a class of error the operation ended with. +pub const error_type = types.EnumAttribute(error_typeValue){ + .base = types.StringAttribute{ + .name = "error.type", + .brief = "Describes a class of error the operation ended with.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = error_typeValue.other, +}; +/// Identifies the class / type of event. +pub const event_name = types.StringAttribute{ + .name = "event.name", + .brief = "Identifies the class / type of event.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Indicates that the exception is escaping the scope of the span. +pub const exception_escaped = types.StringAttribute{ + .name = "exception.escaped", + .brief = "Indicates that the exception is escaping the scope of the span.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The exception message. +pub const exception_message = types.StringAttribute{ + .name = "exception.message", + .brief = "The exception message.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// 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. +pub const exception_stacktrace = types.StringAttribute{ + .name = "exception.stacktrace", + .brief = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// 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. +pub const exception_type = types.StringAttribute{ + .name = "exception.type", + .brief = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// A boolean that is true if the serverless function is executed for the first time (aka cold-start). +pub const faas_coldstart = types.StringAttribute{ + .name = "faas.coldstart", + .brief = "A boolean that is true if the serverless function is executed for the first time (aka cold-start).", + .stability = .development, + .requirement_level = .recommended, +}; +/// A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). +pub const faas_cron = types.StringAttribute{ + .name = "faas.cron", + .brief = "A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const faas_document_collection = types.StringAttribute{ + .name = "faas.document.collection", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const faas_document_name = types.StringAttribute{ + .name = "faas.document.name", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const faas_document_operationValue = enum { + insert, + edit, + delete, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .insert => "insert", + .edit => "edit", + .delete => "delete", + }; + } +}; + +/// Describes the type of the operation that was performed on the data. +pub const faas_document_operation = types.EnumAttribute(faas_document_operationValue){ + .base = types.StringAttribute{ + .name = "faas.document.operation", + .brief = "Describes the type of the operation that was performed on the data.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = faas_document_operationValue.insert, +}; +/// 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). +pub const faas_document_time = types.StringAttribute{ + .name = "faas.document.time", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. +pub const faas_instance = types.StringAttribute{ + .name = "faas.instance", + .brief = "The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.", + .note = "- **AWS Lambda:** Use the (full) log stream name.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The invocation ID of the current function invocation. +pub const faas_invocation_id = types.StringAttribute{ + .name = "faas.invocation_id", + .brief = "The invocation ID of the current function invocation.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the invoked function. +pub const faas_invoked_name = types.StringAttribute{ + .name = "faas.invoked_name", + .brief = "The name of the invoked function.", + .note = "SHOULD be equal to the `faas.name` resource attribute of the invoked function.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const faas_invoked_providerValue = enum { + alibaba_cloud, + aws, + azure, + gcp, + tencent_cloud, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .alibaba_cloud => "alibaba_cloud", + .aws => "aws", + .azure => "azure", + .gcp => "gcp", + .tencent_cloud => "tencent_cloud", + }; + } +}; + +/// The cloud provider of the invoked function. +pub const faas_invoked_provider = types.EnumAttribute(faas_invoked_providerValue){ + .base = types.StringAttribute{ + .name = "faas.invoked_provider", + .brief = "The cloud provider of the invoked function.", + .note = "SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = faas_invoked_providerValue.alibaba_cloud, +}; +/// The cloud region of the invoked function. +pub const faas_invoked_region = types.StringAttribute{ + .name = "faas.invoked_region", + .brief = "The cloud region of the invoked function.", + .note = "SHOULD be equal to the `cloud.region` resource attribute of the invoked function.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The amount of memory available to the serverless function converted to Bytes. +pub const faas_max_memory = types.StringAttribute{ + .name = "faas.max_memory", + .brief = "The amount of memory available to the serverless function converted to Bytes.", + .note = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the single function that this runtime instance executes. +pub const faas_name = types.StringAttribute{ + .name = "faas.name", + .brief = "The name of the single function that this runtime instance executes.", + .note = "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.name`](/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 `[FUNCAPP]/[FUNC]`, 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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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). +pub const faas_time = types.StringAttribute{ + .name = "faas.time", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +pub const faas_triggerValue = enum { + datasource, + http, + pubsub, + timer, + other, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .datasource => "datasource", + .http => "http", + .pubsub => "pubsub", + .timer => "timer", + .other => "other", + }; + } +}; + +/// Type of the trigger which caused this function invocation. +pub const faas_trigger = types.EnumAttribute(faas_triggerValue){ + .base = types.StringAttribute{ + .name = "faas.trigger", + .brief = "Type of the trigger which caused this function invocation.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = faas_triggerValue.datasource, +}; +/// The immutable version of the function being executed. +pub const faas_version = types.StringAttribute{ + .name = "faas.version", + .brief = "The immutable version of the function being executed.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier for the flag evaluation context. For example, the targeting key. +pub const feature_flag_context_id = types.StringAttribute{ + .name = "feature_flag.context.id", + .brief = "The unique identifier for the flag evaluation context. For example, the targeting key.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `error.message` instead. +pub const feature_flag_evaluation_error_message = types.StringAttribute{ + .name = "feature_flag.evaluation.error.message", + .brief = "Deprecated, use `error.message` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const feature_flag_evaluation_reasonValue = enum { + static, + default, + targeting_match, + split, + cached, + disabled, + unknown, + stale, + @"error", + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .static => "static", + .default => "default", + .targeting_match => "targeting_match", + .split => "split", + .cached => "cached", + .disabled => "disabled", + .unknown => "unknown", + .stale => "stale", + .@"error" => "error", + }; + } +}; + +/// Deprecated, use `feature_flag.result.reason` instead. +pub const feature_flag_evaluation_reason = types.EnumAttribute(feature_flag_evaluation_reasonValue){ + .base = types.StringAttribute{ + .name = "feature_flag.evaluation.reason", + .brief = "Deprecated, use `feature_flag.result.reason` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = feature_flag_evaluation_reasonValue.static, +}; +/// The lookup key of the feature flag. +pub const feature_flag_key = types.StringAttribute{ + .name = "feature_flag.key", + .brief = "The lookup key of the feature flag.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Identifies the feature flag provider. +pub const feature_flag_provider_name = types.StringAttribute{ + .name = "feature_flag.provider.name", + .brief = "Identifies the feature flag provider.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const feature_flag_result_reasonValue = enum { + static, + default, + targeting_match, + split, + cached, + disabled, + unknown, + stale, + @"error", + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .static => "static", + .default => "default", + .targeting_match => "targeting_match", + .split => "split", + .cached => "cached", + .disabled => "disabled", + .unknown => "unknown", + .stale => "stale", + .@"error" => "error", + }; + } +}; + +/// The reason code which shows how a feature flag value was determined. +pub const feature_flag_result_reason = types.EnumAttribute(feature_flag_result_reasonValue){ + .base = types.StringAttribute{ + .name = "feature_flag.result.reason", + .brief = "The reason code which shows how a feature flag value was determined.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = feature_flag_result_reasonValue.static, +}; +/// The evaluated value of the feature flag. +pub const feature_flag_result_value = types.StringAttribute{ + .name = "feature_flag.result.value", + .brief = "The evaluated value of the feature flag.", + .note = "With some feature flag providers, feature flag results can be quite large or contain private or sensitive details. Because of this, `feature_flag.result.variant` is often the preferred attribute if it is available. It may be desirable to redact or otherwise limit the size and scope of `feature_flag.result.value` if possible. Because the evaluated flag value is unstructured and may be any type, it is left to the instrumentation author to determine how best to achieve this.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A semantic identifier for an evaluated flag value. +pub const feature_flag_result_variant = types.StringAttribute{ + .name = "feature_flag.result.variant", + .brief = "A semantic identifier for an evaluated flag value.", + .note = "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`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs. +pub const feature_flag_set_id = types.StringAttribute{ + .name = "feature_flag.set.id", + .brief = "The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `feature_flag.result.variant` instead. +pub const feature_flag_variant = types.StringAttribute{ + .name = "feature_flag.variant", + .brief = "Deprecated, use `feature_flag.result.variant` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset. +pub const feature_flag_version = types.StringAttribute{ + .name = "feature_flag.version", + .brief = "The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Time when the file was last accessed, in ISO 8601 format. +pub const file_accessed = types.StringAttribute{ + .name = "file.accessed", + .brief = "Time when the file was last accessed, in ISO 8601 format.", + .note = "This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Array of file attributes. +pub const file_attributes = types.StringAttribute{ + .name = "file.attributes", + .brief = "Array of file attributes.", + .note = "Attributes names depend on the OS or file system. Here’s a non-exhaustive list of values expected for this attribute: `archive`, `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`, `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`, `write`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Time when the file attributes or metadata was last changed, in ISO 8601 format. +pub const file_changed = types.StringAttribute{ + .name = "file.changed", + .brief = "Time when the file attributes or metadata was last changed, in ISO 8601 format.", + .note = "`file.changed` captures the time when any of the file's properties or attributes (including the content) are changed, while `file.modified` captures the timestamp when the file content is modified.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Time when the file was created, in ISO 8601 format. +pub const file_created = types.StringAttribute{ + .name = "file.created", + .brief = "Time when the file was created, in ISO 8601 format.", + .note = "This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Directory where the file is located. It should include the drive letter, when appropriate. +pub const file_directory = types.StringAttribute{ + .name = "file.directory", + .brief = "Directory where the file is located. It should include the drive letter, when appropriate.", + .stability = .development, + .requirement_level = .recommended, +}; +/// File extension, excluding the leading dot. +pub const file_extension = types.StringAttribute{ + .name = "file.extension", + .brief = "File extension, excluding the leading dot.", + .note = "When the file name has multiple extensions (example.tar.gz), only the last one should be captured (\"gz\", not \"tar.gz\").", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the fork. A fork is additional data associated with a filesystem object. +pub const file_fork_name = types.StringAttribute{ + .name = "file.fork_name", + .brief = "Name of the fork. A fork is additional data associated with a filesystem object.", + .note = "On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist. On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: C:\\path\\to\\filename.extension:some_fork_name, and some_fork_name is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Primary Group ID (GID) of the file. +pub const file_group_id = types.StringAttribute{ + .name = "file.group.id", + .brief = "Primary Group ID (GID) of the file.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Primary group name of the file. +pub const file_group_name = types.StringAttribute{ + .name = "file.group.name", + .brief = "Primary group name of the file.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Inode representing the file in the filesystem. +pub const file_inode = types.StringAttribute{ + .name = "file.inode", + .brief = "Inode representing the file in the filesystem.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Mode of the file in octal representation. +pub const file_mode = types.StringAttribute{ + .name = "file.mode", + .brief = "Mode of the file in octal representation.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Time when the file content was last modified, in ISO 8601 format. +pub const file_modified = types.StringAttribute{ + .name = "file.modified", + .brief = "Time when the file content was last modified, in ISO 8601 format.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the file including the extension, without the directory. +pub const file_name = types.StringAttribute{ + .name = "file.name", + .brief = "Name of the file including the extension, without the directory.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The user ID (UID) or security identifier (SID) of the file owner. +pub const file_owner_id = types.StringAttribute{ + .name = "file.owner.id", + .brief = "The user ID (UID) or security identifier (SID) of the file owner.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Username of the file owner. +pub const file_owner_name = types.StringAttribute{ + .name = "file.owner.name", + .brief = "Username of the file owner.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Full path to the file, including the file name. It should include the drive letter, when appropriate. +pub const file_path = types.StringAttribute{ + .name = "file.path", + .brief = "Full path to the file, including the file name. It should include the drive letter, when appropriate.", + .stability = .development, + .requirement_level = .recommended, +}; +/// File size in bytes. +pub const file_size = types.StringAttribute{ + .name = "file.size", + .brief = "File size in bytes.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Path to the target of a symbolic link. +pub const file_symbolic_link_target_path = types.StringAttribute{ + .name = "file.symbolic_link.target_path", + .brief = "Path to the target of a symbolic link.", + .note = "This attribute is only applicable to symbolic links.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The container within GCP where the AppHub application is defined. +pub const gcp_apphub_application_container = types.StringAttribute{ + .name = "gcp.apphub.application.container", + .brief = "The container within GCP where the AppHub application is defined.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the application as configured in AppHub. +pub const gcp_apphub_application_id = types.StringAttribute{ + .name = "gcp.apphub.application.id", + .brief = "The name of the application as configured in AppHub.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The GCP zone or region where the application is defined. +pub const gcp_apphub_application_location = types.StringAttribute{ + .name = "gcp.apphub.application.location", + .brief = "The GCP zone or region where the application is defined.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const gcp_apphub_service_criticality_typeValue = enum { + mission_critical, + high, + medium, + low, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .mission_critical => "MISSION_CRITICAL", + .high => "HIGH", + .medium => "MEDIUM", + .low => "LOW", + }; + } +}; + +/// Criticality of a service indicates its importance to the business. +pub const gcp_apphub_service_criticality_type = types.EnumAttribute(gcp_apphub_service_criticality_typeValue){ + .base = types.StringAttribute{ + .name = "gcp.apphub.service.criticality_type", + .brief = "Criticality of a service indicates its importance to the business.", + .note = "[See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gcp_apphub_service_criticality_typeValue.mission_critical, +}; +pub const gcp_apphub_service_environment_typeValue = enum { + production, + staging, + @"test", + development, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .production => "PRODUCTION", + .staging => "STAGING", + .@"test" => "TEST", + .development => "DEVELOPMENT", + }; + } +}; + +/// Environment of a service is the stage of a software lifecycle. +pub const gcp_apphub_service_environment_type = types.EnumAttribute(gcp_apphub_service_environment_typeValue){ + .base = types.StringAttribute{ + .name = "gcp.apphub.service.environment_type", + .brief = "Environment of a service is the stage of a software lifecycle.", + .note = "[See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gcp_apphub_service_environment_typeValue.production, +}; +/// The name of the service as configured in AppHub. +pub const gcp_apphub_service_id = types.StringAttribute{ + .name = "gcp.apphub.service.id", + .brief = "The name of the service as configured in AppHub.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const gcp_apphub_workload_criticality_typeValue = enum { + mission_critical, + high, + medium, + low, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .mission_critical => "MISSION_CRITICAL", + .high => "HIGH", + .medium => "MEDIUM", + .low => "LOW", + }; + } +}; + +/// Criticality of a workload indicates its importance to the business. +pub const gcp_apphub_workload_criticality_type = types.EnumAttribute(gcp_apphub_workload_criticality_typeValue){ + .base = types.StringAttribute{ + .name = "gcp.apphub.workload.criticality_type", + .brief = "Criticality of a workload indicates its importance to the business.", + .note = "[See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gcp_apphub_workload_criticality_typeValue.mission_critical, +}; +pub const gcp_apphub_workload_environment_typeValue = enum { + production, + staging, + @"test", + development, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .production => "PRODUCTION", + .staging => "STAGING", + .@"test" => "TEST", + .development => "DEVELOPMENT", + }; + } +}; + +/// Environment of a workload is the stage of a software lifecycle. +pub const gcp_apphub_workload_environment_type = types.EnumAttribute(gcp_apphub_workload_environment_typeValue){ + .base = types.StringAttribute{ + .name = "gcp.apphub.workload.environment_type", + .brief = "Environment of a workload is the stage of a software lifecycle.", + .note = "[See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gcp_apphub_workload_environment_typeValue.production, +}; +/// The name of the workload as configured in AppHub. +pub const gcp_apphub_workload_id = types.StringAttribute{ + .name = "gcp.apphub.workload.id", + .brief = "The name of the workload as configured in AppHub.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Identifies the Google Cloud service for which the official client library is intended. +pub const gcp_client_service = types.StringAttribute{ + .name = "gcp.client.service", + .brief = "Identifies the Google Cloud service for which the official client library is intended.", + .note = "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'.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const gcp_cloud_run_job_execution = types.StringAttribute{ + .name = "gcp.cloud_run.job.execution", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const gcp_cloud_run_job_task_index = types.StringAttribute{ + .name = "gcp.cloud_run.job.task_index", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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). +pub const gcp_gce_instance_hostname = types.StringAttribute{ + .name = "gcp.gce.instance.hostname", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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). +pub const gcp_gce_instance_name = types.StringAttribute{ + .name = "gcp.gce.instance.name", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Free-form description of the GenAI agent provided by the application. +pub const gen_ai_agent_description = types.StringAttribute{ + .name = "gen_ai.agent.description", + .brief = "Free-form description of the GenAI agent provided by the application.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier of the GenAI agent. +pub const gen_ai_agent_id = types.StringAttribute{ + .name = "gen_ai.agent.id", + .brief = "The unique identifier of the GenAI agent.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Human-readable name of the GenAI agent provided by the application. +pub const gen_ai_agent_name = types.StringAttribute{ + .name = "gen_ai.agent.name", + .brief = "Human-readable name of the GenAI agent provided by the application.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use Event API to report completions contents. +pub const gen_ai_completion = types.StringAttribute{ + .name = "gen_ai.completion", + .brief = "Deprecated, use Event API to report completions contents.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation. +pub const gen_ai_conversation_id = types.StringAttribute{ + .name = "gen_ai.conversation.id", + .brief = "The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The data source identifier. +pub const gen_ai_data_source_id = types.StringAttribute{ + .name = "gen_ai.data_source.id", + .brief = "The data source identifier.", + .note = "Data sources are used by AI agents and RAG applications to store grounding data. A data source may be an external database, object store, document collection, website, or any other storage system used by the GenAI agent or application. The `gen_ai.data_source.id` SHOULD match the identifier used by the GenAI system rather than a name specific to the external storage, such as a database or object store. Semantic conventions referencing `gen_ai.data_source.id` MAY also leverage additional attributes, such as `db.*`, to further identify and describe the data source.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const gen_ai_openai_request_response_formatValue = enum { + text, + json_object, + json_schema, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .text => "text", + .json_object => "json_object", + .json_schema => "json_schema", + }; + } +}; + +/// Deprecated, use `gen_ai.output.type`. +pub const gen_ai_openai_request_response_format = types.EnumAttribute(gen_ai_openai_request_response_formatValue){ + .base = types.StringAttribute{ + .name = "gen_ai.openai.request.response_format", + .brief = "Deprecated, use `gen_ai.output.type`.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gen_ai_openai_request_response_formatValue.text, +}; +/// Deprecated, use `gen_ai.request.seed`. +pub const gen_ai_openai_request_seed = types.StringAttribute{ + .name = "gen_ai.openai.request.seed", + .brief = "Deprecated, use `gen_ai.request.seed`.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const gen_ai_openai_request_service_tierValue = enum { + auto, + default, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .auto => "auto", + .default => "default", + }; + } +}; + +/// The service tier requested. May be a specific tier, default, or auto. +pub const gen_ai_openai_request_service_tier = types.EnumAttribute(gen_ai_openai_request_service_tierValue){ + .base = types.StringAttribute{ + .name = "gen_ai.openai.request.service_tier", + .brief = "The service tier requested. May be a specific tier, default, or auto.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gen_ai_openai_request_service_tierValue.auto, +}; +/// The service tier used for the response. +pub const gen_ai_openai_response_service_tier = types.StringAttribute{ + .name = "gen_ai.openai.response.service_tier", + .brief = "The service tier used for the response.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A fingerprint to track any eventual change in the Generative AI environment. +pub const gen_ai_openai_response_system_fingerprint = types.StringAttribute{ + .name = "gen_ai.openai.response.system_fingerprint", + .brief = "A fingerprint to track any eventual change in the Generative AI environment.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const gen_ai_operation_nameValue = enum { + chat, + generate_content, + text_completion, + embeddings, + create_agent, + invoke_agent, + execute_tool, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .chat => "chat", + .generate_content => "generate_content", + .text_completion => "text_completion", + .embeddings => "embeddings", + .create_agent => "create_agent", + .invoke_agent => "invoke_agent", + .execute_tool => "execute_tool", + }; + } +}; + +/// The name of the operation being performed. +pub const gen_ai_operation_name = types.EnumAttribute(gen_ai_operation_nameValue){ + .base = types.StringAttribute{ + .name = "gen_ai.operation.name", + .brief = "The name of the operation being performed.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gen_ai_operation_nameValue.chat, +}; +pub const gen_ai_output_typeValue = enum { + text, + json, + image, + speech, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .text => "text", + .json => "json", + .image => "image", + .speech => "speech", + }; + } +}; + +/// Represents the content type requested by the client. +pub const gen_ai_output_type = types.EnumAttribute(gen_ai_output_typeValue){ + .base = types.StringAttribute{ + .name = "gen_ai.output.type", + .brief = "Represents the content type requested by the client.", + .note = "This attribute SHOULD be used when the client requests output of a specific type. The model may return zero or more outputs of this type. This attribute specifies the output modality and not the actual output format. For example, if an image is requested, the actual output could be a URL pointing to an image file. Additional output format details may be recorded in the future in the `gen_ai.output.{type}.*` attributes.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gen_ai_output_typeValue.text, +}; +/// Deprecated, use Event API to report prompt contents. +pub const gen_ai_prompt = types.StringAttribute{ + .name = "gen_ai.prompt", + .brief = "Deprecated, use Event API to report prompt contents.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The target number of candidate completions to return. +pub const gen_ai_request_choice_count = types.StringAttribute{ + .name = "gen_ai.request.choice.count", + .brief = "The target number of candidate completions to return.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The encoding formats requested in an embeddings operation, if specified. +pub const gen_ai_request_encoding_formats = types.StringAttribute{ + .name = "gen_ai.request.encoding_formats", + .brief = "The encoding formats requested in an embeddings operation, if specified.", + .note = "In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The frequency penalty setting for the GenAI request. +pub const gen_ai_request_frequency_penalty = types.StringAttribute{ + .name = "gen_ai.request.frequency_penalty", + .brief = "The frequency penalty setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The maximum number of tokens the model generates for a request. +pub const gen_ai_request_max_tokens = types.StringAttribute{ + .name = "gen_ai.request.max_tokens", + .brief = "The maximum number of tokens the model generates for a request.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the GenAI model a request is being made to. +pub const gen_ai_request_model = types.StringAttribute{ + .name = "gen_ai.request.model", + .brief = "The name of the GenAI model a request is being made to.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The presence penalty setting for the GenAI request. +pub const gen_ai_request_presence_penalty = types.StringAttribute{ + .name = "gen_ai.request.presence_penalty", + .brief = "The presence penalty setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Requests with same seed value more likely to return same result. +pub const gen_ai_request_seed = types.StringAttribute{ + .name = "gen_ai.request.seed", + .brief = "Requests with same seed value more likely to return same result.", + .stability = .development, + .requirement_level = .recommended, +}; +/// List of sequences that the model will use to stop generating further tokens. +pub const gen_ai_request_stop_sequences = types.StringAttribute{ + .name = "gen_ai.request.stop_sequences", + .brief = "List of sequences that the model will use to stop generating further tokens.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The temperature setting for the GenAI request. +pub const gen_ai_request_temperature = types.StringAttribute{ + .name = "gen_ai.request.temperature", + .brief = "The temperature setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The top_k sampling setting for the GenAI request. +pub const gen_ai_request_top_k = types.StringAttribute{ + .name = "gen_ai.request.top_k", + .brief = "The top_k sampling setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The top_p sampling setting for the GenAI request. +pub const gen_ai_request_top_p = types.StringAttribute{ + .name = "gen_ai.request.top_p", + .brief = "The top_p sampling setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Array of reasons the model stopped generating tokens, corresponding to each generation received. +pub const gen_ai_response_finish_reasons = types.StringAttribute{ + .name = "gen_ai.response.finish_reasons", + .brief = "Array of reasons the model stopped generating tokens, corresponding to each generation received.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The unique identifier for the completion. +pub const gen_ai_response_id = types.StringAttribute{ + .name = "gen_ai.response.id", + .brief = "The unique identifier for the completion.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the model that generated the response. +pub const gen_ai_response_model = types.StringAttribute{ + .name = "gen_ai.response.model", + .brief = "The name of the model that generated the response.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const gen_ai_systemValue = enum { + openai, + gcp_gen_ai, + gcp_vertex_ai, + gcp_gemini, + vertex_ai, + gemini, + anthropic, + cohere, + azure_ai_inference, + azure_ai_openai, + az_ai_inference, + az_ai_openai, + ibm_watsonx_ai, + aws_bedrock, + perplexity, + xai, + deepseek, + groq, + mistral_ai, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .openai => "openai", + .gcp_gen_ai => "gcp.gen_ai", + .gcp_vertex_ai => "gcp.vertex_ai", + .gcp_gemini => "gcp.gemini", + .vertex_ai => "vertex_ai", + .gemini => "gemini", + .anthropic => "anthropic", + .cohere => "cohere", + .azure_ai_inference => "azure.ai.inference", + .azure_ai_openai => "azure.ai.openai", + .az_ai_inference => "az.ai.inference", + .az_ai_openai => "azure.ai.openai", + .ibm_watsonx_ai => "ibm.watsonx.ai", + .aws_bedrock => "aws.bedrock", + .perplexity => "perplexity", + .xai => "xai", + .deepseek => "deepseek", + .groq => "groq", + .mistral_ai => "mistral_ai", + }; + } +}; + +/// The Generative AI product as identified by the client or server instrumentation. +pub const gen_ai_system = types.EnumAttribute(gen_ai_systemValue){ + .base = types.StringAttribute{ + .name = "gen_ai.system", + .brief = "The Generative AI product as identified by the client or server instrumentation.", + .note = "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. Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI client libraries. In such cases, the `gen_ai.system` is set to `openai` based on the instrumentation's best knowledge, instead of the actual system. The `server.address` attribute may help identify the actual system in use for `openai`. 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`.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gen_ai_systemValue.openai, +}; +pub const gen_ai_token_typeValue = enum { + input, + completion, + output, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .input => "input", + .completion => "output", + .output => "output", + }; + } +}; + +/// The type of token being counted. +pub const gen_ai_token_type = types.EnumAttribute(gen_ai_token_typeValue){ + .base = types.StringAttribute{ + .name = "gen_ai.token.type", + .brief = "The type of token being counted.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = gen_ai_token_typeValue.input, +}; +/// The tool call identifier. +pub const gen_ai_tool_call_id = types.StringAttribute{ + .name = "gen_ai.tool.call.id", + .brief = "The tool call identifier.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The tool description. +pub const gen_ai_tool_description = types.StringAttribute{ + .name = "gen_ai.tool.description", + .brief = "The tool description.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the tool utilized by the agent. +pub const gen_ai_tool_name = types.StringAttribute{ + .name = "gen_ai.tool.name", + .brief = "Name of the tool utilized by the agent.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Type of the tool utilized by the agent +pub const gen_ai_tool_type = types.StringAttribute{ + .name = "gen_ai.tool.type", + .brief = "Type of the tool utilized by the agent", + .note = "Extension: A tool executed on the agent-side to directly call external APIs, bridging the gap between the agent and real-world systems. Agent-side operations involve actions that are performed by the agent on the server or within the agent's controlled environment. Function: A tool executed on the client-side, where the agent generates parameters for a predefined function, and the client executes the logic. Client-side operations are actions taken on the user's end or within the client application. Datastore: A tool used by the agent to access and query structured or unstructured external data for retrieval-augmented tasks or knowledge updates.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `gen_ai.usage.output_tokens` instead. +pub const gen_ai_usage_completion_tokens = types.StringAttribute{ + .name = "gen_ai.usage.completion_tokens", + .brief = "Deprecated, use `gen_ai.usage.output_tokens` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The number of tokens used in the GenAI input (prompt). +pub const gen_ai_usage_input_tokens = types.StringAttribute{ + .name = "gen_ai.usage.input_tokens", + .brief = "The number of tokens used in the GenAI input (prompt).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The number of tokens used in the GenAI response (completion). +pub const gen_ai_usage_output_tokens = types.StringAttribute{ + .name = "gen_ai.usage.output_tokens", + .brief = "The number of tokens used in the GenAI response (completion).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `gen_ai.usage.input_tokens` instead. +pub const gen_ai_usage_prompt_tokens = types.StringAttribute{ + .name = "gen_ai.usage.prompt_tokens", + .brief = "Deprecated, use `gen_ai.usage.input_tokens` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const geo_continent_codeValue = enum { + af, + an, + as, + eu, + na, + oc, + sa, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .af => "AF", + .an => "AN", + .as => "AS", + .eu => "EU", + .na => "NA", + .oc => "OC", + .sa => "SA", + }; + } +}; + +/// Two-letter code representing continent’s name. +pub const geo_continent_code = types.EnumAttribute(geo_continent_codeValue){ + .base = types.StringAttribute{ + .name = "geo.continent.code", + .brief = "Two-letter code representing continent’s name.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = geo_continent_codeValue.af, +}; +/// Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)). +pub const geo_country_iso_code = types.StringAttribute{ + .name = "geo.country.iso_code", + .brief = "Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Locality name. Represents the name of a city, town, village, or similar populated place. +pub const geo_locality_name = types.StringAttribute{ + .name = "geo.locality.name", + .brief = "Locality name. Represents the name of a city, town, village, or similar populated place.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). +pub const geo_location_lat = types.StringAttribute{ + .name = "geo.location.lat", + .brief = "Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). +pub const geo_location_lon = types.StringAttribute{ + .name = "geo.location.lon", + .brief = "Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. +pub const geo_postal_code = types.StringAttribute{ + .name = "geo.postal_code", + .brief = "Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)). +pub const geo_region_iso_code = types.StringAttribute{ + .name = "geo.region.iso_code", + .brief = "Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)).", + .stability = .development, + .requirement_level = .recommended, +}; +pub const go_memory_typeValue = enum { + stack, + other, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .stack => "stack", + .other => "other", + }; + } +}; + +/// The type of memory. +pub const go_memory_type = types.EnumAttribute(go_memory_typeValue){ + .base = types.StringAttribute{ + .name = "go.memory.type", + .brief = "The type of memory.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = go_memory_typeValue.stack, +}; +/// The GraphQL document being executed. +pub const graphql_document = types.StringAttribute{ + .name = "graphql.document", + .brief = "The GraphQL document being executed.", + .note = "The value may be sanitized to exclude sensitive information.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the operation being executed. +pub const graphql_operation_name = types.StringAttribute{ + .name = "graphql.operation.name", + .brief = "The name of the operation being executed.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const graphql_operation_typeValue = enum { + query, + mutation, + subscription, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .query => "query", + .mutation => "mutation", + .subscription => "subscription", + }; + } +}; + +/// The type of the operation being executed. +pub const graphql_operation_type = types.EnumAttribute(graphql_operation_typeValue){ + .base = types.StringAttribute{ + .name = "graphql.operation.type", + .brief = "The type of the operation being executed.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = graphql_operation_typeValue.query, +}; +/// Unique identifier for the application +pub const heroku_app_id = types.StringAttribute{ + .name = "heroku.app.id", + .brief = "Unique identifier for the application", + .stability = .development, + .requirement_level = .recommended, +}; +/// Commit hash for the current release +pub const heroku_release_commit = types.StringAttribute{ + .name = "heroku.release.commit", + .brief = "Commit hash for the current release", + .stability = .development, + .requirement_level = .recommended, +}; +/// Time and date the release was created +pub const heroku_release_creation_timestamp = types.StringAttribute{ + .name = "heroku.release.creation_timestamp", + .brief = "Time and date the release was created", + .stability = .development, + .requirement_level = .recommended, +}; +pub const host_archValue = enum { + amd64, + arm32, + arm64, + ia64, + ppc32, + ppc64, + s390x, + x86, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .amd64 => "amd64", + .arm32 => "arm32", + .arm64 => "arm64", + .ia64 => "ia64", + .ppc32 => "ppc32", + .ppc64 => "ppc64", + .s390x => "s390x", + .x86 => "x86", + }; + } +}; + +/// The CPU architecture the host system is running on. +pub const host_arch = types.EnumAttribute(host_archValue){ + .base = types.StringAttribute{ + .name = "host.arch", + .brief = "The CPU architecture the host system is running on.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = host_archValue.amd64, +}; +/// The amount of level 2 memory cache available to the processor (in Bytes). +pub const host_cpu_cache_l2_size = types.StringAttribute{ + .name = "host.cpu.cache.l2.size", + .brief = "The amount of level 2 memory cache available to the processor (in Bytes).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Family or generation of the CPU. +pub const host_cpu_family = types.StringAttribute{ + .name = "host.cpu.family", + .brief = "Family or generation of the CPU.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. +pub const host_cpu_model_id = types.StringAttribute{ + .name = "host.cpu.model.id", + .brief = "Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Model designation of the processor. +pub const host_cpu_model_name = types.StringAttribute{ + .name = "host.cpu.model.name", + .brief = "Model designation of the processor.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Stepping or core revisions. +pub const host_cpu_stepping = types.StringAttribute{ + .name = "host.cpu.stepping", + .brief = "Stepping or core revisions.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Processor manufacturer identifier. A maximum 12-character string. +pub const host_cpu_vendor_id = types.StringAttribute{ + .name = "host.cpu.vendor.id", + .brief = "Processor manufacturer identifier. A maximum 12-character string.", + .note = "[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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const host_id = types.StringAttribute{ + .name = "host.id", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// VM image ID or host OS image ID. For Cloud, this value is from the provider. +pub const host_image_id = types.StringAttribute{ + .name = "host.image.id", + .brief = "VM image ID or host OS image ID. For Cloud, this value is from the provider.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the VM image or OS install the host was instantiated from. +pub const host_image_name = types.StringAttribute{ + .name = "host.image.name", + .brief = "Name of the VM image or OS install the host was instantiated from.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +pub const host_image_version = types.StringAttribute{ + .name = "host.image.version", + .brief = "The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Available IP addresses of the host, excluding loopback interfaces. +pub const host_ip = types.StringAttribute{ + .name = "host.ip", + .brief = "Available IP addresses of the host, excluding loopback interfaces.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Available MAC addresses of the host, excluding loopback interfaces. +pub const host_mac = types.StringAttribute{ + .name = "host.mac", + .brief = "Available MAC addresses of the host, excluding loopback interfaces.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const host_name = types.StringAttribute{ + .name = "host.name", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Type of host. For Cloud, this must be the machine type. +pub const host_type = types.StringAttribute{ + .name = "host.type", + .brief = "Type of host. For Cloud, this must be the machine type.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `client.address` instead. +pub const http_client_ip = types.StringAttribute{ + .name = "http.client_ip", + .brief = "Deprecated, use `client.address` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const http_connection_stateValue = enum { + active, + idle, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .active => "active", + .idle => "idle", + }; + } +}; + +/// State of the HTTP connection in the HTTP connection pool. +pub const http_connection_state = types.EnumAttribute(http_connection_stateValue){ + .base = types.StringAttribute{ + .name = "http.connection.state", + .brief = "State of the HTTP connection in the HTTP connection pool.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = http_connection_stateValue.active, +}; +pub const http_flavorValue = enum { + http_1_0, + http_1_1, + http_2_0, + http_3_0, + spdy, + quic, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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, use `network.protocol.name` instead. +pub const http_flavor = types.EnumAttribute(http_flavorValue){ + .base = types.StringAttribute{ + .name = "http.flavor", + .brief = "Deprecated, use `network.protocol.name` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = http_flavorValue.http_1_0, +}; +/// Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage. +pub const http_host = types.StringAttribute{ + .name = "http.host", + .brief = "Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `http.request.method` instead. +pub const http_method = types.StringAttribute{ + .name = "http.method", + .brief = "Deprecated, use `http.request.method` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const http_request_body_size = types.StringAttribute{ + .name = "http.request.body.size", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// HTTP request headers, ``key`` being the normalized HTTP Header name (lowercase), the value being the header values. +pub const http_request_header = types.StringAttribute{ + .name = "http.request.header", + .brief = "HTTP request headers, ``key`` being the normalized HTTP Header name (lowercase), the value being the header values.", + .note = "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: - A header `Content-Type: application/json` SHOULD be recorded as the `http.request.header.content-type` attribute with value `[\"application/json\"]`. - A header `X-Forwarded-For: 1.2.3.4, 1.2.3.5` SHOULD be recorded as the `http.request.header.x-forwarded-for` attribute with value `[\"1.2.3.4\", \"1.2.3.5\"]` or `[\"1.2.3.4, 1.2.3.5\"]` depending on the HTTP library.", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const http_request_methodValue = enum { + connect, + delete, + get, + head, + options, + patch, + post, + put, + trace, + other, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .connect => "CONNECT", + .delete => "DELETE", + .get => "GET", + .head => "HEAD", + .options => "OPTIONS", + .patch => "PATCH", + .post => "POST", + .put => "PUT", + .trace => "TRACE", + .other => "_OTHER", + }; + } +}; + +/// HTTP request method. +pub const http_request_method = types.EnumAttribute(http_request_methodValue){ + .base = types.StringAttribute{ + .name = "http.request.method", + .brief = "HTTP request method.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = http_request_methodValue.connect, +}; +/// Original HTTP method sent by the client in the request line. +pub const http_request_method_original = types.StringAttribute{ + .name = "http.request.method_original", + .brief = "Original HTTP method sent by the client in the request line.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The ordinal number of request resending attempt (for any reason, including redirects). +pub const http_request_resend_count = types.StringAttribute{ + .name = "http.request.resend_count", + .brief = "The ordinal number of request resending attempt (for any reason, including redirects).", + .note = "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).", + .stability = .stable, + .requirement_level = .recommended, +}; +/// 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. +pub const http_request_size = types.StringAttribute{ + .name = "http.request.size", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `http.request.header.content-length` instead. +pub const http_request_content_length = types.StringAttribute{ + .name = "http.request_content_length", + .brief = "Deprecated, use `http.request.header.content-length` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `http.request.body.size` instead. +pub const http_request_content_length_uncompressed = types.StringAttribute{ + .name = "http.request_content_length_uncompressed", + .brief = "Deprecated, use `http.request.body.size` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const http_response_body_size = types.StringAttribute{ + .name = "http.response.body.size", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// HTTP response headers, ``key`` being the normalized HTTP Header name (lowercase), the value being the header values. +pub const http_response_header = types.StringAttribute{ + .name = "http.response.header", + .brief = "HTTP response headers, ``key`` being the normalized HTTP Header name (lowercase), the value being the header values.", + .note = "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: - A header `Content-Type: application/json` header SHOULD be recorded as the `http.request.response.content-type` attribute with value `[\"application/json\"]`. - A header `My-custom-header: abc, def` header SHOULD be recorded as the `http.response.header.my-custom-header` attribute with value `[\"abc\", \"def\"]` or `[\"abc, def\"]` depending on the HTTP library.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// 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. +pub const http_response_size = types.StringAttribute{ + .name = "http.response.size", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). +pub const http_response_status_code = types.StringAttribute{ + .name = "http.response.status_code", + .brief = "[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Deprecated, use `http.response.header.content-length` instead. +pub const http_response_content_length = types.StringAttribute{ + .name = "http.response_content_length", + .brief = "Deprecated, use `http.response.header.content-length` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `http.response.body.size` instead. +pub const http_response_content_length_uncompressed = types.StringAttribute{ + .name = "http.response_content_length_uncompressed", + .brief = "Deprecated, use `http.response.body.size` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The matched route, that is, the path template in the format used by the respective server framework. +pub const http_route = types.StringAttribute{ + .name = "http.route", + .brief = "The matched route, that is, the path template in the format used by the respective server framework.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Deprecated, use `url.scheme` instead. +pub const http_scheme = types.StringAttribute{ + .name = "http.scheme", + .brief = "Deprecated, use `url.scheme` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `server.address` instead. +pub const http_server_name = types.StringAttribute{ + .name = "http.server_name", + .brief = "Deprecated, use `server.address` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `http.response.status_code` instead. +pub const http_status_code = types.StringAttribute{ + .name = "http.status_code", + .brief = "Deprecated, use `http.response.status_code` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `url.path` and `url.query` instead. +pub const http_target = types.StringAttribute{ + .name = "http.target", + .brief = "Deprecated, use `url.path` and `url.query` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `url.full` instead. +pub const http_url = types.StringAttribute{ + .name = "http.url", + .brief = "Deprecated, use `url.full` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `user_agent.original` instead. +pub const http_user_agent = types.StringAttribute{ + .name = "http.user_agent", + .brief = "Deprecated, use `user_agent.original` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// An identifier for the hardware component, unique within the monitored host +pub const hw_id = types.StringAttribute{ + .name = "hw.id", + .brief = "An identifier for the hardware component, unique within the monitored host", + .stability = .development, + .requirement_level = .recommended, +}; +/// An easily-recognizable name for the hardware component +pub const hw_name = types.StringAttribute{ + .name = "hw.name", + .brief = "An easily-recognizable name for the hardware component", + .stability = .development, + .requirement_level = .recommended, +}; +/// Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller) +pub const hw_parent = types.StringAttribute{ + .name = "hw.parent", + .brief = "Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller)", + .stability = .development, + .requirement_level = .recommended, +}; +pub const hw_stateValue = enum { + ok, + degraded, + failed, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .ok => "ok", + .degraded => "degraded", + .failed => "failed", + }; + } +}; + +/// The current state of the component +pub const hw_state = types.EnumAttribute(hw_stateValue){ + .base = types.StringAttribute{ + .name = "hw.state", + .brief = "The current state of the component", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = hw_stateValue.ok, +}; +pub const hw_typeValue = enum { + battery, + cpu, + disk_controller, + enclosure, + fan, + gpu, + logical_disk, + memory, + network, + physical_disk, + power_supply, + tape_drive, + temperature, + voltage, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .battery => "battery", + .cpu => "cpu", + .disk_controller => "disk_controller", + .enclosure => "enclosure", + .fan => "fan", + .gpu => "gpu", + .logical_disk => "logical_disk", + .memory => "memory", + .network => "network", + .physical_disk => "physical_disk", + .power_supply => "power_supply", + .tape_drive => "tape_drive", + .temperature => "temperature", + .voltage => "voltage", + }; + } +}; + +/// Type of the component +pub const hw_type = types.EnumAttribute(hw_typeValue){ + .base = types.StringAttribute{ + .name = "hw.type", + .brief = "Type of the component", + .note = "Describes the category of the hardware component for which `hw.state` is being reported. For example, `hw.type=temperature` along with `hw.state=degraded` would indicate that the temperature of the hardware component has been reported as `degraded`.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = hw_typeValue.battery, +}; +pub const ios_app_stateValue = enum { + active, + inactive, + background, + foreground, + terminate, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .active => "active", + .inactive => "inactive", + .background => "background", + .foreground => "foreground", + .terminate => "terminate", + }; + } +}; + +/// This attribute represents the state of the application. +pub const ios_app_state = types.EnumAttribute(ios_app_stateValue){ + .base = types.StringAttribute{ + .name = "ios.app.state", + .brief = "This attribute represents the state of the application.", + .note = "The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = ios_app_stateValue.active, +}; +pub const ios_stateValue = enum { + active, + inactive, + background, + foreground, + terminate, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .active => "active", + .inactive => "inactive", + .background => "background", + .foreground => "foreground", + .terminate => "terminate", + }; + } +}; + +/// +pub const ios_state = types.EnumAttribute(ios_stateValue){ + .base = types.StringAttribute{ + .name = "ios.state", + .brief = "", + .note = "The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = ios_stateValue.active, +}; +/// Name of the buffer pool. +pub const jvm_buffer_pool_name = types.StringAttribute{ + .name = "jvm.buffer.pool.name", + .brief = "Name of the buffer pool.", + .note = "Pool names are generally obtained via [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the garbage collector action. +pub const jvm_gc_action = types.StringAttribute{ + .name = "jvm.gc.action", + .brief = "Name of the garbage collector action.", + .note = "Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Name of the garbage collector cause. +pub const jvm_gc_cause = types.StringAttribute{ + .name = "jvm.gc.cause", + .brief = "Name of the garbage collector cause.", + .note = "Garbage collector cause is generally obtained via [GarbageCollectionNotificationInfo#getGcCause()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcCause()).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the garbage collector. +pub const jvm_gc_name = types.StringAttribute{ + .name = "jvm.gc.name", + .brief = "Name of the garbage collector.", + .note = "Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Name of the memory pool. +pub const jvm_memory_pool_name = types.StringAttribute{ + .name = "jvm.memory.pool.name", + .brief = "Name of the memory pool.", + .note = "Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const jvm_memory_typeValue = enum { + heap, + non_heap, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .heap => "heap", + .non_heap => "non_heap", + }; + } +}; + +/// The type of memory. +pub const jvm_memory_type = types.EnumAttribute(jvm_memory_typeValue){ + .base = types.StringAttribute{ + .name = "jvm.memory.type", + .brief = "The type of memory.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = jvm_memory_typeValue.heap, +}; +/// Whether the thread is daemon or not. +pub const jvm_thread_daemon = types.StringAttribute{ + .name = "jvm.thread.daemon", + .brief = "Whether the thread is daemon or not.", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const jvm_thread_stateValue = enum { + new, + runnable, + blocked, + waiting, + timed_waiting, + terminated, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .new => "new", + .runnable => "runnable", + .blocked => "blocked", + .waiting => "waiting", + .timed_waiting => "timed_waiting", + .terminated => "terminated", + }; + } +}; + +/// State of the thread. +pub const jvm_thread_state = types.EnumAttribute(jvm_thread_stateValue){ + .base = types.StringAttribute{ + .name = "jvm.thread.state", + .brief = "State of the thread.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = jvm_thread_stateValue.new, +}; +/// The name of the cluster. +pub const k8s_cluster_name = types.StringAttribute{ + .name = "k8s.cluster.name", + .brief = "The name of the cluster.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. +pub const k8s_cluster_uid = types.StringAttribute{ + .name = "k8s.cluster.uid", + .brief = "A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). +pub const k8s_container_name = types.StringAttribute{ + .name = "k8s.container.name", + .brief = "The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. +pub const k8s_container_restart_count = types.StringAttribute{ + .name = "k8s.container.restart_count", + .brief = "Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Last terminated reason of the Container. +pub const k8s_container_status_last_terminated_reason = types.StringAttribute{ + .name = "k8s.container.status.last_terminated_reason", + .brief = "Last terminated reason of the Container.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const k8s_container_status_reasonValue = enum { + container_creating, + crash_loop_back_off, + create_container_config_error, + err_image_pull, + image_pull_back_off, + oom_killed, + completed, + @"error", + container_cannot_run, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .container_creating => "ContainerCreating", + .crash_loop_back_off => "CrashLoopBackOff", + .create_container_config_error => "CreateContainerConfigError", + .err_image_pull => "ErrImagePull", + .image_pull_back_off => "ImagePullBackOff", + .oom_killed => "OOMKilled", + .completed => "Completed", + .@"error" => "Error", + .container_cannot_run => "ContainerCannotRun", + }; + } +}; + +/// The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core) or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core) +pub const k8s_container_status_reason = types.EnumAttribute(k8s_container_status_reasonValue){ + .base = types.StringAttribute{ + .name = "k8s.container.status.reason", + .brief = "The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core) or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = k8s_container_status_reasonValue.container_creating, +}; +pub const k8s_container_status_stateValue = enum { + terminated, + running, + waiting, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .terminated => "terminated", + .running => "running", + .waiting => "waiting", + }; + } +}; + +/// The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core) +pub const k8s_container_status_state = types.EnumAttribute(k8s_container_status_stateValue){ + .base = types.StringAttribute{ + .name = "k8s.container.status.state", + .brief = "The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = k8s_container_status_stateValue.terminated, +}; +/// The cronjob annotation placed on the CronJob, the ``key`` being the annotation name, the value being the annotation value. +pub const k8s_cronjob_annotation = types.StringAttribute{ + .name = "k8s.cronjob.annotation", + .brief = "The cronjob annotation placed on the CronJob, the ``key`` being the annotation name, the value being the annotation value.", + .note = "Examples: - An annotation `retries` with value `4` SHOULD be recorded as the `k8s.cronjob.annotation.retries` attribute with value `\"4\"`. - An annotation `data` with empty string value SHOULD be recorded as the `k8s.cronjob.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The label placed on the CronJob, the ``key`` being the label name, the value being the label value. +pub const k8s_cronjob_label = types.StringAttribute{ + .name = "k8s.cronjob.label", + .brief = "The label placed on the CronJob, the ``key`` being the label name, the value being the label value.", + .note = "Examples: - A label `type` with value `weekly` SHOULD be recorded as the `k8s.cronjob.label.type` attribute with value `\"weekly\"`. - A label `automated` with empty string value SHOULD be recorded as the `k8s.cronjob.label.automated` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the CronJob. +pub const k8s_cronjob_name = types.StringAttribute{ + .name = "k8s.cronjob.name", + .brief = "The name of the CronJob.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the CronJob. +pub const k8s_cronjob_uid = types.StringAttribute{ + .name = "k8s.cronjob.uid", + .brief = "The UID of the CronJob.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The annotation placed on the DaemonSet, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty. +pub const k8s_daemonset_annotation = types.StringAttribute{ + .name = "k8s.daemonset.annotation", + .brief = "The annotation placed on the DaemonSet, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty.", + .note = "Examples: - A label `replicas` with value `1` SHOULD be recorded as the `k8s.daemonset.annotation.replicas` attribute with value `\"1\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.daemonset.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The label placed on the DaemonSet, the ``key`` being the label name, the value being the label value, even if the value is empty. +pub const k8s_daemonset_label = types.StringAttribute{ + .name = "k8s.daemonset.label", + .brief = "The label placed on the DaemonSet, the ``key`` being the label name, the value being the label value, even if the value is empty.", + .note = "Examples: - A label `app` with value `guestbook` SHOULD be recorded as the `k8s.daemonset.label.app` attribute with value `\"guestbook\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.daemonset.label.injected` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the DaemonSet. +pub const k8s_daemonset_name = types.StringAttribute{ + .name = "k8s.daemonset.name", + .brief = "The name of the DaemonSet.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the DaemonSet. +pub const k8s_daemonset_uid = types.StringAttribute{ + .name = "k8s.daemonset.uid", + .brief = "The UID of the DaemonSet.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The annotation placed on the Deployment, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty. +pub const k8s_deployment_annotation = types.StringAttribute{ + .name = "k8s.deployment.annotation", + .brief = "The annotation placed on the Deployment, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty.", + .note = "Examples: - A label `replicas` with value `1` SHOULD be recorded as the `k8s.deployment.annotation.replicas` attribute with value `\"1\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.deployment.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The label placed on the Deployment, the ``key`` being the label name, the value being the label value, even if the value is empty. +pub const k8s_deployment_label = types.StringAttribute{ + .name = "k8s.deployment.label", + .brief = "The label placed on the Deployment, the ``key`` being the label name, the value being the label value, even if the value is empty.", + .note = "Examples: - A label `replicas` with value `0` SHOULD be recorded as the `k8s.deployment.label.app` attribute with value `\"guestbook\"`. - A label `injected` with empty string value SHOULD be recorded as the `k8s.deployment.label.injected` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the Deployment. +pub const k8s_deployment_name = types.StringAttribute{ + .name = "k8s.deployment.name", + .brief = "The name of the Deployment.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the Deployment. +pub const k8s_deployment_uid = types.StringAttribute{ + .name = "k8s.deployment.uid", + .brief = "The UID of the Deployment.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The type of metric source for the horizontal pod autoscaler. +pub const k8s_hpa_metric_type = types.StringAttribute{ + .name = "k8s.hpa.metric.type", + .brief = "The type of metric source for the horizontal pod autoscaler.", + .note = "This attribute reflects the `type` field of spec.metrics[] in the HPA.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the horizontal pod autoscaler. +pub const k8s_hpa_name = types.StringAttribute{ + .name = "k8s.hpa.name", + .brief = "The name of the horizontal pod autoscaler.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The API version of the target resource to scale for the HorizontalPodAutoscaler. +pub const k8s_hpa_scaletargetref_api_version = types.StringAttribute{ + .name = "k8s.hpa.scaletargetref.api_version", + .brief = "The API version of the target resource to scale for the HorizontalPodAutoscaler.", + .note = "This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA spec.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The kind of the target resource to scale for the HorizontalPodAutoscaler. +pub const k8s_hpa_scaletargetref_kind = types.StringAttribute{ + .name = "k8s.hpa.scaletargetref.kind", + .brief = "The kind of the target resource to scale for the HorizontalPodAutoscaler.", + .note = "This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the target resource to scale for the HorizontalPodAutoscaler. +pub const k8s_hpa_scaletargetref_name = types.StringAttribute{ + .name = "k8s.hpa.scaletargetref.name", + .brief = "The name of the target resource to scale for the HorizontalPodAutoscaler.", + .note = "This maps to the `name` field in the `scaleTargetRef` of the HPA spec.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the horizontal pod autoscaler. +pub const k8s_hpa_uid = types.StringAttribute{ + .name = "k8s.hpa.uid", + .brief = "The UID of the horizontal pod autoscaler.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The size (identifier) of the K8s huge page. +pub const k8s_hugepage_size = types.StringAttribute{ + .name = "k8s.hugepage.size", + .brief = "The size (identifier) of the K8s huge page.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The annotation placed on the Job, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty. +pub const k8s_job_annotation = types.StringAttribute{ + .name = "k8s.job.annotation", + .brief = "The annotation placed on the Job, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty.", + .note = "Examples: - A label `number` with value `1` SHOULD be recorded as the `k8s.job.annotation.number` attribute with value `\"1\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.job.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The label placed on the Job, the ``key`` being the label name, the value being the label value, even if the value is empty. +pub const k8s_job_label = types.StringAttribute{ + .name = "k8s.job.label", + .brief = "The label placed on the Job, the ``key`` being the label name, the value being the label value, even if the value is empty.", + .note = "Examples: - A label `jobtype` with value `ci` SHOULD be recorded as the `k8s.job.label.jobtype` attribute with value `\"ci\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.job.label.automated` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the Job. +pub const k8s_job_name = types.StringAttribute{ + .name = "k8s.job.name", + .brief = "The name of the Job.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the Job. +pub const k8s_job_uid = types.StringAttribute{ + .name = "k8s.job.uid", + .brief = "The UID of the Job.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The annotation placed on the Namespace, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty. +pub const k8s_namespace_annotation = types.StringAttribute{ + .name = "k8s.namespace.annotation", + .brief = "The annotation placed on the Namespace, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty.", + .note = "Examples: - A label `ttl` with value `0` SHOULD be recorded as the `k8s.namespace.annotation.ttl` attribute with value `\"0\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.namespace.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The label placed on the Namespace, the ``key`` being the label name, the value being the label value, even if the value is empty. +pub const k8s_namespace_label = types.StringAttribute{ + .name = "k8s.namespace.label", + .brief = "The label placed on the Namespace, the ``key`` being the label name, the value being the label value, even if the value is empty.", + .note = "Examples: - A label `kubernetes.io/metadata.name` with value `default` SHOULD be recorded as the `k8s.namespace.label.kubernetes.io/metadata.name` attribute with value `\"default\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.namespace.label.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the namespace that the pod is running in. +pub const k8s_namespace_name = types.StringAttribute{ + .name = "k8s.namespace.name", + .brief = "The name of the namespace that the pod is running in.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const k8s_namespace_phaseValue = enum { + active, + terminating, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .active => "active", + .terminating => "terminating", + }; + } +}; + +/// The phase of the K8s namespace. +pub const k8s_namespace_phase = types.EnumAttribute(k8s_namespace_phaseValue){ + .base = types.StringAttribute{ + .name = "k8s.namespace.phase", + .brief = "The phase of the K8s namespace.", + .note = "This attribute aligns with the `phase` field of the [K8s NamespaceStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = k8s_namespace_phaseValue.active, +}; +/// The annotation placed on the Node, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty. +pub const k8s_node_annotation = types.StringAttribute{ + .name = "k8s.node.annotation", + .brief = "The annotation placed on the Node, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty.", + .note = "Examples: - An annotation `node.alpha.kubernetes.io/ttl` with value `0` SHOULD be recorded as the `k8s.node.annotation.node.alpha.kubernetes.io/ttl` attribute with value `\"0\"`. - An annotation `data` with empty string value SHOULD be recorded as the `k8s.node.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const k8s_node_condition_statusValue = enum { + condition_true, + condition_false, + condition_unknown, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .condition_true => "true", + .condition_false => "false", + .condition_unknown => "unknown", + }; + } +}; + +/// The status of the condition, one of True, False, Unknown. +pub const k8s_node_condition_status = types.EnumAttribute(k8s_node_condition_statusValue){ + .base = types.StringAttribute{ + .name = "k8s.node.condition.status", + .brief = "The status of the condition, one of True, False, Unknown.", + .note = "This attribute aligns with the `status` field of the [NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = k8s_node_condition_statusValue.condition_true, +}; +pub const k8s_node_condition_typeValue = enum { + ready, + disk_pressure, + memory_pressure, + pid_pressure, + network_unavailable, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .ready => "Ready", + .disk_pressure => "DiskPressure", + .memory_pressure => "MemoryPressure", + .pid_pressure => "PIDPressure", + .network_unavailable => "NetworkUnavailable", + }; + } +}; + +/// The condition type of a K8s Node. +pub const k8s_node_condition_type = types.EnumAttribute(k8s_node_condition_typeValue){ + .base = types.StringAttribute{ + .name = "k8s.node.condition.type", + .brief = "The condition type of a K8s Node.", + .note = "K8s Node conditions as described by [K8s documentation](https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition). This attribute aligns with the `type` field of the [NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core) The set of possible values is not limited to those listed here. Managed Kubernetes environments, or custom controllers MAY introduce additional node condition types. When this occurs, the exact value as reported by the Kubernetes API SHOULD be used.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = k8s_node_condition_typeValue.ready, +}; +/// The label placed on the Node, the ``key`` being the label name, the value being the label value, even if the value is empty. +pub const k8s_node_label = types.StringAttribute{ + .name = "k8s.node.label", + .brief = "The label placed on the Node, the ``key`` being the label name, the value being the label value, even if the value is empty.", + .note = "Examples: - A label `kubernetes.io/arch` with value `arm64` SHOULD be recorded as the `k8s.node.label.kubernetes.io/arch` attribute with value `\"arm64\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.node.label.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the Node. +pub const k8s_node_name = types.StringAttribute{ + .name = "k8s.node.name", + .brief = "The name of the Node.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the Node. +pub const k8s_node_uid = types.StringAttribute{ + .name = "k8s.node.uid", + .brief = "The UID of the Node.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The annotation placed on the Pod, the ``key`` being the annotation name, the value being the annotation value. +pub const k8s_pod_annotation = types.StringAttribute{ + .name = "k8s.pod.annotation", + .brief = "The annotation placed on the Pod, the ``key`` being the annotation name, the value being the annotation value.", + .note = "Examples: - An annotation `kubernetes.io/enforce-mountable-secrets` with value `true` SHOULD be recorded as the `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets` attribute with value `\"true\"`. - An annotation `mycompany.io/arch` with value `x64` SHOULD be recorded as the `k8s.pod.annotation.mycompany.io/arch` attribute with value `\"x64\"`. - An annotation `data` with empty string value SHOULD be recorded as the `k8s.pod.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The label placed on the Pod, the ``key`` being the label name, the value being the label value. +pub const k8s_pod_label = types.StringAttribute{ + .name = "k8s.pod.label", + .brief = "The label placed on the Pod, the ``key`` being the label name, the value being the label value.", + .note = "Examples: - A label `app` with value `my-app` SHOULD be recorded as the `k8s.pod.label.app` attribute with value `\"my-app\"`. - A label `mycompany.io/arch` with value `x64` SHOULD be recorded as the `k8s.pod.label.mycompany.io/arch` attribute with value `\"x64\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.pod.label.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `k8s.pod.label` instead. +pub const k8s_pod_labels = types.StringAttribute{ + .name = "k8s.pod.labels", + .brief = "Deprecated, use `k8s.pod.label` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the Pod. +pub const k8s_pod_name = types.StringAttribute{ + .name = "k8s.pod.name", + .brief = "The name of the Pod.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the Pod. +pub const k8s_pod_uid = types.StringAttribute{ + .name = "k8s.pod.uid", + .brief = "The UID of the Pod.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The annotation placed on the ReplicaSet, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty. +pub const k8s_replicaset_annotation = types.StringAttribute{ + .name = "k8s.replicaset.annotation", + .brief = "The annotation placed on the ReplicaSet, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty.", + .note = "Examples: - A label `replicas` with value `0` SHOULD be recorded as the `k8s.replicaset.annotation.replicas` attribute with value `\"0\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.replicaset.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The label placed on the ReplicaSet, the ``key`` being the label name, the value being the label value, even if the value is empty. +pub const k8s_replicaset_label = types.StringAttribute{ + .name = "k8s.replicaset.label", + .brief = "The label placed on the ReplicaSet, the ``key`` being the label name, the value being the label value, even if the value is empty.", + .note = "Examples: - A label `app` with value `guestbook` SHOULD be recorded as the `k8s.replicaset.label.app` attribute with value `\"guestbook\"`. - A label `injected` with empty string value SHOULD be recorded as the `k8s.replicaset.label.injected` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the ReplicaSet. +pub const k8s_replicaset_name = types.StringAttribute{ + .name = "k8s.replicaset.name", + .brief = "The name of the ReplicaSet.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the ReplicaSet. +pub const k8s_replicaset_uid = types.StringAttribute{ + .name = "k8s.replicaset.uid", + .brief = "The UID of the ReplicaSet.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the replication controller. +pub const k8s_replicationcontroller_name = types.StringAttribute{ + .name = "k8s.replicationcontroller.name", + .brief = "The name of the replication controller.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the replication controller. +pub const k8s_replicationcontroller_uid = types.StringAttribute{ + .name = "k8s.replicationcontroller.uid", + .brief = "The UID of the replication controller.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the resource quota. +pub const k8s_resourcequota_name = types.StringAttribute{ + .name = "k8s.resourcequota.name", + .brief = "The name of the resource quota.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the K8s resource a resource quota defines. +pub const k8s_resourcequota_resource_name = types.StringAttribute{ + .name = "k8s.resourcequota.resource_name", + .brief = "The name of the K8s resource a resource quota defines.", + .note = "The value for this attribute can be either the full `count/[resource][.[group]]` string (e.g., count/deployments.apps, count/pods), or, for certain core Kubernetes resources, just the resource name (e.g., pods, services, configmaps). Both forms are supported by Kubernetes for object count quotas. See [Kubernetes Resource Quotas documentation](https://kubernetes.io/docs/concepts/policy/resource-quotas/#object-count-quota) for more details.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the resource quota. +pub const k8s_resourcequota_uid = types.StringAttribute{ + .name = "k8s.resourcequota.uid", + .brief = "The UID of the resource quota.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The annotation placed on the StatefulSet, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty. +pub const k8s_statefulset_annotation = types.StringAttribute{ + .name = "k8s.statefulset.annotation", + .brief = "The annotation placed on the StatefulSet, the ``key`` being the annotation name, the value being the annotation value, even if the value is empty.", + .note = "Examples: - A label `replicas` with value `1` SHOULD be recorded as the `k8s.statefulset.annotation.replicas` attribute with value `\"1\"`. - A label `data` with empty string value SHOULD be recorded as the `k8s.statefulset.annotation.data` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The label placed on the StatefulSet, the ``key`` being the label name, the value being the label value, even if the value is empty. +pub const k8s_statefulset_label = types.StringAttribute{ + .name = "k8s.statefulset.label", + .brief = "The label placed on the StatefulSet, the ``key`` being the label name, the value being the label value, even if the value is empty.", + .note = "Examples: - A label `replicas` with value `0` SHOULD be recorded as the `k8s.statefulset.label.app` attribute with value `\"guestbook\"`. - A label `injected` with empty string value SHOULD be recorded as the `k8s.statefulset.label.injected` attribute with value `\"\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the StatefulSet. +pub const k8s_statefulset_name = types.StringAttribute{ + .name = "k8s.statefulset.name", + .brief = "The name of the StatefulSet.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UID of the StatefulSet. +pub const k8s_statefulset_uid = types.StringAttribute{ + .name = "k8s.statefulset.uid", + .brief = "The UID of the StatefulSet.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object. +pub const k8s_storageclass_name = types.StringAttribute{ + .name = "k8s.storageclass.name", + .brief = "The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the K8s volume. +pub const k8s_volume_name = types.StringAttribute{ + .name = "k8s.volume.name", + .brief = "The name of the K8s volume.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const k8s_volume_typeValue = enum { + persistent_volume_claim, + config_map, + downward_api, + empty_dir, + secret, + local, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .persistent_volume_claim => "persistentVolumeClaim", + .config_map => "configMap", + .downward_api => "downwardAPI", + .empty_dir => "emptyDir", + .secret => "secret", + .local => "local", + }; + } +}; + +/// The type of the K8s volume. +pub const k8s_volume_type = types.EnumAttribute(k8s_volume_typeValue){ + .base = types.StringAttribute{ + .name = "k8s.volume.type", + .brief = "The type of the K8s volume.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = k8s_volume_typeValue.persistent_volume_claim, +}; +pub const linux_memory_slab_stateValue = enum { + reclaimable, + unreclaimable, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .reclaimable => "reclaimable", + .unreclaimable => "unreclaimable", + }; + } +}; + +/// The Linux Slab memory state +pub const linux_memory_slab_state = types.EnumAttribute(linux_memory_slab_stateValue){ + .base = types.StringAttribute{ + .name = "linux.memory.slab.state", + .brief = "The Linux Slab memory state", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = linux_memory_slab_stateValue.reclaimable, +}; +/// The basename of the file. +pub const log_file_name = types.StringAttribute{ + .name = "log.file.name", + .brief = "The basename of the file.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The basename of the file, with symlinks resolved. +pub const log_file_name_resolved = types.StringAttribute{ + .name = "log.file.name_resolved", + .brief = "The basename of the file, with symlinks resolved.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The full path to the file. +pub const log_file_path = types.StringAttribute{ + .name = "log.file.path", + .brief = "The full path to the file.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The full path to the file, with symlinks resolved. +pub const log_file_path_resolved = types.StringAttribute{ + .name = "log.file.path_resolved", + .brief = "The full path to the file, with symlinks resolved.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const log_iostreamValue = enum { + stdout, + stderr, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .stdout => "stdout", + .stderr => "stderr", + }; + } +}; + +/// The stream associated with the log. See below for a list of well-known values. +pub const log_iostream = types.EnumAttribute(log_iostreamValue){ + .base = types.StringAttribute{ + .name = "log.iostream", + .brief = "The stream associated with the log. See below for a list of well-known values.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = log_iostreamValue.stdout, +}; +/// The complete original Log Record. +pub const log_record_original = types.StringAttribute{ + .name = "log.record.original", + .brief = "The complete original Log Record.", + .note = "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.)", + .stability = .development, + .requirement_level = .recommended, +}; +/// A unique identifier for the Log Record. +pub const log_record_uid = types.StringAttribute{ + .name = "log.record.uid", + .brief = "A unique identifier for the Log Record.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the logical partition that hosts a systems with a mainframe operating system. +pub const mainframe_lpar_name = types.StringAttribute{ + .name = "mainframe.lpar.name", + .brief = "Name of the logical partition that hosts a systems with a mainframe operating system.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `rpc.message.compressed_size` instead. +pub const message_compressed_size = types.StringAttribute{ + .name = "message.compressed_size", + .brief = "Deprecated, use `rpc.message.compressed_size` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `rpc.message.id` instead. +pub const message_id = types.StringAttribute{ + .name = "message.id", + .brief = "Deprecated, use `rpc.message.id` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const message_typeValue = enum { + sent, + received, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .sent => "SENT", + .received => "RECEIVED", + }; + } +}; + +/// Deprecated, use `rpc.message.type` instead. +pub const message_type = types.EnumAttribute(message_typeValue){ + .base = types.StringAttribute{ + .name = "message.type", + .brief = "Deprecated, use `rpc.message.type` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = message_typeValue.sent, +}; +/// Deprecated, use `rpc.message.uncompressed_size` instead. +pub const message_uncompressed_size = types.StringAttribute{ + .name = "message.uncompressed_size", + .brief = "Deprecated, use `rpc.message.uncompressed_size` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The number of messages sent, received, or processed in the scope of the batching operation. +pub const messaging_batch_message_count = types.StringAttribute{ + .name = "messaging.batch.message_count", + .brief = "The number of messages sent, received, or processed in the scope of the batching operation.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A unique identifier for the client that consumes or produces a message. +pub const messaging_client_id = types.StringAttribute{ + .name = "messaging.client.id", + .brief = "A unique identifier for the client that consumes or produces a message.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the consumer group with which a consumer is associated. +pub const messaging_consumer_group_name = types.StringAttribute{ + .name = "messaging.consumer.group.name", + .brief = "The name of the consumer group with which a consumer is associated.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). +pub const messaging_destination_anonymous = types.StringAttribute{ + .name = "messaging.destination.anonymous", + .brief = "A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The message destination name +pub const messaging_destination_name = types.StringAttribute{ + .name = "messaging.destination.name", + .brief = "The message destination name", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. +pub const messaging_destination_partition_id = types.StringAttribute{ + .name = "messaging.destination.partition.id", + .brief = "The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the destination subscription from which a message is consumed. +pub const messaging_destination_subscription_name = types.StringAttribute{ + .name = "messaging.destination.subscription.name", + .brief = "The name of the destination subscription from which a message is consumed.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Low cardinality representation of the messaging destination name +pub const messaging_destination_template = types.StringAttribute{ + .name = "messaging.destination.template", + .brief = "Low cardinality representation of the messaging destination name", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. +pub const messaging_destination_temporary = types.StringAttribute{ + .name = "messaging.destination.temporary", + .brief = "A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, no replacement at this time. +pub const messaging_destination_publish_anonymous = types.StringAttribute{ + .name = "messaging.destination_publish.anonymous", + .brief = "Deprecated, no replacement at this time.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, no replacement at this time. +pub const messaging_destination_publish_name = types.StringAttribute{ + .name = "messaging.destination_publish.name", + .brief = "Deprecated, no replacement at this time.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `messaging.consumer.group.name` instead. +pub const messaging_eventhubs_consumer_group = types.StringAttribute{ + .name = "messaging.eventhubs.consumer.group", + .brief = "Deprecated, use `messaging.consumer.group.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UTC epoch seconds at which the message has been accepted and stored in the entity. +pub const messaging_eventhubs_message_enqueued_time = types.StringAttribute{ + .name = "messaging.eventhubs.message.enqueued_time", + .brief = "The UTC epoch seconds at which the message has been accepted and stored in the entity.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ack deadline in seconds set for the modify ack deadline request. +pub const messaging_gcp_pubsub_message_ack_deadline = types.StringAttribute{ + .name = "messaging.gcp_pubsub.message.ack_deadline", + .brief = "The ack deadline in seconds set for the modify ack deadline request.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ack id for a given message. +pub const messaging_gcp_pubsub_message_ack_id = types.StringAttribute{ + .name = "messaging.gcp_pubsub.message.ack_id", + .brief = "The ack id for a given message.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The delivery attempt for a given message. +pub const messaging_gcp_pubsub_message_delivery_attempt = types.StringAttribute{ + .name = "messaging.gcp_pubsub.message.delivery_attempt", + .brief = "The delivery attempt for a given message.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. +pub const messaging_gcp_pubsub_message_ordering_key = types.StringAttribute{ + .name = "messaging.gcp_pubsub.message.ordering_key", + .brief = "The ordering key for a given message. If the attribute is not present, the message does not have an ordering key.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `messaging.consumer.group.name` instead. +pub const messaging_kafka_consumer_group = types.StringAttribute{ + .name = "messaging.kafka.consumer.group", + .brief = "Deprecated, use `messaging.consumer.group.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `messaging.destination.partition.id` instead. +pub const messaging_kafka_destination_partition = types.StringAttribute{ + .name = "messaging.kafka.destination.partition", + .brief = "Deprecated, use `messaging.destination.partition.id` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const messaging_kafka_message_key = types.StringAttribute{ + .name = "messaging.kafka.message.key", + .brief = "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.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `messaging.kafka.offset` instead. +pub const messaging_kafka_message_offset = types.StringAttribute{ + .name = "messaging.kafka.message.offset", + .brief = "Deprecated, use `messaging.kafka.offset` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A boolean that is true if the message is a tombstone. +pub const messaging_kafka_message_tombstone = types.StringAttribute{ + .name = "messaging.kafka.message.tombstone", + .brief = "A boolean that is true if the message is a tombstone.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The offset of a record in the corresponding Kafka partition. +pub const messaging_kafka_offset = types.StringAttribute{ + .name = "messaging.kafka.offset", + .brief = "The offset of a record in the corresponding Kafka partition.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The size of the message body in bytes. +pub const messaging_message_body_size = types.StringAttribute{ + .name = "messaging.message.body.size", + .brief = "The size of the message body in bytes.", + .note = "This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed body size should be used.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". +pub const messaging_message_conversation_id = types.StringAttribute{ + .name = "messaging.message.conversation_id", + .brief = "The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called \"Correlation ID\".", + .stability = .development, + .requirement_level = .recommended, +}; +/// The size of the message body and metadata in bytes. +pub const messaging_message_envelope_size = types.StringAttribute{ + .name = "messaging.message.envelope.size", + .brief = "The size of the message body and metadata in bytes.", + .note = "This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed size should be used.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A value used by the messaging system as an identifier for the message, represented as a string. +pub const messaging_message_id = types.StringAttribute{ + .name = "messaging.message.id", + .brief = "A value used by the messaging system as an identifier for the message, represented as a string.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `messaging.operation.type` instead. +pub const messaging_operation = types.StringAttribute{ + .name = "messaging.operation", + .brief = "Deprecated, use `messaging.operation.type` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The system-specific name of the messaging operation. +pub const messaging_operation_name = types.StringAttribute{ + .name = "messaging.operation.name", + .brief = "The system-specific name of the messaging operation.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const messaging_operation_typeValue = enum { + create, + send, + receive, + process, + settle, + deliver, + publish, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .create => "create", + .send => "send", + .receive => "receive", + .process => "process", + .settle => "settle", + .deliver => "deliver", + .publish => "publish", + }; + } +}; + +/// A string identifying the type of the messaging operation. +pub const messaging_operation_type = types.EnumAttribute(messaging_operation_typeValue){ + .base = types.StringAttribute{ + .name = "messaging.operation.type", + .brief = "A string identifying the type of the messaging operation.", + .note = "If a custom value is used, it MUST be of low cardinality.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = messaging_operation_typeValue.create, +}; +/// RabbitMQ message routing key. +pub const messaging_rabbitmq_destination_routing_key = types.StringAttribute{ + .name = "messaging.rabbitmq.destination.routing_key", + .brief = "RabbitMQ message routing key.", + .stability = .development, + .requirement_level = .recommended, +}; +/// RabbitMQ message delivery tag +pub const messaging_rabbitmq_message_delivery_tag = types.StringAttribute{ + .name = "messaging.rabbitmq.message.delivery_tag", + .brief = "RabbitMQ message delivery tag", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `messaging.consumer.group.name` instead. +pub const messaging_rocketmq_client_group = types.StringAttribute{ + .name = "messaging.rocketmq.client_group", + .brief = "Deprecated, use `messaging.consumer.group.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const messaging_rocketmq_consumption_modelValue = enum { + clustering, + broadcasting, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .clustering => "clustering", + .broadcasting => "broadcasting", + }; + } +}; + +/// Model of message consumption. This only applies to consumer spans. +pub const messaging_rocketmq_consumption_model = types.EnumAttribute(messaging_rocketmq_consumption_modelValue){ + .base = types.StringAttribute{ + .name = "messaging.rocketmq.consumption_model", + .brief = "Model of message consumption. This only applies to consumer spans.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = messaging_rocketmq_consumption_modelValue.clustering, +}; +/// The delay time level for delay message, which determines the message delay time. +pub const messaging_rocketmq_message_delay_time_level = types.StringAttribute{ + .name = "messaging.rocketmq.message.delay_time_level", + .brief = "The delay time level for delay message, which determines the message delay time.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The timestamp in milliseconds that the delay message is expected to be delivered to consumer. +pub const messaging_rocketmq_message_delivery_timestamp = types.StringAttribute{ + .name = "messaging.rocketmq.message.delivery_timestamp", + .brief = "The timestamp in milliseconds that the delay message is expected to be delivered to consumer.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const messaging_rocketmq_message_group = types.StringAttribute{ + .name = "messaging.rocketmq.message.group", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Key(s) of message, another way to mark message besides message id. +pub const messaging_rocketmq_message_keys = types.StringAttribute{ + .name = "messaging.rocketmq.message.keys", + .brief = "Key(s) of message, another way to mark message besides message id.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The secondary classifier of message besides topic. +pub const messaging_rocketmq_message_tag = types.StringAttribute{ + .name = "messaging.rocketmq.message.tag", + .brief = "The secondary classifier of message besides topic.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const messaging_rocketmq_message_typeValue = enum { + normal, + fifo, + delay, + transaction, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .normal => "normal", + .fifo => "fifo", + .delay => "delay", + .transaction => "transaction", + }; + } +}; + +/// Type of message. +pub const messaging_rocketmq_message_type = types.EnumAttribute(messaging_rocketmq_message_typeValue){ + .base = types.StringAttribute{ + .name = "messaging.rocketmq.message.type", + .brief = "Type of message.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = messaging_rocketmq_message_typeValue.normal, +}; +/// Namespace of RocketMQ resources, resources in different namespaces are individual. +pub const messaging_rocketmq_namespace = types.StringAttribute{ + .name = "messaging.rocketmq.namespace", + .brief = "Namespace of RocketMQ resources, resources in different namespaces are individual.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `messaging.destination.subscription.name` instead. +pub const messaging_servicebus_destination_subscription_name = types.StringAttribute{ + .name = "messaging.servicebus.destination.subscription_name", + .brief = "Deprecated, use `messaging.destination.subscription.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const messaging_servicebus_disposition_statusValue = enum { + complete, + abandon, + dead_letter, + @"defer", + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .complete => "complete", + .abandon => "abandon", + .dead_letter => "dead_letter", + .@"defer" => "defer", + }; + } +}; + +/// Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). +pub const messaging_servicebus_disposition_status = types.EnumAttribute(messaging_servicebus_disposition_statusValue){ + .base = types.StringAttribute{ + .name = "messaging.servicebus.disposition_status", + .brief = "Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock).", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = messaging_servicebus_disposition_statusValue.complete, +}; +/// Number of deliveries that have been attempted for this message. +pub const messaging_servicebus_message_delivery_count = types.StringAttribute{ + .name = "messaging.servicebus.message.delivery_count", + .brief = "Number of deliveries that have been attempted for this message.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The UTC epoch seconds at which the message has been accepted and stored in the entity. +pub const messaging_servicebus_message_enqueued_time = types.StringAttribute{ + .name = "messaging.servicebus.message.enqueued_time", + .brief = "The UTC epoch seconds at which the message has been accepted and stored in the entity.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const messaging_systemValue = enum { + activemq, + aws_sqs, + eventgrid, + eventhubs, + servicebus, + gcp_pubsub, + jms, + kafka, + rabbitmq, + rocketmq, + pulsar, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + }; + } +}; + +/// The messaging system as identified by the client instrumentation. +pub const messaging_system = types.EnumAttribute(messaging_systemValue){ + .base = types.StringAttribute{ + .name = "messaging.system", + .brief = "The messaging system as identified by the client instrumentation.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = messaging_systemValue.activemq, +}; +/// Deprecated, use `network.local.address`. +pub const net_host_ip = types.StringAttribute{ + .name = "net.host.ip", + .brief = "Deprecated, use `network.local.address`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `server.address`. +pub const net_host_name = types.StringAttribute{ + .name = "net.host.name", + .brief = "Deprecated, use `server.address`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `server.port`. +pub const net_host_port = types.StringAttribute{ + .name = "net.host.port", + .brief = "Deprecated, use `server.port`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `network.peer.address`. +pub const net_peer_ip = types.StringAttribute{ + .name = "net.peer.ip", + .brief = "Deprecated, use `network.peer.address`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `server.address` on client spans and `client.address` on server spans. +pub const net_peer_name = types.StringAttribute{ + .name = "net.peer.name", + .brief = "Deprecated, use `server.address` on client spans and `client.address` on server spans.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `server.port` on client spans and `client.port` on server spans. +pub const net_peer_port = types.StringAttribute{ + .name = "net.peer.port", + .brief = "Deprecated, use `server.port` on client spans and `client.port` on server spans.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `network.protocol.name`. +pub const net_protocol_name = types.StringAttribute{ + .name = "net.protocol.name", + .brief = "Deprecated, use `network.protocol.name`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `network.protocol.version`. +pub const net_protocol_version = types.StringAttribute{ + .name = "net.protocol.version", + .brief = "Deprecated, use `network.protocol.version`.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const net_sock_familyValue = enum { + inet, + inet6, + unix, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .inet => "inet", + .inet6 => "inet6", + .unix => "unix", + }; + } +}; + +/// Deprecated, use `network.transport` and `network.type`. +pub const net_sock_family = types.EnumAttribute(net_sock_familyValue){ + .base = types.StringAttribute{ + .name = "net.sock.family", + .brief = "Deprecated, use `network.transport` and `network.type`.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = net_sock_familyValue.inet, +}; +/// Deprecated, use `network.local.address`. +pub const net_sock_host_addr = types.StringAttribute{ + .name = "net.sock.host.addr", + .brief = "Deprecated, use `network.local.address`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `network.local.port`. +pub const net_sock_host_port = types.StringAttribute{ + .name = "net.sock.host.port", + .brief = "Deprecated, use `network.local.port`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `network.peer.address`. +pub const net_sock_peer_addr = types.StringAttribute{ + .name = "net.sock.peer.addr", + .brief = "Deprecated, use `network.peer.address`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, no replacement at this time. +pub const net_sock_peer_name = types.StringAttribute{ + .name = "net.sock.peer.name", + .brief = "Deprecated, no replacement at this time.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `network.peer.port`. +pub const net_sock_peer_port = types.StringAttribute{ + .name = "net.sock.peer.port", + .brief = "Deprecated, use `network.peer.port`.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const net_transportValue = enum { + ip_tcp, + ip_udp, + pipe, + inproc, + other, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .ip_tcp => "ip_tcp", + .ip_udp => "ip_udp", + .pipe => "pipe", + .inproc => "inproc", + .other => "other", + }; + } +}; + +/// Deprecated, use `network.transport`. +pub const net_transport = types.EnumAttribute(net_transportValue){ + .base = types.StringAttribute{ + .name = "net.transport", + .brief = "Deprecated, use `network.transport`.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = net_transportValue.ip_tcp, +}; +/// The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. +pub const network_carrier_icc = types.StringAttribute{ + .name = "network.carrier.icc", + .brief = "The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The mobile carrier country code. +pub const network_carrier_mcc = types.StringAttribute{ + .name = "network.carrier.mcc", + .brief = "The mobile carrier country code.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The mobile carrier network code. +pub const network_carrier_mnc = types.StringAttribute{ + .name = "network.carrier.mnc", + .brief = "The mobile carrier network code.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the mobile carrier. +pub const network_carrier_name = types.StringAttribute{ + .name = "network.carrier.name", + .brief = "The name of the mobile carrier.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const network_connection_stateValue = enum { + closed, + close_wait, + closing, + established, + fin_wait_1, + fin_wait_2, + last_ack, + listen, + syn_received, + syn_sent, + time_wait, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .closed => "closed", + .close_wait => "close_wait", + .closing => "closing", + .established => "established", + .fin_wait_1 => "fin_wait_1", + .fin_wait_2 => "fin_wait_2", + .last_ack => "last_ack", + .listen => "listen", + .syn_received => "syn_received", + .syn_sent => "syn_sent", + .time_wait => "time_wait", + }; + } +}; + +/// The state of network connection +pub const network_connection_state = types.EnumAttribute(network_connection_stateValue){ + .base = types.StringAttribute{ + .name = "network.connection.state", + .brief = "The state of network connection", + .note = "Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = network_connection_stateValue.closed, +}; +pub const network_connection_subtypeValue = enum { + gprs, + edge, + umts, + cdma, + evdo_0, + evdo_a, + cdma2000_1xrtt, + hsdpa, + hsupa, + hspa, + iden, + evdo_b, + lte, + ehrpd, + hspap, + gsm, + td_scdma, + iwlan, + nr, + nrnsa, + lte_ca, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + }; + } +}; + +/// 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. +pub const network_connection_subtype = types.EnumAttribute(network_connection_subtypeValue){ + .base = types.StringAttribute{ + .name = "network.connection.subtype", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = network_connection_subtypeValue.gprs, +}; +pub const network_connection_typeValue = enum { + wifi, + wired, + cell, + unavailable, + unknown, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .wifi => "wifi", + .wired => "wired", + .cell => "cell", + .unavailable => "unavailable", + .unknown => "unknown", + }; + } +}; + +/// The internet connection type. +pub const network_connection_type = types.EnumAttribute(network_connection_typeValue){ + .base = types.StringAttribute{ + .name = "network.connection.type", + .brief = "The internet connection type.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = network_connection_typeValue.wifi, +}; +/// The network interface name. +pub const network_interface_name = types.StringAttribute{ + .name = "network.interface.name", + .brief = "The network interface name.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const network_io_directionValue = enum { + transmit, + receive, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .transmit => "transmit", + .receive => "receive", + }; + } +}; + +/// The network IO operation direction. +pub const network_io_direction = types.EnumAttribute(network_io_directionValue){ + .base = types.StringAttribute{ + .name = "network.io.direction", + .brief = "The network IO operation direction.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = network_io_directionValue.transmit, +}; +/// Local address of the network connection - IP address or Unix domain socket name. +pub const network_local_address = types.StringAttribute{ + .name = "network.local.address", + .brief = "Local address of the network connection - IP address or Unix domain socket name.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Local port number of the network connection. +pub const network_local_port = types.StringAttribute{ + .name = "network.local.port", + .brief = "Local port number of the network connection.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Peer address of the network connection - IP address or Unix domain socket name. +pub const network_peer_address = types.StringAttribute{ + .name = "network.peer.address", + .brief = "Peer address of the network connection - IP address or Unix domain socket name.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Peer port number of the network connection. +pub const network_peer_port = types.StringAttribute{ + .name = "network.peer.port", + .brief = "Peer port number of the network connection.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. +pub const network_protocol_name = types.StringAttribute{ + .name = "network.protocol.name", + .brief = "[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.", + .note = "The value SHOULD be normalized to lowercase.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The actual version of the protocol used for network communication. +pub const network_protocol_version = types.StringAttribute{ + .name = "network.protocol.version", + .brief = "The actual version of the protocol used for network communication.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const network_transportValue = enum { + tcp, + udp, + pipe, + unix, + quic, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .tcp => "tcp", + .udp => "udp", + .pipe => "pipe", + .unix => "unix", + .quic => "quic", + }; + } +}; + +/// [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). +pub const network_transport = types.EnumAttribute(network_transportValue){ + .base = types.StringAttribute{ + .name = "network.transport", + .brief = "[OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = network_transportValue.tcp, +}; +pub const network_typeValue = enum { + ipv4, + ipv6, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .ipv4 => "ipv4", + .ipv6 => "ipv6", + }; + } +}; + +/// [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. +pub const network_type = types.EnumAttribute(network_typeValue){ + .base = types.StringAttribute{ + .name = "network.type", + .brief = "[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent.", + .note = "The value SHOULD be normalized to lowercase.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = network_typeValue.ipv4, +}; +pub const nodejs_eventloop_stateValue = enum { + active, + idle, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .active => "active", + .idle => "idle", + }; + } +}; + +/// The state of event loop time. +pub const nodejs_eventloop_state = types.EnumAttribute(nodejs_eventloop_stateValue){ + .base = types.StringAttribute{ + .name = "nodejs.eventloop.state", + .brief = "The state of event loop time.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = nodejs_eventloop_stateValue.active, +}; +/// The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. +pub const oci_manifest_digest = types.StringAttribute{ + .name = "oci.manifest.digest", + .brief = "The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known.", + .note = "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://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest).", + .stability = .development, + .requirement_level = .recommended, +}; +pub const opentracing_ref_typeValue = enum { + child_of, + follows_from, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .child_of => "child_of", + .follows_from => "follows_from", + }; + } +}; + +/// Parent-child Reference type +pub const opentracing_ref_type = types.EnumAttribute(opentracing_ref_typeValue){ + .base = types.StringAttribute{ + .name = "opentracing.ref_type", + .brief = "Parent-child Reference type", + .note = "The causal relationship between a child Span and a parent Span.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = opentracing_ref_typeValue.child_of, +}; +/// Unique identifier for a particular build or compilation of the operating system. +pub const os_build_id = types.StringAttribute{ + .name = "os.build_id", + .brief = "Unique identifier for a particular build or compilation of the operating system.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. +pub const os_description = types.StringAttribute{ + .name = "os.description", + .brief = "Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Human readable operating system name. +pub const os_name = types.StringAttribute{ + .name = "os.name", + .brief = "Human readable operating system name.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const os_typeValue = enum { + windows, + linux, + darwin, + freebsd, + netbsd, + openbsd, + dragonflybsd, + hpux, + aix, + solaris, + z_os, + zos, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .windows => "windows", + .linux => "linux", + .darwin => "darwin", + .freebsd => "freebsd", + .netbsd => "netbsd", + .openbsd => "openbsd", + .dragonflybsd => "dragonflybsd", + .hpux => "hpux", + .aix => "aix", + .solaris => "solaris", + .z_os => "z_os", + .zos => "zos", + }; + } +}; + +/// The operating system type. +pub const os_type = types.EnumAttribute(os_typeValue){ + .base = types.StringAttribute{ + .name = "os.type", + .brief = "The operating system type.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = os_typeValue.windows, +}; +/// The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +pub const os_version = types.StringAttribute{ + .name = "os.version", + .brief = "The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes).", + .stability = .development, + .requirement_level = .recommended, +}; +/// A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. +pub const otel_component_name = types.StringAttribute{ + .name = "otel.component.name", + .brief = "A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.", + .note = "Implementations SHOULD ensure a low cardinality for this attribute, even across application or SDK restarts. E.g. implementations MUST NOT use UUIDs as values for this attribute. Implementations MAY achieve these goals by following a `[otel.component.type]/[instance-counter]` pattern, e.g. `batching_span_processor/0`. Hereby `otel.component.type` refers to the corresponding attribute value of the component. The value of `instance-counter` MAY be automatically assigned by the component and uniqueness within the enclosing SDK instance MUST be guaranteed. For example, `[instance-counter]` MAY be implemented by using a monotonically increasing counter (starting with `0`), which is incremented every time an instance of the given component type is started. With this implementation, for example the first Batching Span Processor would have `batching_span_processor/0` as `otel.component.name`, the second one `batching_span_processor/1` and so on. These values will therefore be reused in the case of an application restart.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const otel_component_typeValue = enum { + batching_span_processor, + simple_span_processor, + batching_log_processor, + simple_log_processor, + otlp_grpc_span_exporter, + otlp_http_span_exporter, + otlp_http_json_span_exporter, + zipkin_http_span_exporter, + otlp_grpc_log_exporter, + otlp_http_log_exporter, + otlp_http_json_log_exporter, + periodic_metric_reader, + otlp_grpc_metric_exporter, + otlp_http_metric_exporter, + otlp_http_json_metric_exporter, + prometheus_http_text_metric_exporter, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .batching_span_processor => "batching_span_processor", + .simple_span_processor => "simple_span_processor", + .batching_log_processor => "batching_log_processor", + .simple_log_processor => "simple_log_processor", + .otlp_grpc_span_exporter => "otlp_grpc_span_exporter", + .otlp_http_span_exporter => "otlp_http_span_exporter", + .otlp_http_json_span_exporter => "otlp_http_json_span_exporter", + .zipkin_http_span_exporter => "zipkin_http_span_exporter", + .otlp_grpc_log_exporter => "otlp_grpc_log_exporter", + .otlp_http_log_exporter => "otlp_http_log_exporter", + .otlp_http_json_log_exporter => "otlp_http_json_log_exporter", + .periodic_metric_reader => "periodic_metric_reader", + .otlp_grpc_metric_exporter => "otlp_grpc_metric_exporter", + .otlp_http_metric_exporter => "otlp_http_metric_exporter", + .otlp_http_json_metric_exporter => "otlp_http_json_metric_exporter", + .prometheus_http_text_metric_exporter => "prometheus_http_text_metric_exporter", + }; + } +}; + +/// A name identifying the type of the OpenTelemetry component. +pub const otel_component_type = types.EnumAttribute(otel_component_typeValue){ + .base = types.StringAttribute{ + .name = "otel.component.type", + .brief = "A name identifying the type of the OpenTelemetry component.", + .note = "If none of the standardized values apply, implementations SHOULD use the language-defined name of the type. E.g. for Java the fully qualified classname SHOULD be used in this case.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = otel_component_typeValue.batching_span_processor, +}; +/// Deprecated. Use the `otel.scope.name` attribute +pub const otel_library_name = types.StringAttribute{ + .name = "otel.library.name", + .brief = "Deprecated. Use the `otel.scope.name` attribute", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated. Use the `otel.scope.version` attribute. +pub const otel_library_version = types.StringAttribute{ + .name = "otel.library.version", + .brief = "Deprecated. Use the `otel.scope.version` attribute.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). +pub const otel_scope_name = types.StringAttribute{ + .name = "otel.scope.name", + .brief = "The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). +pub const otel_scope_version = types.StringAttribute{ + .name = "otel.scope.version", + .brief = "The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const otel_span_parent_originValue = enum { + none, + local, + remote, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .none => "none", + .local => "local", + .remote => "remote", + }; + } +}; + +/// Determines whether the span has a parent span, and if so, [whether it is a remote parent](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote) +pub const otel_span_parent_origin = types.EnumAttribute(otel_span_parent_originValue){ + .base = types.StringAttribute{ + .name = "otel.span.parent.origin", + .brief = "Determines whether the span has a parent span, and if so, [whether it is a remote parent](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = otel_span_parent_originValue.none, +}; +pub const otel_span_sampling_resultValue = enum { + drop, + record_only, + record_and_sample, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .drop => "DROP", + .record_only => "RECORD_ONLY", + .record_and_sample => "RECORD_AND_SAMPLE", + }; + } +}; + +/// The result value of the sampler for this span +pub const otel_span_sampling_result = types.EnumAttribute(otel_span_sampling_resultValue){ + .base = types.StringAttribute{ + .name = "otel.span.sampling_result", + .brief = "The result value of the sampler for this span", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = otel_span_sampling_resultValue.drop, +}; +pub const otel_status_codeValue = enum { + ok, + @"error", + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .ok => "OK", + .@"error" => "ERROR", + }; + } +}; + +/// Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. +pub const otel_status_code = types.EnumAttribute(otel_status_codeValue){ + .base = types.StringAttribute{ + .name = "otel.status_code", + .brief = "Name of the code, either \"OK\" or \"ERROR\". MUST NOT be set if the status code is UNSET.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = otel_status_codeValue.ok, +}; +/// Description of the Status if it has a value, otherwise not set. +pub const otel_status_description = types.StringAttribute{ + .name = "otel.status_description", + .brief = "Description of the Status if it has a value, otherwise not set.", + .stability = .stable, + .requirement_level = .recommended, +}; +pub const stateValue = enum { + idle, + used, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .idle => "idle", + .used => "used", + }; + } +}; + +/// Deprecated, use `db.client.connection.state` instead. +pub const state = types.EnumAttribute(stateValue){ + .base = types.StringAttribute{ + .name = "state", + .brief = "Deprecated, use `db.client.connection.state` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = stateValue.idle, +}; +/// 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. +pub const peer_service = types.StringAttribute{ + .name = "peer.service", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `db.client.connection.pool.name` instead. +pub const pool_name = types.StringAttribute{ + .name = "pool.name", + .brief = "Deprecated, use `db.client.connection.pool.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Length of the process.command_args array +pub const process_args_count = types.StringAttribute{ + .name = "process.args_count", + .brief = "Length of the process.command_args array", + .note = "This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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`. +pub const process_command = types.StringAttribute{ + .name = "process.command", + .brief = "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`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. +pub const process_command_args = types.StringAttribute{ + .name = "process.command_args", + .brief = "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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. +pub const process_command_line = types.StringAttribute{ + .name = "process.command_line", + .brief = "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. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const process_context_switch_typeValue = enum { + voluntary, + involuntary, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .voluntary => "voluntary", + .involuntary => "involuntary", + }; + } +}; + +/// Specifies whether the context switches for this data point were voluntary or involuntary. +pub const process_context_switch_type = types.EnumAttribute(process_context_switch_typeValue){ + .base = types.StringAttribute{ + .name = "process.context_switch_type", + .brief = "Specifies whether the context switches for this data point were voluntary or involuntary.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = process_context_switch_typeValue.voluntary, +}; +pub const process_cpu_stateValue = enum { + system, + user, + wait, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .system => "system", + .user => "user", + .wait => "wait", + }; + } +}; + +/// Deprecated, use `cpu.mode` instead. +pub const process_cpu_state = types.EnumAttribute(process_cpu_stateValue){ + .base = types.StringAttribute{ + .name = "process.cpu.state", + .brief = "Deprecated, use `cpu.mode` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = process_cpu_stateValue.system, +}; +/// The date and time the process was created, in ISO 8601 format. +pub const process_creation_time = types.StringAttribute{ + .name = "process.creation.time", + .brief = "The date and time the process was created, in ISO 8601 format.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Process environment variables, ``key`` being the environment variable name, the value being the environment variable value. +pub const process_environment_variable = types.StringAttribute{ + .name = "process.environment_variable", + .brief = "Process environment variables, ``key`` being the environment variable name, the value being the environment variable value.", + .note = "Examples: - an environment variable `USER` with value `\"ubuntu\"` SHOULD be recorded as the `process.environment_variable.USER` attribute with value `\"ubuntu\"`. - an environment variable `PATH` with value `\"/usr/local/bin:/usr/bin\"` SHOULD be recorded as the `process.environment_variable.PATH` attribute with value `\"/usr/local/bin:/usr/bin\"`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). +pub const process_executable_build_id_gnu = types.StringAttribute{ + .name = "process.executable.build_id.gnu", + .brief = "The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The Go build ID as retrieved by `go tool buildid `. +pub const process_executable_build_id_go = types.StringAttribute{ + .name = "process.executable.build_id.go", + .brief = "The Go build ID as retrieved by `go tool buildid `.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Profiling specific build ID for executables. See the OTel specification for Profiles for more information. +pub const process_executable_build_id_htlhash = types.StringAttribute{ + .name = "process.executable.build_id.htlhash", + .brief = "Profiling specific build ID for executables. See the OTel specification for Profiles for more information.", + .stability = .development, + .requirement_level = .recommended, +}; +/// "Deprecated, use `process.executable.build_id.htlhash` instead." +pub const process_executable_build_id_profiling = types.StringAttribute{ + .name = "process.executable.build_id.profiling", + .brief = "\"Deprecated, use `process.executable.build_id.htlhash` instead.\"", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. +pub const process_executable_name = types.StringAttribute{ + .name = "process.executable.name", + .brief = "The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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`. +pub const process_executable_path = types.StringAttribute{ + .name = "process.executable.path", + .brief = "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`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The exit code of the process. +pub const process_exit_code = types.StringAttribute{ + .name = "process.exit.code", + .brief = "The exit code of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The date and time the process exited, in ISO 8601 format. +pub const process_exit_time = types.StringAttribute{ + .name = "process.exit.time", + .brief = "The date and time the process exited, in ISO 8601 format.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The PID of the process's group leader. This is also the process group ID (PGID) of the process. +pub const process_group_leader_pid = types.StringAttribute{ + .name = "process.group_leader.pid", + .brief = "The PID of the process's group leader. This is also the process group ID (PGID) of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Whether the process is connected to an interactive shell. +pub const process_interactive = types.StringAttribute{ + .name = "process.interactive", + .brief = "Whether the process is connected to an interactive shell.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The control group associated with the process. +pub const process_linux_cgroup = types.StringAttribute{ + .name = "process.linux.cgroup", + .brief = "The control group associated with the process.", + .note = "Control groups (cgroups) are a kernel feature used to organize and manage process resources. This attribute provides the path(s) to the cgroup(s) associated with the process, which should match the contents of the [/proc/\\[PID\\]/cgroup](https://man7.org/linux/man-pages/man7/cgroups.7.html) file.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The username of the user that owns the process. +pub const process_owner = types.StringAttribute{ + .name = "process.owner", + .brief = "The username of the user that owns the process.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const process_paging_fault_typeValue = enum { + major, + minor, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .major => "major", + .minor => "minor", + }; + } +}; + +/// 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. +pub const process_paging_fault_type = types.EnumAttribute(process_paging_fault_typeValue){ + .base = types.StringAttribute{ + .name = "process.paging.fault_type", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = process_paging_fault_typeValue.major, +}; +/// Parent Process identifier (PPID). +pub const process_parent_pid = types.StringAttribute{ + .name = "process.parent_pid", + .brief = "Parent Process identifier (PPID).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Process identifier (PID). +pub const process_pid = types.StringAttribute{ + .name = "process.pid", + .brief = "Process identifier (PID).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The real user ID (RUID) of the process. +pub const process_real_user_id = types.StringAttribute{ + .name = "process.real_user.id", + .brief = "The real user ID (RUID) of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The username of the real user of the process. +pub const process_real_user_name = types.StringAttribute{ + .name = "process.real_user.name", + .brief = "The username of the real user of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. +pub const process_runtime_description = types.StringAttribute{ + .name = "process.runtime.description", + .brief = "An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the runtime of this process. +pub const process_runtime_name = types.StringAttribute{ + .name = "process.runtime.name", + .brief = "The name of the runtime of this process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version of the runtime of this process, as returned by the runtime without modification. +pub const process_runtime_version = types.StringAttribute{ + .name = "process.runtime.version", + .brief = "The version of the runtime of this process, as returned by the runtime without modification.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The saved user ID (SUID) of the process. +pub const process_saved_user_id = types.StringAttribute{ + .name = "process.saved_user.id", + .brief = "The saved user ID (SUID) of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The username of the saved user. +pub const process_saved_user_name = types.StringAttribute{ + .name = "process.saved_user.name", + .brief = "The username of the saved user.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The PID of the process's session leader. This is also the session ID (SID) of the process. +pub const process_session_leader_pid = types.StringAttribute{ + .name = "process.session_leader.pid", + .brief = "The PID of the process's session leader. This is also the session ID (SID) of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Process title (proctitle) +pub const process_title = types.StringAttribute{ + .name = "process.title", + .brief = "Process title (proctitle)", + .note = "In many Unix-like systems, process title (proctitle), is the string that represents the name or command line of a running process, displayed by system monitoring tools like ps, top, and htop.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The effective user ID (EUID) of the process. +pub const process_user_id = types.StringAttribute{ + .name = "process.user.id", + .brief = "The effective user ID (EUID) of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The username of the effective user of the process. +pub const process_user_name = types.StringAttribute{ + .name = "process.user.name", + .brief = "The username of the effective user of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Virtual process identifier. +pub const process_vpid = types.StringAttribute{ + .name = "process.vpid", + .brief = "Virtual process identifier.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The working directory of the process. +pub const process_working_directory = types.StringAttribute{ + .name = "process.working_directory", + .brief = "The working directory of the process.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const profile_frame_typeValue = enum { + dotnet, + jvm, + kernel, + native, + perl, + php, + cpython, + ruby, + v8js, + beam, + go, + rust, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .dotnet => "dotnet", + .jvm => "jvm", + .kernel => "kernel", + .native => "native", + .perl => "perl", + .php => "php", + .cpython => "cpython", + .ruby => "ruby", + .v8js => "v8js", + .beam => "beam", + .go => "go", + .rust => "rust", + }; + } +}; + +/// Describes the interpreter or compiler of a single frame. +pub const profile_frame_type = types.EnumAttribute(profile_frame_typeValue){ + .base = types.StringAttribute{ + .name = "profile.frame.type", + .brief = "Describes the interpreter or compiler of a single frame.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = profile_frame_typeValue.dotnet, +}; +pub const rpc_connect_rpc_error_codeValue = enum { + cancelled, + unknown, + invalid_argument, + deadline_exceeded, + not_found, + already_exists, + permission_denied, + resource_exhausted, + failed_precondition, + aborted, + out_of_range, + unimplemented, + internal, + unavailable, + data_loss, + unauthenticated, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + }; + } +}; + +/// The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values. +pub const rpc_connect_rpc_error_code = types.EnumAttribute(rpc_connect_rpc_error_codeValue){ + .base = types.StringAttribute{ + .name = "rpc.connect_rpc.error_code", + .brief = "The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = rpc_connect_rpc_error_codeValue.cancelled, +}; +/// Connect request metadata, ``key`` being the normalized Connect Metadata key (lowercase), the value being the metadata values. +pub const rpc_connect_rpc_request_metadata = types.StringAttribute{ + .name = "rpc.connect_rpc.request.metadata", + .brief = "Connect request metadata, ``key`` being the normalized Connect Metadata key (lowercase), the value being the metadata values.", + .note = "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. For example, a property `my-custom-key` with value `[\"1.2.3.4\", \"1.2.3.5\"]` SHOULD be recorded as the `rpc.connect_rpc.request.metadata.my-custom-key` attribute with value `[\"1.2.3.4\", \"1.2.3.5\"]`", + .stability = .development, + .requirement_level = .recommended, +}; +/// Connect response metadata, ``key`` being the normalized Connect Metadata key (lowercase), the value being the metadata values. +pub const rpc_connect_rpc_response_metadata = types.StringAttribute{ + .name = "rpc.connect_rpc.response.metadata", + .brief = "Connect response metadata, ``key`` being the normalized Connect Metadata key (lowercase), the value being the metadata values.", + .note = "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. For example, a property `my-custom-key` with value `\"attribute_value\"` SHOULD be recorded as the `rpc.connect_rpc.response.metadata.my-custom-key` attribute with value `[\"attribute_value\"]`", + .stability = .development, + .requirement_level = .recommended, +}; +/// gRPC request metadata, ``key`` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. +pub const rpc_grpc_request_metadata = types.StringAttribute{ + .name = "rpc.grpc.request.metadata", + .brief = "gRPC request metadata, ``key`` being the normalized gRPC Metadata key (lowercase), the value being the metadata values.", + .note = "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. For example, a property `my-custom-key` with value `[\"1.2.3.4\", \"1.2.3.5\"]` SHOULD be recorded as `rpc.grpc.request.metadata.my-custom-key` attribute with value `[\"1.2.3.4\", \"1.2.3.5\"]`", + .stability = .development, + .requirement_level = .recommended, +}; +/// gRPC response metadata, ``key`` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. +pub const rpc_grpc_response_metadata = types.StringAttribute{ + .name = "rpc.grpc.response.metadata", + .brief = "gRPC response metadata, ``key`` being the normalized gRPC Metadata key (lowercase), the value being the metadata values.", + .note = "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. For example, a property `my-custom-key` with value `[\"attribute_value\"]` SHOULD be recorded as the `rpc.grpc.response.metadata.my-custom-key` attribute with value `[\"attribute_value\"]`", + .stability = .development, + .requirement_level = .recommended, +}; +pub const rpc_grpc_status_codeValue = enum { + ok, + cancelled, + unknown, + invalid_argument, + deadline_exceeded, + not_found, + already_exists, + permission_denied, + resource_exhausted, + failed_precondition, + aborted, + out_of_range, + unimplemented, + internal, + unavailable, + data_loss, + unauthenticated, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + }; + } +}; + +/// The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. +pub const rpc_grpc_status_code = types.EnumAttribute(rpc_grpc_status_codeValue){ + .base = types.StringAttribute{ + .name = "rpc.grpc.status_code", + .brief = "The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = rpc_grpc_status_codeValue.ok, +}; +/// `error.code` property of response if it is an error response. +pub const rpc_jsonrpc_error_code = types.StringAttribute{ + .name = "rpc.jsonrpc.error_code", + .brief = "`error.code` property of response if it is an error response.", + .stability = .development, + .requirement_level = .recommended, +}; +/// `error.message` property of response if it is an error response. +pub const rpc_jsonrpc_error_message = types.StringAttribute{ + .name = "rpc.jsonrpc.error_message", + .brief = "`error.message` property of response if it is an error response.", + .stability = .development, + .requirement_level = .recommended, +}; +/// `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. +pub const rpc_jsonrpc_request_id = types.StringAttribute{ + .name = "rpc.jsonrpc.request_id", + .brief = "`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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. +pub const rpc_jsonrpc_version = types.StringAttribute{ + .name = "rpc.jsonrpc.version", + .brief = "Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Compressed size of the message in bytes. +pub const rpc_message_compressed_size = types.StringAttribute{ + .name = "rpc.message.compressed_size", + .brief = "Compressed size of the message in bytes.", + .stability = .development, + .requirement_level = .recommended, +}; +/// MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. +pub const rpc_message_id = types.StringAttribute{ + .name = "rpc.message.id", + .brief = "MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.", + .note = "This way we guarantee that the values will be consistent between different implementations.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const rpc_message_typeValue = enum { + sent, + received, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .sent => "SENT", + .received => "RECEIVED", + }; + } +}; + +/// Whether this is a received or sent message. +pub const rpc_message_type = types.EnumAttribute(rpc_message_typeValue){ + .base = types.StringAttribute{ + .name = "rpc.message.type", + .brief = "Whether this is a received or sent message.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = rpc_message_typeValue.sent, +}; +/// Uncompressed size of the message in bytes. +pub const rpc_message_uncompressed_size = types.StringAttribute{ + .name = "rpc.message.uncompressed_size", + .brief = "Uncompressed size of the message in bytes.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the (logical) method being called, must be equal to the $method part in the span name. +pub const rpc_method = types.StringAttribute{ + .name = "rpc.method", + .brief = "The name of the (logical) method being called, must be equal to the $method part in the span name.", + .note = "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.name` 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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The full (logical) name of the service being called, including its package name, if applicable. +pub const rpc_service = types.StringAttribute{ + .name = "rpc.service", + .brief = "The full (logical) name of the service being called, including its package name, if applicable.", + .note = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +pub const rpc_systemValue = enum { + grpc, + java_rmi, + dotnet_wcf, + apache_dubbo, + connect_rpc, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .grpc => "grpc", + .java_rmi => "java_rmi", + .dotnet_wcf => "dotnet_wcf", + .apache_dubbo => "apache_dubbo", + .connect_rpc => "connect_rpc", + }; + } +}; + +/// A string identifying the remoting system. See below for a list of well-known identifiers. +pub const rpc_system = types.EnumAttribute(rpc_systemValue){ + .base = types.StringAttribute{ + .name = "rpc.system", + .brief = "A string identifying the remoting system. See below for a list of well-known identifiers.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = rpc_systemValue.grpc, +}; +/// A categorization value keyword used by the entity using the rule for detection of this event +pub const security_rule_category = types.StringAttribute{ + .name = "security_rule.category", + .brief = "A categorization value keyword used by the entity using the rule for detection of this event", + .stability = .development, + .requirement_level = .recommended, +}; +/// The description of the rule generating the event. +pub const security_rule_description = types.StringAttribute{ + .name = "security_rule.description", + .brief = "The description of the rule generating the event.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the license under which the rule used to generate this event is made available. +pub const security_rule_license = types.StringAttribute{ + .name = "security_rule.license", + .brief = "Name of the license under which the rule used to generate this event is made available.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the rule or signature generating the event. +pub const security_rule_name = types.StringAttribute{ + .name = "security_rule.name", + .brief = "The name of the rule or signature generating the event.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Reference URL to additional information about the rule used to generate this event. +pub const security_rule_reference = types.StringAttribute{ + .name = "security_rule.reference", + .brief = "Reference URL to additional information about the rule used to generate this event.", + .note = "The URL can point to the vendor’s documentation about the rule. If that’s not available, it can also be a link to a more general page describing this type of alert.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member. +pub const security_rule_ruleset_name = types.StringAttribute{ + .name = "security_rule.ruleset.name", + .brief = "Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event. +pub const security_rule_uuid = types.StringAttribute{ + .name = "security_rule.uuid", + .brief = "A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version / revision of the rule being used for analysis. +pub const security_rule_version = types.StringAttribute{ + .name = "security_rule.version", + .brief = "The version / revision of the rule being used for analysis.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +pub const server_address = types.StringAttribute{ + .name = "server.address", + .brief = "Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Server port number. +pub const server_port = types.StringAttribute{ + .name = "server.port", + .brief = "Server port number.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The string ID of the service instance. +pub const service_instance_id = types.StringAttribute{ + .name = "service.instance.id", + .brief = "The string ID of the service instance.", + .note = "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/latest/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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Logical name of the service. +pub const service_name = types.StringAttribute{ + .name = "service.name", + .brief = "Logical name of the service.", + .note = "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`.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// A namespace for `service.name`. +pub const service_namespace = types.StringAttribute{ + .name = "service.namespace", + .brief = "A namespace for `service.name`.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version string of the service API or implementation. The format is not defined by these conventions. +pub const service_version = types.StringAttribute{ + .name = "service.version", + .brief = "The version string of the service API or implementation. The format is not defined by these conventions.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// A unique id to identify a session. +pub const session_id = types.StringAttribute{ + .name = "session.id", + .brief = "A unique id to identify a session.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The previous `session.id` for this user, when known. +pub const session_previous_id = types.StringAttribute{ + .name = "session.previous_id", + .brief = "The previous `session.id` for this user, when known.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const signalr_connection_statusValue = enum { + normal_closure, + timeout, + app_shutdown, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .normal_closure => "normal_closure", + .timeout => "timeout", + .app_shutdown => "app_shutdown", + }; + } +}; + +/// SignalR HTTP connection closure status. +pub const signalr_connection_status = types.EnumAttribute(signalr_connection_statusValue){ + .base = types.StringAttribute{ + .name = "signalr.connection.status", + .brief = "SignalR HTTP connection closure status.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = signalr_connection_statusValue.normal_closure, +}; +pub const signalr_transportValue = enum { + server_sent_events, + long_polling, + web_sockets, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .server_sent_events => "server_sent_events", + .long_polling => "long_polling", + .web_sockets => "web_sockets", + }; + } +}; + +/// [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) +pub const signalr_transport = types.EnumAttribute(signalr_transportValue){ + .base = types.StringAttribute{ + .name = "signalr.transport", + .brief = "[SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = signalr_transportValue.server_sent_events, +}; +/// Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +pub const source_address = types.StringAttribute{ + .name = "source.address", + .brief = "Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Source port number +pub const source_port = types.StringAttribute{ + .name = "source.port", + .brief = "Source port number", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `cpu.logical_number` instead. +pub const system_cpu_logical_number = types.StringAttribute{ + .name = "system.cpu.logical_number", + .brief = "Deprecated, use `cpu.logical_number` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const system_cpu_stateValue = enum { + user, + system, + nice, + idle, + iowait, + interrupt, + steal, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .user => "user", + .system => "system", + .nice => "nice", + .idle => "idle", + .iowait => "iowait", + .interrupt => "interrupt", + .steal => "steal", + }; + } +}; + +/// Deprecated, use `cpu.mode` instead. +pub const system_cpu_state = types.EnumAttribute(system_cpu_stateValue){ + .base = types.StringAttribute{ + .name = "system.cpu.state", + .brief = "Deprecated, use `cpu.mode` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_cpu_stateValue.user, +}; +/// The device identifier +pub const system_device = types.StringAttribute{ + .name = "system.device", + .brief = "The device identifier", + .stability = .development, + .requirement_level = .recommended, +}; +/// The filesystem mode +pub const system_filesystem_mode = types.StringAttribute{ + .name = "system.filesystem.mode", + .brief = "The filesystem mode", + .stability = .development, + .requirement_level = .recommended, +}; +/// The filesystem mount path +pub const system_filesystem_mountpoint = types.StringAttribute{ + .name = "system.filesystem.mountpoint", + .brief = "The filesystem mount path", + .stability = .development, + .requirement_level = .recommended, +}; +pub const system_filesystem_stateValue = enum { + used, + free, + reserved, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .used => "used", + .free => "free", + .reserved => "reserved", + }; + } +}; + +/// The filesystem state +pub const system_filesystem_state = types.EnumAttribute(system_filesystem_stateValue){ + .base = types.StringAttribute{ + .name = "system.filesystem.state", + .brief = "The filesystem state", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_filesystem_stateValue.used, +}; +pub const system_filesystem_typeValue = enum { + fat32, + exfat, + ntfs, + refs, + hfsplus, + ext4, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .fat32 => "fat32", + .exfat => "exfat", + .ntfs => "ntfs", + .refs => "refs", + .hfsplus => "hfsplus", + .ext4 => "ext4", + }; + } +}; + +/// The filesystem type +pub const system_filesystem_type = types.EnumAttribute(system_filesystem_typeValue){ + .base = types.StringAttribute{ + .name = "system.filesystem.type", + .brief = "The filesystem type", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_filesystem_typeValue.fat32, +}; +pub const system_memory_stateValue = enum { + used, + free, + shared, + buffers, + cached, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .used => "used", + .free => "free", + .shared => "shared", + .buffers => "buffers", + .cached => "cached", + }; + } +}; + +/// The memory state +pub const system_memory_state = types.EnumAttribute(system_memory_stateValue){ + .base = types.StringAttribute{ + .name = "system.memory.state", + .brief = "The memory state", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_memory_stateValue.used, +}; +pub const system_network_stateValue = enum { + close, + close_wait, + closing, + delete, + established, + fin_wait_1, + fin_wait_2, + last_ack, + listen, + syn_recv, + syn_sent, + time_wait, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .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", + }; + } +}; + +/// Deprecated, use `network.connection.state` instead. +pub const system_network_state = types.EnumAttribute(system_network_stateValue){ + .base = types.StringAttribute{ + .name = "system.network.state", + .brief = "Deprecated, use `network.connection.state` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_network_stateValue.close, +}; +pub const system_paging_directionValue = enum { + in, + out, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .in => "in", + .out => "out", + }; + } +}; + +/// The paging access direction +pub const system_paging_direction = types.EnumAttribute(system_paging_directionValue){ + .base = types.StringAttribute{ + .name = "system.paging.direction", + .brief = "The paging access direction", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_paging_directionValue.in, +}; +pub const system_paging_stateValue = enum { + used, + free, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .used => "used", + .free => "free", + }; + } +}; + +/// The memory paging state +pub const system_paging_state = types.EnumAttribute(system_paging_stateValue){ + .base = types.StringAttribute{ + .name = "system.paging.state", + .brief = "The memory paging state", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_paging_stateValue.used, +}; +pub const system_paging_typeValue = enum { + major, + minor, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .major => "major", + .minor => "minor", + }; + } +}; + +/// The memory paging type +pub const system_paging_type = types.EnumAttribute(system_paging_typeValue){ + .base = types.StringAttribute{ + .name = "system.paging.type", + .brief = "The memory paging type", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_paging_typeValue.major, +}; +pub const system_process_statusValue = enum { + running, + sleeping, + stopped, + defunct, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .running => "running", + .sleeping => "sleeping", + .stopped => "stopped", + .defunct => "defunct", + }; + } +}; + +/// The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) +pub const system_process_status = types.EnumAttribute(system_process_statusValue){ + .base = types.StringAttribute{ + .name = "system.process.status", + .brief = "The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_process_statusValue.running, +}; +pub const system_processes_statusValue = enum { + running, + sleeping, + stopped, + defunct, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .running => "running", + .sleeping => "sleeping", + .stopped => "stopped", + .defunct => "defunct", + }; + } +}; + +/// Deprecated, use `system.process.status` instead. +pub const system_processes_status = types.EnumAttribute(system_processes_statusValue){ + .base = types.StringAttribute{ + .name = "system.processes.status", + .brief = "Deprecated, use `system.process.status` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = system_processes_statusValue.running, +}; +/// The name of the auto instrumentation agent or distribution, if used. +pub const telemetry_distro_name = types.StringAttribute{ + .name = "telemetry.distro.name", + .brief = "The name of the auto instrumentation agent or distribution, if used.", + .note = "Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version string of the auto instrumentation agent or distribution, if used. +pub const telemetry_distro_version = types.StringAttribute{ + .name = "telemetry.distro.version", + .brief = "The version string of the auto instrumentation agent or distribution, if used.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const telemetry_sdk_languageValue = enum { + cpp, + dotnet, + erlang, + go, + java, + nodejs, + php, + python, + ruby, + rust, + swift, + webjs, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .cpp => "cpp", + .dotnet => "dotnet", + .erlang => "erlang", + .go => "go", + .java => "java", + .nodejs => "nodejs", + .php => "php", + .python => "python", + .ruby => "ruby", + .rust => "rust", + .swift => "swift", + .webjs => "webjs", + }; + } +}; + +/// The language of the telemetry SDK. +pub const telemetry_sdk_language = types.EnumAttribute(telemetry_sdk_languageValue){ + .base = types.StringAttribute{ + .name = "telemetry.sdk.language", + .brief = "The language of the telemetry SDK.", + .stability = .stable, + .requirement_level = .recommended, + }, + .well_known_values = telemetry_sdk_languageValue.cpp, +}; +/// The name of the telemetry SDK as defined above. +pub const telemetry_sdk_name = types.StringAttribute{ + .name = "telemetry.sdk.name", + .brief = "The name of the telemetry SDK as defined above.", + .note = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The version string of the telemetry SDK. +pub const telemetry_sdk_version = types.StringAttribute{ + .name = "telemetry.sdk.version", + .brief = "The version string of the telemetry SDK.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The fully qualified human readable name of the [test case](https://wikipedia.org/wiki/Test_case). +pub const test_case_name = types.StringAttribute{ + .name = "test.case.name", + .brief = "The fully qualified human readable name of the [test case](https://wikipedia.org/wiki/Test_case).", + .stability = .development, + .requirement_level = .recommended, +}; +pub const test_case_result_statusValue = enum { + pass, + fail, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .pass => "pass", + .fail => "fail", + }; + } +}; + +/// The status of the actual test case result from test execution. +pub const test_case_result_status = types.EnumAttribute(test_case_result_statusValue){ + .base = types.StringAttribute{ + .name = "test.case.result.status", + .brief = "The status of the actual test case result from test execution.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = test_case_result_statusValue.pass, +}; +/// The human readable name of a [test suite](https://wikipedia.org/wiki/Test_suite). +pub const test_suite_name = types.StringAttribute{ + .name = "test.suite.name", + .brief = "The human readable name of a [test suite](https://wikipedia.org/wiki/Test_suite).", + .stability = .development, + .requirement_level = .recommended, +}; +pub const test_suite_run_statusValue = enum { + success, + failure, + skipped, + aborted, + timed_out, + in_progress, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .success => "success", + .failure => "failure", + .skipped => "skipped", + .aborted => "aborted", + .timed_out => "timed_out", + .in_progress => "in_progress", + }; + } +}; + +/// The status of the test suite run. +pub const test_suite_run_status = types.EnumAttribute(test_suite_run_statusValue){ + .base = types.StringAttribute{ + .name = "test.suite.run.status", + .brief = "The status of the test suite run.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = test_suite_run_statusValue.success, +}; +/// Current "managed" thread ID (as opposed to OS thread ID). +pub const thread_id = types.StringAttribute{ + .name = "thread.id", + .brief = "Current \"managed\" thread ID (as opposed to OS thread ID).", + .stability = .development, + .requirement_level = .recommended, +}; +/// Current thread name. +pub const thread_name = types.StringAttribute{ + .name = "thread.name", + .brief = "Current thread name.", + .stability = .development, + .requirement_level = .recommended, +}; +/// String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection. +pub const tls_cipher = types.StringAttribute{ + .name = "tls.cipher", + .brief = "String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection.", + .note = "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).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_client_certificate = types.StringAttribute{ + .name = "tls.client.certificate", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_client_certificate_chain = types.StringAttribute{ + .name = "tls.client.certificate_chain", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_client_hash_md5 = types.StringAttribute{ + .name = "tls.client.hash.md5", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_client_hash_sha1 = types.StringAttribute{ + .name = "tls.client.hash.sha1", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_client_hash_sha256 = types.StringAttribute{ + .name = "tls.client.hash.sha256", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_client_issuer = types.StringAttribute{ + .name = "tls.client.issuer", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A hash that identifies clients based on how they perform an SSL/TLS handshake. +pub const tls_client_ja3 = types.StringAttribute{ + .name = "tls.client.ja3", + .brief = "A hash that identifies clients based on how they perform an SSL/TLS handshake.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Date/Time indicating when client certificate is no longer considered valid. +pub const tls_client_not_after = types.StringAttribute{ + .name = "tls.client.not_after", + .brief = "Date/Time indicating when client certificate is no longer considered valid.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Date/Time indicating when client certificate is first considered valid. +pub const tls_client_not_before = types.StringAttribute{ + .name = "tls.client.not_before", + .brief = "Date/Time indicating when client certificate is first considered valid.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `server.address` instead. +pub const tls_client_server_name = types.StringAttribute{ + .name = "tls.client.server_name", + .brief = "Deprecated, use `server.address` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Distinguished name of subject of the x.509 certificate presented by the client. +pub const tls_client_subject = types.StringAttribute{ + .name = "tls.client.subject", + .brief = "Distinguished name of subject of the x.509 certificate presented by the client.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Array of ciphers offered by the client during the client hello. +pub const tls_client_supported_ciphers = types.StringAttribute{ + .name = "tls.client.supported_ciphers", + .brief = "Array of ciphers offered by the client during the client hello.", + .stability = .development, + .requirement_level = .recommended, +}; +/// String indicating the curve used for the given cipher, when applicable +pub const tls_curve = types.StringAttribute{ + .name = "tls.curve", + .brief = "String indicating the curve used for the given cipher, when applicable", + .stability = .development, + .requirement_level = .recommended, +}; +/// Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel. +pub const tls_established = types.StringAttribute{ + .name = "tls.established", + .brief = "Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_next_protocol = types.StringAttribute{ + .name = "tls.next_protocol", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const tls_protocol_nameValue = enum { + ssl, + tls, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .ssl => "ssl", + .tls => "tls", + }; + } +}; + +/// Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) +pub const tls_protocol_name = types.EnumAttribute(tls_protocol_nameValue){ + .base = types.StringAttribute{ + .name = "tls.protocol.name", + .brief = "Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = tls_protocol_nameValue.ssl, +}; +/// Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) +pub const tls_protocol_version = types.StringAttribute{ + .name = "tls.protocol.version", + .brief = "Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values)", + .stability = .development, + .requirement_level = .recommended, +}; +/// Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation. +pub const tls_resumed = types.StringAttribute{ + .name = "tls.resumed", + .brief = "Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_server_certificate = types.StringAttribute{ + .name = "tls.server.certificate", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_server_certificate_chain = types.StringAttribute{ + .name = "tls.server.certificate_chain", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_server_hash_md5 = types.StringAttribute{ + .name = "tls.server.hash.md5", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_server_hash_sha1 = types.StringAttribute{ + .name = "tls.server.hash.sha1", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_server_hash_sha256 = types.StringAttribute{ + .name = "tls.server.hash.sha256", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const tls_server_issuer = types.StringAttribute{ + .name = "tls.server.issuer", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// A hash that identifies servers based on how they perform an SSL/TLS handshake. +pub const tls_server_ja3s = types.StringAttribute{ + .name = "tls.server.ja3s", + .brief = "A hash that identifies servers based on how they perform an SSL/TLS handshake.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Date/Time indicating when server certificate is no longer considered valid. +pub const tls_server_not_after = types.StringAttribute{ + .name = "tls.server.not_after", + .brief = "Date/Time indicating when server certificate is no longer considered valid.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Date/Time indicating when server certificate is first considered valid. +pub const tls_server_not_before = types.StringAttribute{ + .name = "tls.server.not_before", + .brief = "Date/Time indicating when server certificate is first considered valid.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Distinguished name of subject of the x.509 certificate presented by the server. +pub const tls_server_subject = types.StringAttribute{ + .name = "tls.server.subject", + .brief = "Distinguished name of subject of the x.509 certificate presented by the server.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Domain extracted from the `url.full`, such as "opentelemetry.io". +pub const url_domain = types.StringAttribute{ + .name = "url.domain", + .brief = "Domain extracted from the `url.full`, such as \"opentelemetry.io\".", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The file extension extracted from the `url.full`, excluding the leading dot. +pub const url_extension = types.StringAttribute{ + .name = "url.extension", + .brief = "The file extension extracted from the `url.full`, excluding the leading dot.", + .note = "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`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component +pub const url_fragment = types.StringAttribute{ + .name = "url.fragment", + .brief = "The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) +pub const url_full = types.StringAttribute{ + .name = "url.full", + .brief = "Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)", + .note = "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. ![Development](https://img.shields.io/badge/-development-blue) Query string values for the following keys SHOULD be redacted by default and replaced by the value `REDACTED`: * [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) * [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) * [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token) * [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls) This list is subject to change over time. When a query string value is redacted, the query string key SHOULD still be preserved, e.g. `https://www.example.com/path?color=blue&sig=REDACTED`.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Unmodified original URL as seen in the event source. +pub const url_original = types.StringAttribute{ + .name = "url.original", + .brief = "Unmodified original URL as seen in the event source.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component +pub const url_path = types.StringAttribute{ + .name = "url.path", + .brief = "The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component", + .note = "Sensitive content provided in `url.path` SHOULD be scrubbed when instrumentations can identify it.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Port extracted from the `url.full` +pub const url_port = types.StringAttribute{ + .name = "url.port", + .brief = "Port extracted from the `url.full`", + .stability = .development, + .requirement_level = .recommended, +}; +/// The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component +pub const url_query = types.StringAttribute{ + .name = "url.query", + .brief = "The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component", + .note = "Sensitive content provided in `url.query` SHOULD be scrubbed when instrumentations can identify it. ![Development](https://img.shields.io/badge/-development-blue) Query string values for the following keys SHOULD be redacted by default and replaced by the value `REDACTED`: * [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) * [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) * [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token) * [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls) This list is subject to change over time. When a query string value is redacted, the query string key SHOULD still be preserved, e.g. `q=OpenTelemetry&sig=REDACTED`.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// The highest registered url domain, stripped of the subdomain. +pub const url_registered_domain = types.StringAttribute{ + .name = "url.registered_domain", + .brief = "The highest registered url domain, stripped of the subdomain.", + .note = "This value can be determined precisely with the [public suffix list](https://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`.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. +pub const url_scheme = types.StringAttribute{ + .name = "url.scheme", + .brief = "The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// 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. +pub const url_subdomain = types.StringAttribute{ + .name = "url.subdomain", + .brief = "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.", + .note = "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.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). +pub const url_template = types.StringAttribute{ + .name = "url.template", + .brief = "The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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`. +pub const url_top_level_domain = types.StringAttribute{ + .name = "url.top_level_domain", + .brief = "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`.", + .note = "This value can be determined precisely with the [public suffix list](https://publicsuffix.org/).", + .stability = .development, + .requirement_level = .recommended, +}; +/// User email address. +pub const user_email = types.StringAttribute{ + .name = "user.email", + .brief = "User email address.", + .stability = .development, + .requirement_level = .recommended, +}; +/// User's full name +pub const user_full_name = types.StringAttribute{ + .name = "user.full_name", + .brief = "User's full name", + .stability = .development, + .requirement_level = .recommended, +}; +/// Unique user hash to correlate information for a user in anonymized form. +pub const user_hash = types.StringAttribute{ + .name = "user.hash", + .brief = "Unique user hash to correlate information for a user in anonymized form.", + .note = "Useful if `user.id` or `user.name` contain confidential information and cannot be used.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Unique identifier of the user. +pub const user_id = types.StringAttribute{ + .name = "user.id", + .brief = "Unique identifier of the user.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Short name or login/username of the user. +pub const user_name = types.StringAttribute{ + .name = "user.name", + .brief = "Short name or login/username of the user.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Array of user roles at the time of the event. +pub const user_roles = types.StringAttribute{ + .name = "user.roles", + .brief = "Array of user roles at the time of the event.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Name of the user-agent extracted from original. Usually refers to the browser's name. +pub const user_agent_name = types.StringAttribute{ + .name = "user_agent.name", + .brief = "Name of the user-agent extracted from original. Usually refers to the browser's name.", + .note = "[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`", + .stability = .development, + .requirement_level = .recommended, +}; +/// Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. +pub const user_agent_original = types.StringAttribute{ + .name = "user_agent.original", + .brief = "Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client.", + .stability = .stable, + .requirement_level = .recommended, +}; +/// Human readable operating system name. +pub const user_agent_os_name = types.StringAttribute{ + .name = "user_agent.os.name", + .brief = "Human readable operating system name.", + .note = "For mapping user agent strings to OS names, libraries such as [ua-parser](https://github.com/ua-parser) can be utilized.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +pub const user_agent_os_version = types.StringAttribute{ + .name = "user_agent.os.version", + .brief = "The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes).", + .note = "For mapping user agent strings to OS versions, libraries such as [ua-parser](https://github.com/ua-parser) can be utilized.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const user_agent_synthetic_typeValue = enum { + bot, + @"test", + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .bot => "bot", + .@"test" => "test", + }; + } +}; + +/// Specifies the category of synthetic traffic, such as tests or bots. +pub const user_agent_synthetic_type = types.EnumAttribute(user_agent_synthetic_typeValue){ + .base = types.StringAttribute{ + .name = "user_agent.synthetic.type", + .brief = "Specifies the category of synthetic traffic, such as tests or bots.", + .note = "This attribute MAY be derived from the contents of the `user_agent.original` attribute. Components that populate the attribute are responsible for determining what they consider to be synthetic bot or test traffic. This attribute can either be set for self-identification purposes, or on telemetry detected to be generated as a result of a synthetic request. This attribute is useful for distinguishing between genuine client traffic and synthetic traffic generated by bots or tests.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = user_agent_synthetic_typeValue.bot, +}; +/// Version of the user-agent extracted from original. Usually refers to the browser's version +pub const user_agent_version = types.StringAttribute{ + .name = "user_agent.version", + .brief = "Version of the user-agent extracted from original. Usually refers to the browser's version", + .note = "[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`", + .stability = .development, + .requirement_level = .recommended, +}; +pub const v8js_gc_typeValue = enum { + major, + minor, + incremental, + weakcb, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .major => "major", + .minor => "minor", + .incremental => "incremental", + .weakcb => "weakcb", + }; + } +}; + +/// The type of garbage collection. +pub const v8js_gc_type = types.EnumAttribute(v8js_gc_typeValue){ + .base = types.StringAttribute{ + .name = "v8js.gc.type", + .brief = "The type of garbage collection.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = v8js_gc_typeValue.major, +}; +pub const v8js_heap_space_nameValue = enum { + new_space, + old_space, + code_space, + map_space, + large_object_space, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .new_space => "new_space", + .old_space => "old_space", + .code_space => "code_space", + .map_space => "map_space", + .large_object_space => "large_object_space", + }; + } +}; + +/// The name of the space type of heap memory. +pub const v8js_heap_space_name = types.EnumAttribute(v8js_heap_space_nameValue){ + .base = types.StringAttribute{ + .name = "v8js.heap.space.name", + .brief = "The name of the space type of heap memory.", + .note = "Value can be retrieved from value `space_name` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics)", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = v8js_heap_space_nameValue.new_space, +}; +/// The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. +pub const vcs_change_id = types.StringAttribute{ + .name = "vcs.change.id", + .brief = "The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const vcs_change_stateValue = enum { + open, + wip, + closed, + merged, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .open => "open", + .wip => "wip", + .closed => "closed", + .merged => "merged", + }; + } +}; + +/// The state of the change (pull request/merge request/changelist). +pub const vcs_change_state = types.EnumAttribute(vcs_change_stateValue){ + .base = types.StringAttribute{ + .name = "vcs.change.state", + .brief = "The state of the change (pull request/merge request/changelist).", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = vcs_change_stateValue.open, +}; +/// The human readable title of the change (pull request/merge request/changelist). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. +pub const vcs_change_title = types.StringAttribute{ + .name = "vcs.change.title", + .brief = "The human readable title of the change (pull request/merge request/changelist). This title is often a brief summary of the change and may get merged in to a ref as the commit summary.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const vcs_line_change_typeValue = enum { + added, + removed, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .added => "added", + .removed => "removed", + }; + } +}; + +/// The type of line change being measured on a branch or change. +pub const vcs_line_change_type = types.EnumAttribute(vcs_line_change_typeValue){ + .base = types.StringAttribute{ + .name = "vcs.line_change.type", + .brief = "The type of line change being measured on a branch or change.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = vcs_line_change_typeValue.added, +}; +/// The group owner within the version control system. +pub const vcs_owner_name = types.StringAttribute{ + .name = "vcs.owner.name", + .brief = "The group owner within the version control system.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const vcs_provider_nameValue = enum { + github, + gitlab, + gittea, + gitea, + bitbucket, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .github => "github", + .gitlab => "gitlab", + .gittea => "gittea", + .gitea => "gitea", + .bitbucket => "bitbucket", + }; + } +}; + +/// The name of the version control system provider. +pub const vcs_provider_name = types.EnumAttribute(vcs_provider_nameValue){ + .base = types.StringAttribute{ + .name = "vcs.provider.name", + .brief = "The name of the version control system provider.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = vcs_provider_nameValue.github, +}; +/// The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. +pub const vcs_ref_base_name = types.StringAttribute{ + .name = "vcs.ref.base.name", + .brief = "The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository.", + .note = "`base` refers to the starting point of a change. For example, `main` would be the base reference of type branch if you've created a new reference of type branch from it and created new commits.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const vcs_ref_base_revision = types.StringAttribute{ + .name = "vcs.ref.base.revision", + .brief = "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.", + .note = "`base` refers to the starting point of a change. For example, `main` would be the base reference of type branch if you've created a new reference of type branch from it and created new commits. 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.base.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.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const vcs_ref_base_typeValue = enum { + branch, + tag, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .branch => "branch", + .tag => "tag", + }; + } +}; + +/// The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +pub const vcs_ref_base_type = types.EnumAttribute(vcs_ref_base_typeValue){ + .base = types.StringAttribute{ + .name = "vcs.ref.base.type", + .brief = "The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.", + .note = "`base` refers to the starting point of a change. For example, `main` would be the base reference of type branch if you've created a new reference of type branch from it and created new commits.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = vcs_ref_base_typeValue.branch, +}; +/// The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. +pub const vcs_ref_head_name = types.StringAttribute{ + .name = "vcs.ref.head.name", + .brief = "The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository.", + .note = "`head` refers to where you are right now; the current reference at a given time.", + .stability = .development, + .requirement_level = .recommended, +}; +/// 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. +pub const vcs_ref_head_revision = types.StringAttribute{ + .name = "vcs.ref.head.revision", + .brief = "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.", + .note = "`head` refers to where you are right now; the current reference at a given time.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.head.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.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const vcs_ref_head_typeValue = enum { + branch, + tag, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .branch => "branch", + .tag => "tag", + }; + } +}; + +/// The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +pub const vcs_ref_head_type = types.EnumAttribute(vcs_ref_head_typeValue){ + .base = types.StringAttribute{ + .name = "vcs.ref.head.type", + .brief = "The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.", + .note = "`head` refers to where you are right now; the current reference at a given time.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = vcs_ref_head_typeValue.branch, +}; +pub const vcs_ref_typeValue = enum { + branch, + tag, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .branch => "branch", + .tag => "tag", + }; + } +}; + +/// The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +pub const vcs_ref_type = types.EnumAttribute(vcs_ref_typeValue){ + .base = types.StringAttribute{ + .name = "vcs.ref.type", + .brief = "The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = vcs_ref_typeValue.branch, +}; +/// Deprecated, use `vcs.change.id` instead. +pub const vcs_repository_change_id = types.StringAttribute{ + .name = "vcs.repository.change.id", + .brief = "Deprecated, use `vcs.change.id` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `vcs.change.title` instead. +pub const vcs_repository_change_title = types.StringAttribute{ + .name = "vcs.repository.change.title", + .brief = "Deprecated, use `vcs.change.title` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. +pub const vcs_repository_name = types.StringAttribute{ + .name = "vcs.repository.name", + .brief = "The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.", + .note = "Due to it only being the name, it can clash with forks of the same repository if collecting telemetry across multiple orgs or groups in the same backends.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `vcs.ref.head.name` instead. +pub const vcs_repository_ref_name = types.StringAttribute{ + .name = "vcs.repository.ref.name", + .brief = "Deprecated, use `vcs.ref.head.name` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +/// Deprecated, use `vcs.ref.head.revision` instead. +pub const vcs_repository_ref_revision = types.StringAttribute{ + .name = "vcs.repository.ref.revision", + .brief = "Deprecated, use `vcs.ref.head.revision` instead.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const vcs_repository_ref_typeValue = enum { + branch, + tag, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .branch => "branch", + .tag => "tag", + }; + } +}; + +/// Deprecated, use `vcs.ref.head.type` instead. +pub const vcs_repository_ref_type = types.EnumAttribute(vcs_repository_ref_typeValue){ + .base = types.StringAttribute{ + .name = "vcs.repository.ref.type", + .brief = "Deprecated, use `vcs.ref.head.type` instead.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = vcs_repository_ref_typeValue.branch, +}; +/// The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. +pub const vcs_repository_url_full = types.StringAttribute{ + .name = "vcs.repository.url.full", + .brief = "The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.", + .note = "In Git Version Control Systems, the canonical URL SHOULD NOT include the `.git` extension.", + .stability = .development, + .requirement_level = .recommended, +}; +pub const vcs_revision_delta_directionValue = enum { + behind, + ahead, + pub fn toString(self: @This()) []const u8 { + return switch (self) { + .behind => "behind", + .ahead => "ahead", + }; + } +}; + +/// The type of revision comparison. +pub const vcs_revision_delta_direction = types.EnumAttribute(vcs_revision_delta_directionValue){ + .base = types.StringAttribute{ + .name = "vcs.revision_delta.direction", + .brief = "The type of revision comparison.", + .stability = .development, + .requirement_level = .recommended, + }, + .well_known_values = vcs_revision_delta_directionValue.behind, +}; +/// Additional description of the web engine (e.g. detailed version and edition information). +pub const webengine_description = types.StringAttribute{ + .name = "webengine.description", + .brief = "Additional description of the web engine (e.g. detailed version and edition information).", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the web engine. +pub const webengine_name = types.StringAttribute{ + .name = "webengine.name", + .brief = "The name of the web engine.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The version of the web engine. +pub const webengine_version = types.StringAttribute{ + .name = "webengine.version", + .brief = "The version of the web engine.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis. +pub const zos_smf_id = types.StringAttribute{ + .name = "zos.smf.id", + .brief = "The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis.", + .stability = .development, + .requirement_level = .recommended, +}; +/// The name of the SYSPLEX to which the z/OS system belongs too. +pub const zos_sysplex_name = types.StringAttribute{ + .name = "zos.sysplex.name", + .brief = "The name of the SYSPLEX to which the z/OS system belongs too.", + .stability = .development, + .requirement_level = .recommended, +}; +test "semantic attributes" { + std.testing.refAllDecls(@This()); +} diff --git a/src/aws/registry.zig b/src/aws/registry.zig deleted file mode 100644 index 7ae6191..0000000 --- a/src/aws/registry.zig +++ /dev/null @@ -1,342 +0,0 @@ -//! AWS semantic conventions -//! -//! This module provides semantic convention attributes for AWS services instrumentation. -//! Based on OpenTelemetry AWS semantic conventions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// General AWS attributes -pub const Attributes = struct { - /// The AWS request ID as returned in the response headers. - pub const request_id = types.StringAttribute.init( - "aws.request_id", - "The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "79b9da39-b7ae-508a-a6bc-864b2829c622", "C9ER4AJX75574TDJ" }); - - /// The AWS extended request ID as returned in the response header. - pub const extended_request_id = types.StringAttribute.init( - "aws.extended_request_id", - "The AWS extended request ID as returned in the response header `x-amz-id-2`.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ="}); -}; - -/// Amazon DynamoDB attributes -pub const DynamoDbAttributes = struct { - /// The keys in the RequestItems object field. - pub const table_names = types.ArrayAttribute.init( - "aws.dynamodb.table_names", - .string, - "The keys in the `RequestItems` object field.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "Users", "Cats" }); - - /// The JSON-serialized value of each item in the ConsumedCapacity response field. - pub const consumed_capacity = types.ArrayAttribute.init( - "aws.dynamodb.consumed_capacity", - .string, - "The JSON-serialized value of each item in the `ConsumedCapacity` response field.", - .experimental, - .recommended, - ); - - /// The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. - pub const provisioned_read_capacity = types.DoubleAttribute.init( - "aws.dynamodb.provisioned_read_capacity", - "The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.", - .experimental, - .recommended, - ).withExamples(&[_]f64{ 1.0, 2.0 }); - - /// The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. - pub const provisioned_write_capacity = types.DoubleAttribute.init( - "aws.dynamodb.provisioned_write_capacity", - "The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.", - .experimental, - .recommended, - ).withExamples(&[_]f64{ 1.0, 2.0 }); - - /// The value of the ConsistentRead request parameter. - pub const consistent_read = types.BooleanAttribute.init( - "aws.dynamodb.consistent_read", - "The value of the `ConsistentRead` request parameter.", - .experimental, - .recommended, - ); - - /// The value of the ProjectionExpression request parameter. - pub const projection = types.StringAttribute.init( - "aws.dynamodb.projection", - "The value of the `ProjectionExpression` request parameter.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "Title", "Title, Price, Color", "Title, Description, RelatedItems, ProductReviews" }); - - /// The value of the Limit request parameter. - pub const limit = types.IntAttribute.init( - "aws.dynamodb.limit", - "The value of the `Limit` request parameter.", - .experimental, - .recommended, - ).withExamples(&[_]i64{10}); - - /// The value of the AttributesToGet request parameter. - pub const attributes_to_get = types.ArrayAttribute.init( - "aws.dynamodb.attributes_to_get", - .string, - "The value of the `AttributesToGet` request parameter.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "lives", "id" }); - - /// The value of the IndexName request parameter. - pub const index_name = types.StringAttribute.init( - "aws.dynamodb.index_name", - "The value of the `IndexName` request parameter.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"name_to_group"}); -}; - -/// Amazon ECS attributes -pub const EcsAttributes = struct { - /// The Amazon Resource Name (ARN) of an ECS container instance. - pub const container_arn = types.StringAttribute.init( - "aws.ecs.container.arn", - "The Amazon Resource Name (ARN) of an ECS container instance.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9"}); - - /// The ARN of an ECS cluster. - pub const cluster_arn = types.StringAttribute.init( - "aws.ecs.cluster.arn", - "The ARN of an ECS cluster.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"}); - - /// The launch type for an ECS task. - pub const launch_type = types.EnumAttribute.init( - "aws.ecs.launchtype", - "The launch type for an ECS task.", - .experimental, - .recommended, - ).withMembers(&[_]types.EnumMember{ - .{ .value = "ec2", .brief = "Amazon EC2", .stability = .experimental }, - .{ .value = "fargate", .brief = "Amazon Fargate", .stability = .experimental }, - }); - - /// The ARN of a running ECS task. - pub const task_arn = types.StringAttribute.init( - "aws.ecs.task.arn", - "The ARN of a running ECS task.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ - "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", - }); - - /// The family name of the ECS task definition. - pub const task_family = types.StringAttribute.init( - "aws.ecs.task.family", - "The family name of the ECS task definition used to create the ECS task.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"opentelemetry-family"}); - - /// The ID of a running ECS task. - pub const task_id = types.StringAttribute.init( - "aws.ecs.task.id", - "The ID of a running ECS task. The ID MUST be extracted from `task.arn`.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "10838bed-421f-43ef-870a-f43feacbbb5b", "23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd" }); - - /// The revision for the task definition. - pub const task_revision = types.StringAttribute.init( - "aws.ecs.task.revision", - "The revision for the task definition used to create the ECS task.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "8", "26" }); -}; - -/// Amazon S3 attributes -pub const S3Attributes = struct { - /// The S3 bucket name the request refers to. - pub const bucket = types.StringAttribute.init( - "aws.s3.bucket", - "The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the S3 API operations.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"some-bucket-name"}) - .withNote("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`."); - - /// The S3 object key the request refers to. - pub const key = types.StringAttribute.init( - "aws.s3.key", - "The S3 object key the request refers to. Corresponds to the `--key` parameter of the S3 API operations.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"someFile.yml"}) - .withNote("The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter."); - - /// The source object for the copy operation. - pub const copy_source = types.StringAttribute.init( - "aws.s3.copy_source", - "The source object (in the form `bucket`/`key`) for the copy operation.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"someFile.yml"}) - .withNote("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."); - - /// Upload ID that identifies the multipart upload. - pub const upload_id = types.StringAttribute.init( - "aws.s3.upload_id", - "Upload ID that identifies the multipart upload.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ"}) - .withNote("The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter of the S3 API multipart operations."); - - /// The part number of the part being uploaded in a multipart-upload operation. - pub const part_number = types.IntAttribute.init( - "aws.s3.part_number", - "The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.", - .experimental, - .recommended, - ).withExamples(&[_]i64{3456}) - .withNote("The `part_number` attribute is only applicable to the upload-part and upload-part-copy operations."); -}; - -/// Amazon Lambda attributes -pub const LambdaAttributes = struct { - /// The full invoked ARN as provided on the Context. - pub const invoked_arn = types.StringAttribute.init( - "aws.lambda.invoked_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).", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"arn:aws:lambda:us-east-1:123456:function:myfunction:myalias"}) - .withNote("This may be different from `cloud.resource_id` if an alias is involved."); - - /// The UUID of the AWS Lambda EventSource Mapping. - pub const resource_mapping_id = types.StringAttribute.init( - "aws.lambda.resource_mapping.id", - "The UUID of the AWS Lambda EventSource Mapping.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"587ad24b-03b9-4413-8202-bbd56b36e5b7"}); -}; - -/// Helper functions for AWS operations -pub const AwsUtils = struct { - /// Extract region from AWS ARN - pub fn extractRegionFromArn(arn: []const u8) ?[]const u8 { - // ARN format: arn:partition:service:region:account-id:resource - var parts = std.mem.split(u8, arn, ":"); - var i: u8 = 0; - while (parts.next()) |part| { - if (i == 3) { // Region is the 4th part (0-indexed) - if (part.len > 0) return part; - break; - } - i += 1; - } - return null; - } - - /// Extract service from AWS ARN - pub fn extractServiceFromArn(arn: []const u8) ?[]const u8 { - // ARN format: arn:partition:service:region:account-id:resource - var parts = std.mem.split(u8, arn, ":"); - var i: u8 = 0; - while (parts.next()) |part| { - if (i == 2) { // Service is the 3rd part (0-indexed) - if (part.len > 0) return part; - break; - } - i += 1; - } - return null; - } - - /// Extract account ID from AWS ARN - pub fn extractAccountIdFromArn(arn: []const u8) ?[]const u8 { - // ARN format: arn:partition:service:region:account-id:resource - var parts = std.mem.split(u8, arn, ":"); - var i: u8 = 0; - while (parts.next()) |part| { - if (i == 4) { // Account ID is the 5th part (0-indexed) - if (part.len > 0) return part; - break; - } - i += 1; - } - return null; - } - - /// Check if ARN is valid format - pub fn isValidArn(arn: []const u8) bool { - if (!std.mem.startsWith(u8, arn, "arn:")) return false; - - var parts = std.mem.split(u8, arn, ":"); - var count: u8 = 0; - while (parts.next()) |_| { - count += 1; - } - - // ARN should have at least 6 parts - return count >= 6; - } - - /// Extract ECS task ID from task ARN - pub fn extractEcsTaskId(task_arn: []const u8) ?[]const u8 { - // Format: arn:aws:ecs:region:account:task/cluster-name/task-id - // or: arn:aws:ecs:region:account:task/task-id - if (std.mem.lastIndexOf(u8, task_arn, "/")) |last_slash| { - return task_arn[last_slash + 1 ..]; - } - return null; - } -}; - -// Tests -test "AWS ARN parsing" { - const testing = std.testing; - - const arn = "arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b"; - - try testing.expect(AwsUtils.isValidArn(arn)); - try testing.expectEqualStrings("us-west-1", AwsUtils.extractRegionFromArn(arn).?); - try testing.expectEqualStrings("ecs", AwsUtils.extractServiceFromArn(arn).?); - try testing.expectEqualStrings("123456789123", AwsUtils.extractAccountIdFromArn(arn).?); - - try testing.expect(!AwsUtils.isValidArn("invalid-arn")); -} - -test "ECS task ID extraction" { - const testing = std.testing; - - const task_arn1 = "arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b"; - const task_arn2 = "arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"; - - try testing.expectEqualStrings("10838bed-421f-43ef-870a-f43feacbbb5b", AwsUtils.extractEcsTaskId(task_arn1).?); - try testing.expectEqualStrings("23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd", AwsUtils.extractEcsTaskId(task_arn2).?); -} - -test "AWS attribute definitions" { - const testing = std.testing; - - try testing.expectEqualStrings("aws.request_id", Attributes.request_id.name); - try testing.expectEqualStrings("aws.s3.bucket", S3Attributes.bucket.name); - try testing.expectEqualStrings("aws.ecs.launch_type", EcsAttributes.launch_type.base.name); -} diff --git a/src/azure/registry.zig b/src/azure/registry.zig deleted file mode 100644 index 1ece9ff..0000000 --- a/src/azure/registry.zig +++ /dev/null @@ -1,178 +0,0 @@ -//! Azure semantic conventions -//! -//! This module provides semantic convention attributes for Azure services instrumentation. -//! Based on OpenTelemetry Azure semantic conventions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Azure Client SDK attributes -pub const ClientSdkAttributes = struct { - /// The unique identifier of the service request. - pub const service_request_id = types.StringAttribute.init( - "azure.service.request.id", - "The unique identifier of the service request. It's generated by the Azure service and returned with the response.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{"00000000-0000-0000-0000-000000000000"}); - - /// Azure Resource Provider Namespace as recognized by the client. - pub const resource_provider_namespace = types.StringAttribute.init( - "azure.resource_provider.namespace", - "Azure Resource Provider Namespace as recognized by the client.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "Microsoft.Storage", "Microsoft.KeyVault", "Microsoft.ServiceBus" }); - - /// The unique identifier of the client instance. - pub const client_id = types.StringAttribute.init( - "azure.client.id", - "The unique identifier of the client instance.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "3ba4827d-4422-483f-b59f-85b74211c11d", "storage-client-1" }); -}; - -/// Azure Cosmos DB attributes -pub const CosmosDbAttributes = struct { - /// Cosmos client connection mode. - pub const connection_mode = types.EnumAttribute.init( - "azure.cosmosdb.connection.mode", - "Cosmos client connection mode.", - .experimental, - .recommended, - ).withMembers(&[_]types.EnumMember{ - .{ .value = "gateway", .brief = "Gateway (HTTP) connection.", .stability = .experimental }, - .{ .value = "direct", .brief = "Direct connection.", .stability = .experimental }, - }); - - /// The number of request units consumed by the operation. - pub const operation_request_charge = types.DoubleAttribute.init( - "azure.cosmosdb.operation.request_charge", - "The number of request units consumed by the operation.", - .experimental, - .recommended, - ).withExamples(&[_]f64{1.0}); - - /// List of regions contacted during the operation. - pub const regions_contacted = types.ArrayAttribute.init( - "azure.cosmosdb.regions_contacted", - .string, - "List of regions contacted during the operation. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call.", - .experimental, - .recommended, - ).withExamples(&[_][]const u8{ "North Central US", "Australia East", "Australia Southeast" }) - .withNote("Region name matches the format of `displayName` in Azure Location API"); - - /// Cosmos DB sub status code. - pub const response_sub_status_code = types.IntAttribute.init( - "azure.cosmosdb.response.sub_status_code", - "Cosmos DB sub status code.", - .experimental, - .recommended, - ).withExamples(&[_]i64{ 1000, 1002 }); - - /// Cosmos DB consistency level. - pub const consistency_level = types.EnumAttribute.init( - "azure.cosmosdb.consistency.level", - "Cosmos DB consistency level.", - .experimental, - .recommended, - ).withMembers(&[_]types.EnumMember{ - .{ .value = "Strong", .brief = "Strong", .stability = .experimental }, - .{ .value = "BoundedStaleness", .brief = "Bounded Staleness", .stability = .experimental }, - .{ .value = "Session", .brief = "Session", .stability = .experimental }, - .{ .value = "Eventual", .brief = "Eventual", .stability = .experimental }, - .{ .value = "ConsistentPrefix", .brief = "Consistent Prefix", .stability = .experimental }, - }).withExamples(&[_][]const u8{ "Eventual", "ConsistentPrefix", "BoundedStaleness", "Strong", "Session" }); -}; - -/// Helper functions for Azure operations -pub const AzureUtils = struct { - /// Check if a resource provider namespace is valid - pub fn isValidResourceProvider(namespace: []const u8) bool { - return std.mem.startsWith(u8, namespace, "Microsoft.") or - std.mem.startsWith(u8, namespace, "microsoft.") or - std.mem.indexOf(u8, namespace, ".") != null; - } - - /// Extract service name from resource provider namespace - pub fn extractServiceFromResourceProvider(namespace: []const u8) ?[]const u8 { - if (std.mem.indexOf(u8, namespace, ".")) |dot_idx| { - if (dot_idx + 1 < namespace.len) { - return namespace[dot_idx + 1 ..]; - } - } - return null; - } - - /// Check if Azure service request ID is valid UUID format - pub fn isValidServiceRequestId(request_id: []const u8) bool { - // Basic UUID format check: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - if (request_id.len != 36) return false; - - const dash_positions = [_]usize{ 8, 13, 18, 23 }; - for (dash_positions) |pos| { - if (request_id[pos] != '-') return false; - } - - for (request_id, 0..) |c, i| { - const is_dash_pos = for (dash_positions) |pos| { - if (i == pos) break true; - } else false; - - if (!is_dash_pos and !std.ascii.isHex(c)) { - return false; - } - } - - return true; - } - - /// Get recommended consistency level based on operation type - pub fn getRecommendedConsistencyLevel(operation_type: []const u8, read_heavy: bool) []const u8 { - if (std.mem.eql(u8, operation_type, "write") or std.mem.eql(u8, operation_type, "update")) { - return "Session"; // Good balance for write operations - } else if (read_heavy) { - return "Eventual"; // Better performance for read-heavy workloads - } else { - return "Session"; // Default balanced option - } - } -}; - -// Tests -test "Azure resource provider validation" { - const testing = std.testing; - - try testing.expect(AzureUtils.isValidResourceProvider("Microsoft.Storage")); - try testing.expect(AzureUtils.isValidResourceProvider("Microsoft.KeyVault")); - try testing.expect(!AzureUtils.isValidResourceProvider("InvalidProvider")); - - try testing.expectEqualStrings("Storage", AzureUtils.extractServiceFromResourceProvider("Microsoft.Storage").?); - try testing.expectEqualStrings("KeyVault", AzureUtils.extractServiceFromResourceProvider("Microsoft.KeyVault").?); -} - -test "Azure service request ID validation" { - const testing = std.testing; - - try testing.expect(AzureUtils.isValidServiceRequestId("00000000-0000-0000-0000-000000000000")); - try testing.expect(AzureUtils.isValidServiceRequestId("3ba4827d-4422-483f-b59f-85b74211c11d")); - try testing.expect(!AzureUtils.isValidServiceRequestId("invalid-uuid")); - try testing.expect(!AzureUtils.isValidServiceRequestId("3ba4827d-4422-483f-b59f-85b74211c11")); -} - -test "consistency level recommendations" { - const testing = std.testing; - - try testing.expectEqualStrings("Session", AzureUtils.getRecommendedConsistencyLevel("write", false)); - try testing.expectEqualStrings("Eventual", AzureUtils.getRecommendedConsistencyLevel("read", true)); - try testing.expectEqualStrings("Session", AzureUtils.getRecommendedConsistencyLevel("read", false)); -} - -test "Azure attribute definitions" { - const testing = std.testing; - - try testing.expectEqualStrings("azure.service.request.id", ClientSdkAttributes.service_request_id.name); - try testing.expectEqualStrings("azure.cosmosdb.connection.mode", CosmosDbAttributes.connection_mode.base.name); -} diff --git a/src/cassandra/cassandra.zig b/src/cassandra/cassandra.zig deleted file mode 100644 index 7eac125..0000000 --- a/src/cassandra/cassandra.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! cassandra semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/cassandra/registry.zig b/src/cassandra/registry.zig deleted file mode 100644 index 8081597..0000000 --- a/src/cassandra/registry.zig +++ /dev/null @@ -1,105 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: cassandra -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const consistencyLevelValue = enum { - /// 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, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .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", - }; - } -}; - -/// The data center of the coordinating node for a query. -pub const cassandra_coordinator_dc = types.StringAttribute{ - .name = "cassandra.coordinator.dc", - .brief = "The data center of the coordinating node for a query.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The ID of the coordinating node for a query. -pub const cassandra_coordinator_id = types.StringAttribute{ - .name = "cassandra.coordinator.id", - .brief = "The ID of the coordinating node for a query.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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). -pub const cassandra_consistency_level = types.EnumAttribute(consistencyLevelValue){ - .base = types.StringAttribute{ - .name = "cassandra.consistency.level", - .brief = "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).", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = consistencyLevelValue.all, -}; - -/// Whether or not the query is idempotent. -pub const cassandra_query_idempotent = types.StringAttribute{ - .name = "cassandra.query.idempotent", - .brief = "Whether or not the query is idempotent.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The fetch size used for paging, i.e. how many rows will be returned at once. -pub const cassandra_page_size = types.StringAttribute{ - .name = "cassandra.page.size", - .brief = "The fetch size used for paging, i.e. how many rows will be returned at once.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. -pub const cassandra_speculative_execution_count = types.StringAttribute{ - .name = "cassandra.speculative_execution.count", - .brief = "The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/client/client.zig b/src/client/client.zig deleted file mode 100644 index 432c231..0000000 --- a/src/client/client.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! client semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/client/registry.zig b/src/client/registry.zig deleted file mode 100644 index 440eaa5..0000000 --- a/src/client/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: client -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. -pub const client_address = types.StringAttribute{ - .name = "client.address", - .brief = "Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", - .note = "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.", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// Client port number. -pub const client_port = types.StringAttribute{ - .name = "client.port", - .brief = "Client port number.", - .note = "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.\n\n", - .stability = .stable, - .requirement_level = .recommended, -}; - diff --git a/src/cloud/cloud.zig b/src/cloud/cloud.zig deleted file mode 100644 index 7084e68..0000000 --- a/src/cloud/cloud.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! cloud semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/cloud/registry.zig b/src/cloud/registry.zig deleted file mode 100644 index 1ec55af..0000000 --- a/src/cloud/registry.zig +++ /dev/null @@ -1,197 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: cloud -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const providerValue = enum { - /// Alibaba Cloud - alibaba_cloud, - /// Amazon Web Services - aws, - /// Microsoft Azure - azure, - /// Google Cloud Platform - gcp, - /// Heroku Platform as a Service - heroku, - /// IBM Cloud - ibm_cloud, - /// Oracle Cloud Infrastructure (OCI) - oracle_cloud, - /// Tencent Cloud - tencent_cloud, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .alibaba_cloud => "alibaba_cloud", - .aws => "aws", - .azure => "azure", - .gcp => "gcp", - .heroku => "heroku", - .ibm_cloud => "ibm_cloud", - .oracle_cloud => "oracle_cloud", - .tencent_cloud => "tencent_cloud", - }; - } -}; - -pub const platformValue = enum { - /// Alibaba Cloud Elastic Compute Service - alibaba_cloud_ecs, - /// Alibaba Cloud Function Compute - alibaba_cloud_fc, - /// Red Hat OpenShift on Alibaba Cloud - alibaba_cloud_openshift, - /// AWS Elastic Compute Cloud - aws_ec2, - /// AWS Elastic Container Service - aws_ecs, - /// AWS Elastic Kubernetes Service - aws_eks, - /// AWS Lambda - aws_lambda, - /// AWS Elastic Beanstalk - aws_elastic_beanstalk, - /// AWS App Runner - aws_app_runner, - /// Red Hat OpenShift on AWS (ROSA) - aws_openshift, - /// Azure Virtual Machines - azure_vm, - /// Azure Container Apps - azure_container_apps, - /// Azure Container Instances - azure_container_instances, - /// Azure Kubernetes Service - azure_aks, - /// Azure Functions - azure_functions, - /// Azure App Service - azure_app_service, - /// Azure Red Hat OpenShift - azure_openshift, - /// Google Bare Metal Solution (BMS) - gcp_bare_metal_solution, - /// Google Cloud Compute Engine (GCE) - gcp_compute_engine, - /// Google Cloud Run - gcp_cloud_run, - /// Google Cloud Kubernetes Engine (GKE) - gcp_kubernetes_engine, - /// Google Cloud Functions (GCF) - gcp_cloud_functions, - /// Google Cloud App Engine (GAE) - gcp_app_engine, - /// Red Hat OpenShift on Google Cloud - gcp_openshift, - /// Red Hat OpenShift on IBM Cloud - ibm_cloud_openshift, - /// Compute on Oracle Cloud Infrastructure (OCI) - oracle_cloud_compute, - /// Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI) - oracle_cloud_oke, - /// Tencent Cloud Cloud Virtual Machine (CVM) - tencent_cloud_cvm, - /// Tencent Cloud Elastic Kubernetes Service (EKS) - tencent_cloud_eks, - /// Tencent Cloud Serverless Cloud Function (SCF) - tencent_cloud_scf, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .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", - .oracle_cloud_compute => "oracle_cloud_compute", - .oracle_cloud_oke => "oracle_cloud_oke", - .tencent_cloud_cvm => "tencent_cloud_cvm", - .tencent_cloud_eks => "tencent_cloud_eks", - .tencent_cloud_scf => "tencent_cloud_scf", - }; - } -}; - -/// Name of the cloud provider. -pub const cloud_provider = types.EnumAttribute(providerValue){ - .base = types.StringAttribute{ - .name = "cloud.provider", - .brief = "Name of the cloud provider.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = providerValue.alibaba_cloud, -}; - -/// The cloud account ID the resource is assigned to. -pub const cloud_account_id = types.StringAttribute{ - .name = "cloud.account.id", - .brief = "The cloud account ID the resource is assigned to.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. -pub const cloud_region = types.StringAttribute{ - .name = "cloud.region", - .brief = "The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed.", - .note = "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).", - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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://google.aip.dev/122 -pub const cloud_resource_id = types.StringAttribute{ - .name = "cloud.resource_id", - .brief = "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://google.aip.dev/122", - .note = "On some cloud providers, it may not be possible to determine the full ID at startup,\nso it may be necessary to set `cloud.resource_id` as a span attribute instead.\n\nThe exact value to use for `cloud.resource_id` depends on the cloud provider.\nThe following well-known definitions MUST be used if you set this attribute and they apply:\n\n- **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\nTake care not to use the \"invoked ARN\" directly but replace any\n[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)\nwith the resolved function version, as the same runtime instance may be invocable with\nmultiple different aliases.\n- **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n- **Azure:** The [Fully Qualified Resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function,\n*not* the function app, having the form\n`/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`.\nThis means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share\na TracerProvider.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. -pub const cloud_availability_zone = types.StringAttribute{ - .name = "cloud.availability_zone", - .brief = "Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.", - .note = "Availability zones are called \"zones\" on Alibaba Cloud and Google Cloud.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The cloud platform in use. -pub const cloud_platform = types.EnumAttribute(platformValue){ - .base = types.StringAttribute{ - .name = "cloud.platform", - .brief = "The cloud platform in use.", - .note = "The prefix of the service SHOULD match the one specified in `cloud.provider`.\n\n", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = platformValue.alibaba_cloud_ecs, -}; - diff --git a/src/cloudevents/cloudevents.zig b/src/cloudevents/cloudevents.zig deleted file mode 100644 index 6b263c1..0000000 --- a/src/cloudevents/cloudevents.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! cloudevents semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/cloudevents/registry.zig b/src/cloudevents/registry.zig deleted file mode 100644 index e635bc4..0000000 --- a/src/cloudevents/registry.zig +++ /dev/null @@ -1,52 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: cloudevents -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md -pub const cloudevents_event_id = types.StringAttribute{ - .name = "cloudevents.event_id", - .brief = "The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md -pub const cloudevents_event_source = types.StringAttribute{ - .name = "cloudevents.event_source", - .brief = "The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md -pub const cloudevents_event_spec_version = types.StringAttribute{ - .name = "cloudevents.event_spec_version", - .brief = "The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md -pub const cloudevents_event_type = types.StringAttribute{ - .name = "cloudevents.event_type", - .brief = "The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md -pub const cloudevents_event_subject = types.StringAttribute{ - .name = "cloudevents.event_subject", - .brief = "The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/cloudfoundry/cloudfoundry.zig b/src/cloudfoundry/cloudfoundry.zig deleted file mode 100644 index 75ce1d5..0000000 --- a/src/cloudfoundry/cloudfoundry.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! cloudfoundry semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/cloudfoundry/registry.zig b/src/cloudfoundry/registry.zig deleted file mode 100644 index 9fa9ec4..0000000 --- a/src/cloudfoundry/registry.zig +++ /dev/null @@ -1,106 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: cloudfoundry -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// A guid or another name describing the event source. -pub const cloudfoundry_system_id = types.StringAttribute{ - .name = "cloudfoundry.system.id", - .brief = "A guid or another name describing the event source.", - .note = "CloudFoundry defines the `source_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api\nIt is used for logs and metrics emitted by CloudFoundry. It is\nsupposed to contain the component name, e.g. \"gorouter\", for\nCloudFoundry components.\n\nWhen system components are instrumented, values from the\n[Bosh spec](https://bosh.io/docs/jobs/\nshould be used. The `system.id` should be set to\n`spec.deployment/spec.name`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// A guid describing the concrete instance of the event source. -pub const cloudfoundry_system_instance_id = types.StringAttribute{ - .name = "cloudfoundry.system.instance.id", - .brief = "A guid describing the concrete instance of the event source.", - .note = "CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api\nIt is used for logs and metrics emitted by CloudFoundry. It is\nsupposed to contain the vm id for CloudFoundry components.\n\nWhen system components are instrumented, values from the\n[Bosh spec](https://bosh.io/docs/jobs/\nshould be used. The `system.instance.id` should be set to `spec.id`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the application. -pub const cloudfoundry_app_name = types.StringAttribute{ - .name = "cloudfoundry.app.name", - .brief = "The name of the application.", - .note = "Application instrumentation should use the value from environment\nvariable `VCAP_APPLICATION.application_name`. This is the same value\nas reported by `cf apps`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The guid of the application. -pub const cloudfoundry_app_id = types.StringAttribute{ - .name = "cloudfoundry.app.id", - .brief = "The guid of the application.", - .note = "Application instrumentation should use the value from environment\nvariable `VCAP_APPLICATION.application_id`. This is the same value as\nreported by `cf app --guid`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The index of the application instance. 0 when just one instance is active. -pub const cloudfoundry_app_instance_id = types.StringAttribute{ - .name = "cloudfoundry.app.instance.id", - .brief = "The index of the application instance. 0 when just one instance is active.", - .note = "CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api\nIt is used for logs and metrics emitted by CloudFoundry. It is\nsupposed to contain the application instance index for applications\ndeployed on the runtime.\n\nApplication instrumentation should use the value from environment\nvariable `CF_INSTANCE_INDEX`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the CloudFoundry space the application is running in. -pub const cloudfoundry_space_name = types.StringAttribute{ - .name = "cloudfoundry.space.name", - .brief = "The name of the CloudFoundry space the application is running in.", - .note = "Application instrumentation should use the value from environment\nvariable `VCAP_APPLICATION.space_name`. This is the same value as\nreported by `cf spaces`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The guid of the CloudFoundry space the application is running in. -pub const cloudfoundry_space_id = types.StringAttribute{ - .name = "cloudfoundry.space.id", - .brief = "The guid of the CloudFoundry space the application is running in.", - .note = "Application instrumentation should use the value from environment\nvariable `VCAP_APPLICATION.space_id`. This is the same value as\nreported by `cf space --guid`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the CloudFoundry organization the app is running in. -pub const cloudfoundry_org_name = types.StringAttribute{ - .name = "cloudfoundry.org.name", - .brief = "The name of the CloudFoundry organization the app is running in.", - .note = "Application instrumentation should use the value from environment\nvariable `VCAP_APPLICATION.org_name`. This is the same value as\nreported by `cf orgs`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The guid of the CloudFoundry org the application is running in. -pub const cloudfoundry_org_id = types.StringAttribute{ - .name = "cloudfoundry.org.id", - .brief = "The guid of the CloudFoundry org the application is running in.", - .note = "Application instrumentation should use the value from environment\nvariable `VCAP_APPLICATION.org_id`. This is the same value as\nreported by `cf org --guid`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID identifying the process. -pub const cloudfoundry_process_id = types.StringAttribute{ - .name = "cloudfoundry.process.id", - .brief = "The UID identifying the process.", - .note = "Application instrumentation should use the value from environment\nvariable `VCAP_APPLICATION.process_id`. It is supposed to be equal to\n`VCAP_APPLICATION.app_id` for applications deployed to the runtime.\nFor system components, this could be the actual PID.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The type of process. -pub const cloudfoundry_process_type = types.StringAttribute{ - .name = "cloudfoundry.process.type", - .brief = "The type of process.", - .note = "CloudFoundry applications can consist of multiple jobs. Usually the\nmain process will be of type `web`. There can be additional background\ntasks or side-cars with different process types.", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/container/registry.zig b/src/container/registry.zig deleted file mode 100644 index 29e4557..0000000 --- a/src/container/registry.zig +++ /dev/null @@ -1,135 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: container -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// A container instance. -/// Display name: Container Attributes -pub const Container = enum { - /// Container name used by container runtime. - name, - /// Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. - id, - /// The container runtime managing this container. - runtimeName, - /// The version of the runtime of this process, as returned by the runtime without modification. - runtimeVersion, - /// A description about the runtime which could include, for example details about the CRI/API version being used or other customisations. - runtimeDescription, - /// Name of the image the container was built on. - imageName, - /// 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:`. - imageTags, - /// Runtime specific image identifier. Usually a hash algorithm followed by a UUID. - imageId, - /// Repo digests of the container image as provided by the container runtime. - imageRepoDigests, - /// The full command run by the container as a single string representing the full command. - commandLine, - /// All the command arguments (including the command/executable itself) run by the container. - commandArgs, - /// Container labels, `` being the label name, the value being the label value. - label, - /// The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin. - csiPluginName, - - /// Returns the StringAttribute for this container attribute - pub fn attribute(self: @This()) types.StringAttribute { - return switch (self) { - .name => - types.StringAttribute.init( - "container.name", - "Container name used by container runtime.", - .development, - .recommended, - ), - .id => - types.StringAttribute.init( - "container.id", - "Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated.", - .development, - .recommended, - ), - .runtimeName => - types.StringAttribute.init( - "container.runtime.name", - "The container runtime managing this container.", - .development, - .recommended, - ), - .runtimeVersion => - types.StringAttribute.init( - "container.runtime.version", - "The version of the runtime of this process, as returned by the runtime without modification.", - .development, - .recommended, - ), - .runtimeDescription => - types.StringAttribute.init( - "container.runtime.description", - "A description about the runtime which could include, for example details about the CRI/API version being used or other customisations.", - .development, - .recommended, - ), - .imageName => - types.StringAttribute.init( - "container.image.name", - "Name of the image the container was built on.", - .development, - .recommended, - ), - .imageTags => - types.StringAttribute.init( - "container.image.tags", - "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:`.", - .development, - .recommended, - ), - .imageId => - types.StringAttribute.init( - "container.image.id", - "Runtime specific image identifier. Usually a hash algorithm followed by a UUID.", - .development, - .recommended, - ), - .imageRepoDigests => - types.StringAttribute.init( - "container.image.repo_digests", - "Repo digests of the container image as provided by the container runtime.", - .development, - .recommended, - ).withNote("If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage."), - .commandLine => - types.StringAttribute.init( - "container.command_line", - "The full command run by the container as a single string representing the full command.", - .development, - .recommended, - ), - .commandArgs => - types.StringAttribute.init( - "container.command_args", - "All the command arguments (including the command/executable itself) run by the container.", - .development, - .recommended, - ), - .label => - types.StringAttribute.init( - "container.label", - "Container labels, `` being the label name, the value being the label value.", - .development, - .recommended, - ), - .csiPluginName => - types.StringAttribute.init( - "container.csi.plugin.name", - "The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin.", - .development, - .recommended, - ), - }; - } -}; - diff --git a/src/cpu/cpu.zig b/src/cpu/cpu.zig deleted file mode 100644 index c101f6a..0000000 --- a/src/cpu/cpu.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! cpu semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/cpu/registry.zig b/src/cpu/registry.zig deleted file mode 100644 index e40e157..0000000 --- a/src/cpu/registry.zig +++ /dev/null @@ -1,60 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: cpu -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const modeValue = enum { - /// User - user, - /// System - system, - /// Nice - nice, - /// Idle - idle, - /// IO Wait - iowait, - /// Interrupt - interrupt, - /// Steal - steal, - /// Kernel - kernel, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .user => "user", - .system => "system", - .nice => "nice", - .idle => "idle", - .iowait => "iowait", - .interrupt => "interrupt", - .steal => "steal", - .kernel => "kernel", - }; - } -}; - -/// The mode of the CPU -pub const cpu_mode = types.EnumAttribute(modeValue){ - .base = types.StringAttribute{ - .name = "cpu.mode", - .brief = "The mode of the CPU", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = modeValue.user, -}; - -/// The logical CPU number [0..n-1] -pub const cpu_logical_number = types.StringAttribute{ - .name = "cpu.logical_number", - .brief = "The logical CPU number [0..n-1]", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/cpython/cpython.zig b/src/cpython/cpython.zig deleted file mode 100644 index f82809f..0000000 --- a/src/cpython/cpython.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! cpython semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/cpython/registry.zig b/src/cpython/registry.zig deleted file mode 100644 index 2b88f5c..0000000 --- a/src/cpython/registry.zig +++ /dev/null @@ -1,36 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: cpython -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const gcGenerationValue = enum { - /// Generation 0 - generation_0, - /// Generation 1 - generation_1, - /// Generation 2 - generation_2, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .generation_0 => "", - .generation_1 => "", - .generation_2 => "", - }; - } -}; - -/// Value of the garbage collector collection generation. -pub const cpython_gc_generation = types.EnumAttribute(gcGenerationValue){ - .base = types.StringAttribute{ - .name = "cpython.gc.generation", - .brief = "Value of the garbage collector collection generation.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = gcGenerationValue.generation_0, -}; - diff --git a/src/database/registry.zig b/src/database/registry.zig deleted file mode 100644 index 8caa9e9..0000000 --- a/src/database/registry.zig +++ /dev/null @@ -1,288 +0,0 @@ -//! Database semantic conventions -//! -//! This module provides semantic convention attributes for database instrumentation. -//! Based on OpenTelemetry database semantic conventions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Database attribute registry -pub const Attributes = struct { - /// The name of a collection (table, container) within the database. - pub const collection_name = types.StringAttribute.init( - "db.collection.name", - "The name of a collection (table, container) within the database.", - .stable, - .recommended, - ).withNote("It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. " ++ - "The collection name SHOULD NOT be extracted from `db.query.text`, when the database system supports query text with multiple collections " ++ - "in non-batch operations.") - .withExamples(&[_][]const u8{ "public.users", "customers" }); - - /// The name of the database, fully qualified within the server address and port. - pub const namespace = types.StringAttribute.init( - "db.namespace", - "The name of the database, fully qualified within the server address and port.", - .stable, - .recommended, - ).withNote("If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, " ++ - "using `|` as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted.") - .withExamples(&[_][]const u8{ "customers", "test.users" }); - - /// The name of the operation or command being executed. - pub const operation_name = types.StringAttribute.init( - "db.operation.name", - "The name of the operation or command being executed.", - .stable, - .recommended, - ).withNote("It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. " ++ - "The operation name SHOULD NOT be extracted from `db.query.text`, when the database system supports query text with multiple operations " ++ - "in non-batch operations.") - .withExamples(&[_][]const u8{ "findAndModify", "HMSET", "SELECT" }); - - /// The database query being executed. - pub const query_text = types.StringAttribute.init( - "db.query.text", - "The database query being executed.", - .stable, - .recommended, - ).withNote("For sanitization see Sanitization of `db.query.text`. 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.") - .withExamples(&[_][]const u8{ "SELECT * FROM wuser_table where username = ?", "SET mykey ?" }); - - /// Low cardinality summary of a database query. - pub const query_summary = types.StringAttribute.init( - "db.query.summary", - "Low cardinality summary of a database query.", - .stable, - .recommended, - ).withNote("The query summary describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database " ++ - "calls involving complex queries.") - .withExamples(&[_][]const u8{ "SELECT wuser_table", "INSERT shipping_details SELECT orders", "get user by id" }); - - /// The name of a stored procedure within the database. - pub const stored_procedure_name = types.StringAttribute.init( - "db.stored_procedure.name", - "The name of a stored procedure within the database.", - .stable, - .recommended, - ).withNote("It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.") - .withExamples(&[_][]const u8{"GetCustomer"}); - - /// The number of queries included in a batch operation. - pub const operation_batch_size = types.IntAttribute.init( - "db.operation.batch.size", - "The number of queries included in a batch operation.", - .stable, - .recommended, - ).withNote("Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.") - .withExamples(&[_]i64{ 2, 3, 4 }); - - /// Database response status code. - pub const response_status_code = types.StringAttribute.init( - "db.response.status_code", - "Database response status code.", - .stable, - .recommended, - ).withNote("The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, " ++ - "or differentiate between various types of successful outcomes.") - .withExamples(&[_][]const u8{ "102", "ORA-17002", "08P01", "404" }); - - /// Number of rows returned by the operation. - pub const response_returned_rows = types.IntAttribute.init( - "db.response.returned_rows", - "Number of rows returned by the operation.", - .experimental, - .recommended, - ).withExamples(&[_]i64{ 10, 30, 1000 }); - - /// The database management system (DBMS) product as identified by the client instrumentation. - pub const system_name = types.EnumAttribute.init( - "db.system.name", - "The database management system (DBMS) product as identified by the client instrumentation.", - .stable, - .required, - ).withMembers(&[_]types.EnumMember{ - .{ .value = "other_sql", .brief = "Some other SQL database. Fallback only.", .stability = .experimental }, - .{ .value = "aws.dynamodb", .brief = "Amazon DynamoDB", .stability = .experimental }, - .{ .value = "aws.redshift", .brief = "Amazon Redshift", .stability = .experimental }, - .{ .value = "azure.cosmosdb", .brief = "Azure Cosmos DB", .stability = .experimental }, - .{ .value = "cassandra", .brief = "Apache Cassandra", .stability = .experimental }, - .{ .value = "clickhouse", .brief = "ClickHouse", .stability = .experimental }, - .{ .value = "cockroachdb", .brief = "CockroachDB", .stability = .experimental }, - .{ .value = "couchbase", .brief = "Couchbase", .stability = .experimental }, - .{ .value = "couchdb", .brief = "Apache CouchDB", .stability = .experimental }, - .{ .value = "derby", .brief = "Apache Derby", .stability = .experimental }, - .{ .value = "elasticsearch", .brief = "Elasticsearch", .stability = .experimental }, - .{ .value = "firebird", .brief = "Firebird", .stability = .experimental }, - .{ .value = "h2", .brief = "H2", .stability = .experimental }, - .{ .value = "hbase", .brief = "Apache HBase", .stability = .experimental }, - .{ .value = "hive", .brief = "Apache Hive", .stability = .experimental }, - .{ .value = "hsqldb", .brief = "HyperSQL DataBase", .stability = .experimental }, - .{ .value = "influxdb", .brief = "InfluxDB", .stability = .experimental }, - .{ .value = "mariadb", .brief = "MariaDB", .stability = .stable }, - .{ .value = "memcached", .brief = "Memcached", .stability = .experimental }, - .{ .value = "mongodb", .brief = "MongoDB", .stability = .stable }, - .{ .value = "mssql", .brief = "Microsoft SQL Server", .stability = .stable }, - .{ .value = "mysql", .brief = "MySQL", .stability = .stable }, - .{ .value = "neo4j", .brief = "Neo4j", .stability = .experimental }, - .{ .value = "opensearch", .brief = "OpenSearch", .stability = .experimental }, - .{ .value = "oracle.db", .brief = "Oracle Database", .stability = .experimental }, - .{ .value = "postgresql", .brief = "PostgreSQL", .stability = .stable }, - .{ .value = "redis", .brief = "Redis", .stability = .experimental }, - .{ .value = "sap.hana", .brief = "SAP HANA", .stability = .experimental }, - .{ .value = "sqlite", .brief = "SQLite", .stability = .experimental }, - .{ .value = "teradata", .brief = "Teradata", .stability = .experimental }, - .{ .value = "trino", .brief = "Trino", .stability = .experimental }, - }).withNote("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.name` is set to `postgresql` based on the instrumentation's best knowledge."); - - /// Database client connection state. - pub const client_connection_state = types.EnumAttribute.init( - "db.client.connection.state", - "The state of a connection in the pool", - .experimental, - .recommended, - ).withMembers(&[_]types.EnumMember{ - .{ .value = "idle", .brief = "The connection is idle", .stability = .experimental }, - .{ .value = "used", .brief = "The connection is used", .stability = .experimental }, - }); - - /// The name of the connection pool. - pub const client_connection_pool_name = types.StringAttribute.init( - "db.client.connection.pool.name", - "The name of the connection pool; unique within the instrumented application.", - .experimental, - .recommended, - ).withNote("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`.") - .withExamples(&[_][]const u8{"myDataSource"}); -}; - -/// Database semantic convention group -pub const Group = types.AttributeGroup{ - .id = "registry.db", - .brief = "This group defines the attributes used to describe telemetry in the context of databases.", - .stability = .stable, -}; - -/// Helper functions for database operations -pub const DatabaseUtils = struct { - /// Check if a database system name is a SQL-based system - pub fn isSqlSystem(system: []const u8) bool { - const sql_systems = [_][]const u8{ "mysql", "postgresql", "mssql", "oracle.db", "sqlite", "mariadb", "h2", "hsqldb", "derby", "cockroachdb", "teradata" }; - - for (sql_systems) |sql_system| { - if (std.mem.eql(u8, system, sql_system)) { - return true; - } - } - - return false; - } - - /// Check if a database system name is a NoSQL system - pub fn isNoSqlSystem(system: []const u8) bool { - const nosql_systems = [_][]const u8{ "mongodb", "cassandra", "redis", "memcached", "couchdb", "couchbase", "neo4j", "elasticsearch", "opensearch", "hbase" }; - - for (nosql_systems) |nosql_system| { - if (std.mem.eql(u8, system, nosql_system)) { - return true; - } - } - - return false; - } - - /// Check if a database system is cloud-native - pub fn isCloudNative(system: []const u8) bool { - return std.mem.startsWith(u8, system, "aws.") or - std.mem.startsWith(u8, system, "azure.") or - std.mem.startsWith(u8, system, "gcp."); - } - - /// Sanitize query text by removing potential sensitive information - pub fn sanitizeQueryText(allocator: std.mem.Allocator, query: []const u8) ![]const u8 { - // Basic sanitization - replace string literals with placeholders - var result = std.ArrayList(u8).init(allocator); - defer result.deinit(); - - var in_string = false; - var quote_char: u8 = 0; - var i: usize = 0; - - while (i < query.len) { - const c = query[i]; - - if (!in_string and (c == '\'' or c == '"')) { - // Start of string literal - in_string = true; - quote_char = c; - try result.append(c); - try result.appendSlice("?"); - i += 1; - - // Skip to end of string - while (i < query.len and query[i] != quote_char) { - i += 1; - } - if (i < query.len) { - try result.append(quote_char); - i += 1; - } - in_string = false; - } else { - try result.append(c); - i += 1; - } - } - - return result.toOwnedSlice(); - } -}; - -// Tests -test "database system classification" { - const testing = std.testing; - - // Test SQL systems - try testing.expect(DatabaseUtils.isSqlSystem("mysql")); - try testing.expect(DatabaseUtils.isSqlSystem("postgresql")); - try testing.expect(DatabaseUtils.isSqlSystem("mssql")); - try testing.expect(!DatabaseUtils.isSqlSystem("mongodb")); - - // Test NoSQL systems - try testing.expect(DatabaseUtils.isNoSqlSystem("mongodb")); - try testing.expect(DatabaseUtils.isNoSqlSystem("redis")); - try testing.expect(DatabaseUtils.isNoSqlSystem("cassandra")); - try testing.expect(!DatabaseUtils.isNoSqlSystem("mysql")); - - // Test cloud-native systems - try testing.expect(DatabaseUtils.isCloudNative("aws.dynamodb")); - try testing.expect(DatabaseUtils.isCloudNative("azure.cosmosdb")); - try testing.expect(!DatabaseUtils.isCloudNative("mysql")); -} - -test "database attribute definitions" { - const testing = std.testing; - - try testing.expectEqualStrings("db.collection.name", Attributes.collection_name.name); - try testing.expectEqualStrings("db.namespace", Attributes.namespace.name); - try testing.expectEqualStrings("db.operation.name", Attributes.operation_name.name); - try testing.expectEqualStrings("db.system.name", Attributes.system_name.base.name); - - // Test stability levels - try testing.expectEqual(types.StabilityLevel.stable, Attributes.collection_name.stability); - try testing.expectEqual(types.StabilityLevel.stable, Attributes.system_name.base.stability); -} - -test "query sanitization" { - const testing = std.testing; - const allocator = testing.allocator; - - const sanitized = try DatabaseUtils.sanitizeQueryText(allocator, "SELECT * FROM users WHERE name = 'john'"); - defer allocator.free(sanitized); - - try testing.expectEqualStrings("SELECT * FROM users WHERE name = '?'", sanitized); -} diff --git a/src/demo/registry.zig b/src/demo/registry.zig deleted file mode 100644 index bdfb868..0000000 --- a/src/demo/registry.zig +++ /dev/null @@ -1,36 +0,0 @@ -//! Demo semantic conventions for OpenTelemetry -//! Generated from test_app_simple.yaml - -const std = @import("std"); -const types = @import("../types.zig"); - -// Test attributes - -/// A unique identifier -pub const APP_INSTALLATION_ID = types.Attribute([]const u8) - .init(.{ - .name = "app.installation.id", - .type = []const u8, - .brief = "A unique identifier", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - }); - -/// A number of frame renders -pub const APP_JANK_FRAME_COUNT = types.Attribute(i64) - .init(.{ - .name = "app.jank.frame_count", - .type = i64, - .brief = "A number of frame renders", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - }); - - -/// Demo semantic convention registry -pub const DEMORegistry = struct { - // Test attributes - pub const app_installation_id = APP_INSTALLATION_ID; - pub const app_jank_frame_count = APP_JANK_FRAME_COUNT; - -}; diff --git a/src/deployment/deployment.zig b/src/deployment/deployment.zig deleted file mode 100644 index 33b0856..0000000 --- a/src/deployment/deployment.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! deployment semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/deployment/registry.zig b/src/deployment/registry.zig deleted file mode 100644 index 1f47070..0000000 --- a/src/deployment/registry.zig +++ /dev/null @@ -1,60 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: deployment -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const statusValue = enum { - /// failed - failed, - /// succeeded - succeeded, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .failed => "failed", - .succeeded => "succeeded", - }; - } -}; - -/// The name of the deployment. -pub const deployment_name = types.StringAttribute{ - .name = "deployment.name", - .brief = "The name of the deployment.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The id of the deployment. -pub const deployment_id = types.StringAttribute{ - .name = "deployment.id", - .brief = "The id of the deployment.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The status of the deployment. -pub const deployment_status = types.EnumAttribute(statusValue){ - .base = types.StringAttribute{ - .name = "deployment.status", - .brief = "The status of the deployment.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = statusValue.failed, -}; - -/// Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). -pub const deployment_environment_name = types.StringAttribute{ - .name = "deployment.environment.name", - .brief = "Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier).", - .note = "`deployment.environment.name` does not affect the uniqueness constraints defined through\nthe `service.namespace`, `service.name` and `service.instance.id` resource attributes.\nThis implies that resources carrying the following attribute combinations MUST be\nconsidered to be identifying the same service:\n\n- `service.name=frontend`, `deployment.environment.name=production`\n- `service.name=frontend`, `deployment.environment.name=staging`.", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/destination/destination.zig b/src/destination/destination.zig deleted file mode 100644 index f933e1e..0000000 --- a/src/destination/destination.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! destination semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/destination/registry.zig b/src/destination/registry.zig deleted file mode 100644 index 41d7653..0000000 --- a/src/destination/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: destination -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. -pub const destination_address = types.StringAttribute{ - .name = "destination.address", - .brief = "Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", - .note = "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.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Destination port number -pub const destination_port = types.StringAttribute{ - .name = "destination.port", - .brief = "Destination port number", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/device/device.zig b/src/device/device.zig deleted file mode 100644 index e90b303..0000000 --- a/src/device/device.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! device semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/device/registry.zig b/src/device/registry.zig deleted file mode 100644 index c77739e..0000000 --- a/src/device/registry.zig +++ /dev/null @@ -1,43 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: device -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// A unique identifier representing the device -pub const device_id = types.StringAttribute{ - .name = "device.id", - .brief = "A unique identifier representing the device", - .note = "Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is uninstalled and re-installed.\nHowever, it might be resettable by the user for all apps on a device.\nHardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as values.\n\nMore information about Android identifier best practices can be found in the [Android user data IDs guide](https://developer.android.com/training/articles/user-data-ids).\n\n> [!WARNING]\n>\n> This attribute may contain sensitive (PII) information. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply,\n> ensure you do your own due diligence.\n>\n> Due to these reasons, this identifier is not recommended for consumer applications and will likely result in rejection from both Google Play and App Store.\n> However, it may be appropriate for specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with appropriate compliance clearance.\n> Any instrumentation providing this identifier MUST implement it as an opt-in feature.\n>\n> See [`app.installation.id`](/docs/registry/attributes/app.md", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the device manufacturer -pub const device_manufacturer = types.StringAttribute{ - .name = "device.manufacturer", - .brief = "The name of the device manufacturer", - .note = "The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build iOS apps SHOULD hardcode the value `Apple`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The model identifier for the device -pub const device_model_identifier = types.StringAttribute{ - .name = "device.model.identifier", - .brief = "The model identifier for the device", - .note = "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.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The marketing name for the device model -pub const device_model_name = types.StringAttribute{ - .name = "device.model.name", - .brief = "The marketing name for the device model", - .note = "It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative.", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/disk/disk.zig b/src/disk/disk.zig deleted file mode 100644 index e5a7470..0000000 --- a/src/disk/disk.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! disk semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/disk/registry.zig b/src/disk/registry.zig deleted file mode 100644 index 8260aaf..0000000 --- a/src/disk/registry.zig +++ /dev/null @@ -1,33 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: disk -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const ioDirectionValue = enum { - /// - read, - /// - write, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .read => "read", - .write => "write", - }; - } -}; - -/// The disk IO operation direction. -pub const disk_io_direction = types.EnumAttribute(ioDirectionValue){ - .base = types.StringAttribute{ - .name = "disk.io.direction", - .brief = "The disk IO operation direction.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = ioDirectionValue.read, -}; - diff --git a/src/dotnet/dotnet.zig b/src/dotnet/dotnet.zig deleted file mode 100644 index 31e1e17..0000000 --- a/src/dotnet/dotnet.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! dotnet semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/dotnet/registry.zig b/src/dotnet/registry.zig deleted file mode 100644 index 4870610..0000000 --- a/src/dotnet/registry.zig +++ /dev/null @@ -1,42 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: dotnet -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const gcHeapGenerationValue = enum { - /// Generation 0 - gen0, - /// Generation 1 - gen1, - /// Generation 2 - gen2, - /// Large Object Heap - loh, - /// Pinned Object Heap - poh, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .gen0 => "gen0", - .gen1 => "gen1", - .gen2 => "gen2", - .loh => "loh", - .poh => "poh", - }; - } -}; - -/// Name of the garbage collector managed heap generation. -pub const dotnet_gc_heap_generation = types.EnumAttribute(gcHeapGenerationValue){ - .base = types.StringAttribute{ - .name = "dotnet.gc.heap.generation", - .brief = "Name of the garbage collector managed heap generation.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, - }, - .well_known_values = gcHeapGenerationValue.gen0, -}; - diff --git a/src/elasticsearch/elasticsearch.zig b/src/elasticsearch/elasticsearch.zig deleted file mode 100644 index a9e4882..0000000 --- a/src/elasticsearch/elasticsearch.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! elasticsearch semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/elasticsearch/registry.zig b/src/elasticsearch/registry.zig deleted file mode 100644 index 02bc3eb..0000000 --- a/src/elasticsearch/registry.zig +++ /dev/null @@ -1,16 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: elasticsearch -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Represents the human-readable identifier of the node/instance to which a request was routed. -pub const elasticsearch_node_name = types.StringAttribute{ - .name = "elasticsearch.node.name", - .brief = "Represents the human-readable identifier of the node/instance to which a request was routed.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/enduser/enduser.zig b/src/enduser/enduser.zig deleted file mode 100644 index 3f1ac8d..0000000 --- a/src/enduser/enduser.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! enduser semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/enduser/registry.zig b/src/enduser/registry.zig deleted file mode 100644 index 7465fca..0000000 --- a/src/enduser/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: enduser -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Unique identifier of an end user in the system. It maybe a username, email address, or other identifier. -pub const enduser_id = types.StringAttribute{ - .name = "enduser.id", - .brief = "Unique identifier of an end user in the system. It maybe a username, email address, or other identifier.", - .note = "Unique identifier of an end user in the system.\n\n> [!Warning]\n> This field contains sensitive (PII) information.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity. -pub const enduser_pseudo_id = types.StringAttribute{ - .name = "enduser.pseudo.id", - .brief = "Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity.", - .note = "Pseudonymous identifier of an end user.\n\n> [!Warning]\n> This field contains sensitive (linkable PII) information.", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/error/error.zig b/src/error/error.zig deleted file mode 100644 index 19124f0..0000000 --- a/src/error/error.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! error semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/error/registry.zig b/src/error/registry.zig deleted file mode 100644 index 6ee986d..0000000 --- a/src/error/registry.zig +++ /dev/null @@ -1,39 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: error -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const typeValue = enum { - /// A fallback error value to be used when the instrumentation doesn't define a custom value. - other, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .other => "_OTHER", - }; - } -}; - -/// Describes a class of error the operation ended with. -pub const error_type = types.EnumAttribute(typeValue){ - .base = types.StringAttribute{ - .name = "error.type", - .brief = "Describes a class of error the operation ended with.", - .note = "The `error.type` SHOULD be predictable, and SHOULD have low cardinality.\n\nWhen `error.type` is set to a type (e.g., an exception type), its\ncanonical class name identifying the type within the artifact SHOULD be used.\n\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n- Use a domain-specific attribute\n- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.", - .stability = .stable, - .requirement_level = .recommended, - }, - .well_known_values = typeValue.other, -}; - -/// A message providing more detail about an error in human-readable form. -pub const error_message = types.StringAttribute{ - .name = "error.message", - .brief = "A message providing more detail about an error in human-readable form.", - .note = "`error.message` should provide additional context and detail about an error.\nIt is NOT RECOMMENDED to duplicate the value of `error.type` in `error.message`.\nIt is also NOT RECOMMENDED to duplicate the value of `exception.message` in `error.message`.\n\n`error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded cardinality and overlap with span status.\n", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/event/event.zig b/src/event/event.zig deleted file mode 100644 index 098f046..0000000 --- a/src/event/event.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! event semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/event/registry.zig b/src/event/registry.zig deleted file mode 100644 index 5c2667d..0000000 --- a/src/event/registry.zig +++ /dev/null @@ -1,16 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: event -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Identifies the class / type of event. -pub const event_name = types.StringAttribute{ - .name = "event.name", - .brief = "Identifies the class / type of event.", - .note = "This attribute SHOULD be used by non-OTLP exporters when destination does not support `EventName` or equivalent field. This attribute MAY be used by applications using existing logging libraries so that it can be used to set the `EventName` field by Collector or SDK components.", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/faas/faas.zig b/src/faas/faas.zig deleted file mode 100644 index e1cf077..0000000 --- a/src/faas/faas.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! faas semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/faas/registry.zig b/src/faas/registry.zig deleted file mode 100644 index 59e14e4..0000000 --- a/src/faas/registry.zig +++ /dev/null @@ -1,223 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: faas -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const triggerValue = enum { - /// A response to some data source operation such as a database or filesystem read/write - datasource, - /// To provide an answer to an inbound HTTP request - http, - /// A function is set to be executed when messages are sent to a messaging system - pubsub, - /// A function is scheduled to be executed regularly - timer, - /// If none of the others apply - other, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .datasource => "datasource", - .http => "http", - .pubsub => "pubsub", - .timer => "timer", - .other => "other", - }; - } -}; - -pub const invokedProviderValue = enum { - /// Alibaba Cloud - alibaba_cloud, - /// Amazon Web Services - aws, - /// Microsoft Azure - azure, - /// Google Cloud Platform - gcp, - /// Tencent Cloud - tencent_cloud, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .alibaba_cloud => "alibaba_cloud", - .aws => "aws", - .azure => "azure", - .gcp => "gcp", - .tencent_cloud => "tencent_cloud", - }; - } -}; - -pub const documentOperationValue = enum { - /// When a new object is created. - insert, - /// When an object is modified. - edit, - /// When an object is deleted. - delete, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .insert => "insert", - .edit => "edit", - .delete => "delete", - }; - } -}; - -/// The name of the single function that this runtime instance executes. -pub const faas_name = types.StringAttribute{ - .name = "faas.name", - .brief = "The name of the single function that this runtime instance executes.", - .note = "This is the name of the function as configured/deployed on the FaaS\nplatform and is usually different from the name of the callback\nfunction (which may be stored in the\n[`code.namespace`/`code.function.name`](/docs/general/attributes.md\nspan attributes).\n\nFor some cloud providers, the above definition is ambiguous. The following\ndefinition of function name MUST be used for this attribute\n(and consequently the span name) for the listed cloud providers/products:\n\n- **Azure:** The full name `/`, i.e., function app name\nfollowed by a forward slash followed by the function name (this form\ncan also be seen in the resource JSON for the function).\nThis means that a span attribute MUST be used, as an Azure function\napp can host multiple functions that would usually share\na TracerProvider (see also the `cloud.resource_id` attribute).", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The immutable version of the function being executed. -pub const faas_version = types.StringAttribute{ - .name = "faas.version", - .brief = "The immutable version of the function being executed.", - .note = "Depending on the cloud provider and platform, use:\n\n- **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n(an integer represented as a decimal string).\n- **Google Cloud Run (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n(i.e., the function name plus the revision suffix).\n- **Google Cloud Functions:** The value of the\n[`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var\n- **Azure Functions:** Not applicable. Do not set this attribute.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. -pub const faas_instance = types.StringAttribute{ - .name = "faas.instance", - .brief = "The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.", - .note = "- **AWS Lambda:** Use the (full) log stream name.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The amount of memory available to the serverless function converted to Bytes. -pub const faas_max_memory = types.StringAttribute{ - .name = "faas.max_memory", - .brief = "The amount of memory available to the serverless function converted to Bytes.", - .note = "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).", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Type of the trigger which caused this function invocation. -pub const faas_trigger = types.EnumAttribute(triggerValue){ - .base = types.StringAttribute{ - .name = "faas.trigger", - .brief = "Type of the trigger which caused this function invocation.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = triggerValue.datasource, -}; - -/// The name of the invoked function. -pub const faas_invoked_name = types.StringAttribute{ - .name = "faas.invoked_name", - .brief = "The name of the invoked function.", - .note = "SHOULD be equal to the `faas.name` resource attribute of the invoked function.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The cloud provider of the invoked function. -pub const faas_invoked_provider = types.EnumAttribute(invokedProviderValue){ - .base = types.StringAttribute{ - .name = "faas.invoked_provider", - .brief = "The cloud provider of the invoked function.", - .note = "SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = invokedProviderValue.alibaba_cloud, -}; - -/// The cloud region of the invoked function. -pub const faas_invoked_region = types.StringAttribute{ - .name = "faas.invoked_region", - .brief = "The cloud region of the invoked function.", - .note = "SHOULD be equal to the `cloud.region` resource attribute of the invoked function.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The invocation ID of the current function invocation. -pub const faas_invocation_id = types.StringAttribute{ - .name = "faas.invocation_id", - .brief = "The invocation ID of the current function invocation.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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). -pub const faas_time = types.StringAttribute{ - .name = "faas.time", - .brief = "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).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). -pub const faas_cron = types.StringAttribute{ - .name = "faas.cron", - .brief = "A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// A boolean that is true if the serverless function is executed for the first time (aka cold-start). -pub const faas_coldstart = types.StringAttribute{ - .name = "faas.coldstart", - .brief = "A boolean that is true if the serverless function is executed for the first time (aka cold-start).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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. -pub const faas_document_collection = types.StringAttribute{ - .name = "faas.document.collection", - .brief = "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.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Describes the type of the operation that was performed on the data. -pub const faas_document_operation = types.EnumAttribute(documentOperationValue){ - .base = types.StringAttribute{ - .name = "faas.document.operation", - .brief = "Describes the type of the operation that was performed on the data.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = documentOperationValue.insert, -}; - -/// 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). -pub const faas_document_time = types.StringAttribute{ - .name = "faas.document.time", - .brief = "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).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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. -pub const faas_document_name = types.StringAttribute{ - .name = "faas.document.name", - .brief = "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.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/geo/geo.zig b/src/geo/geo.zig deleted file mode 100644 index 65a2df2..0000000 --- a/src/geo/geo.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! geo semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/geo/registry.zig b/src/geo/registry.zig deleted file mode 100644 index d572890..0000000 --- a/src/geo/registry.zig +++ /dev/null @@ -1,102 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: geo -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const continentCodeValue = enum { - /// Africa - af, - /// Antarctica - an, - /// Asia - as, - /// Europe - eu, - /// North America - na, - /// Oceania - oc, - /// South America - sa, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .af => "AF", - .an => "AN", - .as => "AS", - .eu => "EU", - .na => "NA", - .oc => "OC", - .sa => "SA", - }; - } -}; - -/// Locality name. Represents the name of a city, town, village, or similar populated place. -pub const geo_locality_name = types.StringAttribute{ - .name = "geo.locality.name", - .brief = "Locality name. Represents the name of a city, town, village, or similar populated place.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Two-letter code representing continent’s name. -pub const geo_continent_code = types.EnumAttribute(continentCodeValue){ - .base = types.StringAttribute{ - .name = "geo.continent.code", - .brief = "Two-letter code representing continent’s name.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = continentCodeValue.af, -}; - -/// Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1 -pub const geo_country_iso_code = types.StringAttribute{ - .name = "geo.country.iso_code", - .brief = "Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System -pub const geo_location_lon = types.StringAttribute{ - .name = "geo.location.lon", - .brief = "Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System -pub const geo_location_lat = types.StringAttribute{ - .name = "geo.location.lat", - .brief = "Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. -pub const geo_postal_code = types.StringAttribute{ - .name = "geo.postal_code", - .brief = "Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)). -pub const geo_region_iso_code = types.StringAttribute{ - .name = "geo.region.iso_code", - .brief = "Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/go/go.zig b/src/go/go.zig deleted file mode 100644 index ee8913f..0000000 --- a/src/go/go.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! go semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/go/registry.zig b/src/go/registry.zig deleted file mode 100644 index 2d54957..0000000 --- a/src/go/registry.zig +++ /dev/null @@ -1,33 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: go -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const memoryTypeValue = enum { - /// Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use. - stack, - /// Memory used by the Go runtime, excluding other categories of memory usage described in this enumeration. - other, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .stack => "stack", - .other => "other", - }; - } -}; - -/// The type of memory. -pub const go_memory_type = types.EnumAttribute(memoryTypeValue){ - .base = types.StringAttribute{ - .name = "go.memory.type", - .brief = "The type of memory.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = memoryTypeValue.stack, -}; - diff --git a/src/graphql/graphql.zig b/src/graphql/graphql.zig deleted file mode 100644 index 6ba1a34..0000000 --- a/src/graphql/graphql.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! graphql semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/graphql/registry.zig b/src/graphql/registry.zig deleted file mode 100644 index 915783c..0000000 --- a/src/graphql/registry.zig +++ /dev/null @@ -1,54 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: graphql -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const operationTypeValue = enum { - /// GraphQL query - query, - /// GraphQL mutation - mutation, - /// GraphQL subscription - subscription, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .query => "query", - .mutation => "mutation", - .subscription => "subscription", - }; - } -}; - -/// The name of the operation being executed. -pub const graphql_operation_name = types.StringAttribute{ - .name = "graphql.operation.name", - .brief = "The name of the operation being executed.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The type of the operation being executed. -pub const graphql_operation_type = types.EnumAttribute(operationTypeValue){ - .base = types.StringAttribute{ - .name = "graphql.operation.type", - .brief = "The type of the operation being executed.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = operationTypeValue.query, -}; - -/// The GraphQL document being executed. -pub const graphql_document = types.StringAttribute{ - .name = "graphql.document", - .brief = "The GraphQL document being executed.", - .note = "The value may be sanitized to exclude sensitive information.", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/heroku/heroku.zig b/src/heroku/heroku.zig deleted file mode 100644 index 1facb07..0000000 --- a/src/heroku/heroku.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! heroku semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/heroku/registry.zig b/src/heroku/registry.zig deleted file mode 100644 index 9df4020..0000000 --- a/src/heroku/registry.zig +++ /dev/null @@ -1,34 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: heroku -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Time and date the release was created -pub const heroku_release_creation_timestamp = types.StringAttribute{ - .name = "heroku.release.creation_timestamp", - .brief = "Time and date the release was created", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Commit hash for the current release -pub const heroku_release_commit = types.StringAttribute{ - .name = "heroku.release.commit", - .brief = "Commit hash for the current release", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Unique identifier for the application -pub const heroku_app_id = types.StringAttribute{ - .name = "heroku.app.id", - .brief = "Unique identifier for the application", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/http/http.zig b/src/http/http.zig deleted file mode 100644 index 2c73f1c..0000000 --- a/src/http/http.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! http semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/http/registry.zig b/src/http/registry.zig deleted file mode 100644 index 3b46718..0000000 --- a/src/http/registry.zig +++ /dev/null @@ -1,176 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: http -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const requestMethodValue = enum { - /// CONNECT method. - connect, - /// DELETE method. - delete, - /// GET method. - get, - /// HEAD method. - head, - /// OPTIONS method. - options, - /// PATCH method. - patch, - /// POST method. - post, - /// PUT method. - put, - /// TRACE method. - trace, - /// QUERY method. - query, - /// Any HTTP method that the instrumentation has no prior knowledge of. - other, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .connect => "CONNECT", - .delete => "DELETE", - .get => "GET", - .head => "HEAD", - .options => "OPTIONS", - .patch => "PATCH", - .post => "POST", - .put => "PUT", - .trace => "TRACE", - .query => "QUERY", - .other => "_OTHER", - }; - } -}; - -pub const connectionStateValue = enum { - /// active state. - active, - /// idle state. - idle, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .active => "active", - .idle => "idle", - }; - } -}; - -/// 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 header. For requests using transport encoding, this should be the compressed size. -pub const http_request_body_size = types.StringAttribute{ - .name = "http.request.body.size", - .brief = "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 header. For requests using transport encoding, this should be the compressed size.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. -pub const http_request_header = types.StringAttribute{ - .name = "http.request.header", - .brief = "HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values.", - .note = "Instrumentations SHOULD require an explicit configuration of which headers are to be captured.\nIncluding all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\n\nThe `User-Agent` header is already captured in the `user_agent.original` attribute.\nUsers MAY explicitly configure instrumentations to capture them even though it is not recommended.\n\nThe attribute value MUST consist of either multiple header values as an array of strings\nor a single-item array containing a possibly comma-concatenated string, depending on the way\nthe HTTP library provides access to headers.\n\nExamples:\n\n- A header `Content-Type: application/json` SHOULD be recorded as the `http.request.header.content-type`\nattribute with value `[\"application/json\"]`.\n- A header `X-Forwarded-For: 1.2.3.4, 1.2.3.5` SHOULD be recorded as the `http.request.header.x-forwarded-for`\nattribute with value `[\"1.2.3.4\", \"1.2.3.5\"]` or `[\"1.2.3.4, 1.2.3.5\"]` depending on the HTTP library.\n", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// HTTP request method. -pub const http_request_method = types.EnumAttribute(requestMethodValue){ - .base = types.StringAttribute{ - .name = "http.request.method", - .brief = "HTTP request method.", - .note = "HTTP request method value SHOULD be \"known\" to the instrumentation.\nBy default, this convention defines \"known\" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html\nthe PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html)\nand the QUERY method defined in [httpbis-safe-method-w-body](https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/?include_text=1).\n\nIf the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`.\n\nIf the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override\nthe list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named\nOTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods\n(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).\n\nHTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.\nInstrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.\nTracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.", - .stability = .stable, - .requirement_level = .recommended, - }, - .well_known_values = requestMethodValue.connect, -}; - -/// Original HTTP method sent by the client in the request line. -pub const http_request_method_original = types.StringAttribute{ - .name = "http.request.method_original", - .brief = "Original HTTP method sent by the client in the request line.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, -}; - -/// The ordinal number of request resending attempt (for any reason, including redirects). -pub const http_request_resend_count = types.StringAttribute{ - .name = "http.request.resend_count", - .brief = "The ordinal number of request resending attempt (for any reason, including redirects).", - .note = "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).", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// 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. -pub const http_request_size = types.StringAttribute{ - .name = "http.request.size", - .brief = "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.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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 header. For requests using transport encoding, this should be the compressed size. -pub const http_response_body_size = types.StringAttribute{ - .name = "http.response.body.size", - .brief = "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 header. For requests using transport encoding, this should be the compressed size.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. -pub const http_response_header = types.StringAttribute{ - .name = "http.response.header", - .brief = "HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values.", - .note = "Instrumentations SHOULD require an explicit configuration of which headers are to be captured.\nIncluding all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\n\nUsers MAY explicitly configure instrumentations to capture them even though it is not recommended.\n\nThe attribute value MUST consist of either multiple header values as an array of strings\nor a single-item array containing a possibly comma-concatenated string, depending on the way\nthe HTTP library provides access to headers.\n\nExamples:\n\n- A header `Content-Type: application/json` header SHOULD be recorded as the `http.request.response.content-type`\nattribute with value `[\"application/json\"]`.\n- A header `My-custom-header: abc, def` header SHOULD be recorded as the `http.response.header.my-custom-header`\nattribute with value `[\"abc\", \"def\"]` or `[\"abc, def\"]` depending on the HTTP library.", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// 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. -pub const http_response_size = types.StringAttribute{ - .name = "http.response.size", - .brief = "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.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). -pub const http_response_status_code = types.StringAttribute{ - .name = "http.response.status_code", - .brief = "[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).", - .note = null, - .stability = .stable, - .requirement_level = .recommended, -}; - -/// The matched route template for the request. This MUST be low-cardinality and include all static path segments, with dynamic path segments represented with placeholders. -pub const http_route = types.StringAttribute{ - .name = "http.route", - .brief = "The matched route template for the request. This MUST be low-cardinality and include all static path segments, with dynamic path segments represented with placeholders.", - .note = "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.\nSHOULD include the [application root](/docs/http/http-spans.md\n\nA static path segment is a part of the route template with a fixed, low-cardinality value. This includes literal strings like `/users/` and placeholders that\nare constrained to a finite, predefined set of values, e.g. `{controller}` or `{action}`.\n\nA dynamic path segment is a placeholder for a value that can have high cardinality and is not constrained to a predefined list like static path segments.\n\nInstrumentations SHOULD use routing information provided by the corresponding web framework. They SHOULD pick the most precise source of routing information and MAY\nsupport custom route formatting. Instrumentations SHOULD document the format and the API used to obtain the route string.", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// State of the HTTP connection in the HTTP connection pool. -pub const http_connection_state = types.EnumAttribute(connectionStateValue){ - .base = types.StringAttribute{ - .name = "http.connection.state", - .brief = "State of the HTTP connection in the HTTP connection pool.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = connectionStateValue.active, -}; - diff --git a/src/ios/ios.zig b/src/ios/ios.zig deleted file mode 100644 index 24bbbff..0000000 --- a/src/ios/ios.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! ios semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/ios/registry.zig b/src/ios/registry.zig deleted file mode 100644 index b9123d4..0000000 --- a/src/ios/registry.zig +++ /dev/null @@ -1,42 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: ios -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const appStateValue = enum { - /// The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`. - active, - /// The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`. - inactive, - /// The app is now in the background. This value is associated with UIKit notification `applicationDidEnterBackground`. - background, - /// The app is now in the foreground. This value is associated with UIKit notification `applicationWillEnterForeground`. - foreground, - /// The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`. - terminate, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .active => "active", - .inactive => "inactive", - .background => "background", - .foreground => "foreground", - .terminate => "terminate", - }; - } -}; - -/// This attribute represents the state of the application. -pub const ios_app_state = types.EnumAttribute(appStateValue){ - .base = types.StringAttribute{ - .name = "ios.app.state", - .brief = "This attribute represents the state of the application.", - .note = "The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = appStateValue.active, -}; - diff --git a/src/jvm/jvm.zig b/src/jvm/jvm.zig deleted file mode 100644 index 1ccf4eb..0000000 --- a/src/jvm/jvm.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! jvm semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/jvm/registry.zig b/src/jvm/registry.zig deleted file mode 100644 index deac928..0000000 --- a/src/jvm/registry.zig +++ /dev/null @@ -1,125 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: jvm -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const memoryTypeValue = enum { - /// Heap memory. - heap, - /// Non-heap memory - non_heap, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .heap => "heap", - .non_heap => "non_heap", - }; - } -}; - -pub const threadStateValue = enum { - /// A thread that has not yet started is in this state. - new, - /// A thread executing in the Java virtual machine is in this state. - runnable, - /// A thread that is blocked waiting for a monitor lock is in this state. - blocked, - /// A thread that is waiting indefinitely for another thread to perform a particular action is in this state. - waiting, - /// A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state. - timed_waiting, - /// A thread that has exited is in this state. - terminated, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .new => "new", - .runnable => "runnable", - .blocked => "blocked", - .waiting => "waiting", - .timed_waiting => "timed_waiting", - .terminated => "terminated", - }; - } -}; - -/// Name of the garbage collector action. -pub const jvm_gc_action = types.StringAttribute{ - .name = "jvm.gc.action", - .brief = "Name of the garbage collector action.", - .note = "Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// Name of the garbage collector cause. -pub const jvm_gc_cause = types.StringAttribute{ - .name = "jvm.gc.cause", - .brief = "Name of the garbage collector cause.", - .note = "Garbage collector cause is generally obtained via [GarbageCollectionNotificationInfo", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Name of the garbage collector. -pub const jvm_gc_name = types.StringAttribute{ - .name = "jvm.gc.name", - .brief = "Name of the garbage collector.", - .note = "Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// The type of memory. -pub const jvm_memory_type = types.EnumAttribute(memoryTypeValue){ - .base = types.StringAttribute{ - .name = "jvm.memory.type", - .brief = "The type of memory.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, - }, - .well_known_values = memoryTypeValue.heap, -}; - -/// Name of the memory pool. -pub const jvm_memory_pool_name = types.StringAttribute{ - .name = "jvm.memory.pool.name", - .brief = "Name of the memory pool.", - .note = "Pool names are generally obtained via [MemoryPoolMXBean", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// Whether the thread is daemon or not. -pub const jvm_thread_daemon = types.StringAttribute{ - .name = "jvm.thread.daemon", - .brief = "Whether the thread is daemon or not.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, -}; - -/// State of the thread. -pub const jvm_thread_state = types.EnumAttribute(threadStateValue){ - .base = types.StringAttribute{ - .name = "jvm.thread.state", - .brief = "State of the thread.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, - }, - .well_known_values = threadStateValue.new, -}; - -/// Name of the buffer pool. -pub const jvm_buffer_pool_name = types.StringAttribute{ - .name = "jvm.buffer.pool.name", - .brief = "Name of the buffer pool.", - .note = "Pool names are generally obtained via [BufferPoolMXBean\n\n", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/k8s/k8s.zig b/src/k8s/k8s.zig deleted file mode 100644 index 258f672..0000000 --- a/src/k8s/k8s.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! k8s semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/k8s/registry.zig b/src/k8s/registry.zig deleted file mode 100644 index 90c2deb..0000000 --- a/src/k8s/registry.zig +++ /dev/null @@ -1,697 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: k8s -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const volumeTypeValue = enum { - /// A [persistentVolumeClaim](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim) volume - persistent_volume_claim, - /// A [configMap](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#configmap) volume - config_map, - /// A [downwardAPI](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#downwardapi) volume - downward_api, - /// An [emptyDir](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#emptydir) volume - empty_dir, - /// A [secret](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#secret) volume - secret, - /// A [local](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#local) volume - local, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .persistent_volume_claim => "persistentVolumeClaim", - .config_map => "configMap", - .downward_api => "downwardAPI", - .empty_dir => "emptyDir", - .secret => "secret", - .local => "local", - }; - } -}; - -pub const namespacePhaseValue = enum { - /// Active namespace phase as described by [K8s API](https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase) - active, - /// Terminating namespace phase as described by [K8s API](https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase) - terminating, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .active => "active", - .terminating => "terminating", - }; - } -}; - -pub const nodeConditionTypeValue = enum { - /// The node is healthy and ready to accept pods - ready, - /// Pressure exists on the disk size—that is, if the disk capacity is low - disk_pressure, - /// Pressure exists on the node memory—that is, if the node memory is low - memory_pressure, - /// Pressure exists on the processes—that is, if there are too many processes on the node - pid_pressure, - /// The network for the node is not correctly configured - network_unavailable, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .ready => "Ready", - .disk_pressure => "DiskPressure", - .memory_pressure => "MemoryPressure", - .pid_pressure => "PIDPressure", - .network_unavailable => "NetworkUnavailable", - }; - } -}; - -pub const nodeConditionStatusValue = enum { - /// - condition_true, - /// - condition_false, - /// - condition_unknown, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .condition_true => "", - .condition_false => "", - .condition_unknown => "unknown", - }; - } -}; - -pub const containerStatusStateValue = enum { - /// The container has terminated. - terminated, - /// The container is running. - running, - /// The container is waiting. - waiting, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .terminated => "terminated", - .running => "running", - .waiting => "waiting", - }; - } -}; - -pub const containerStatusReasonValue = enum { - /// The container is being created. - container_creating, - /// The container is in a crash loop back off state. - crash_loop_back_off, - /// There was an error creating the container configuration. - create_container_config_error, - /// There was an error pulling the container image. - err_image_pull, - /// The container image pull is in back off state. - image_pull_back_off, - /// The container was killed due to out of memory. - oom_killed, - /// The container has completed execution. - completed, - /// There was an error with the container. - @"error", - /// The container cannot run. - container_cannot_run, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .container_creating => "ContainerCreating", - .crash_loop_back_off => "CrashLoopBackOff", - .create_container_config_error => "CreateContainerConfigError", - .err_image_pull => "ErrImagePull", - .image_pull_back_off => "ImagePullBackOff", - .oom_killed => "OOMKilled", - .completed => "Completed", - .@"error" => "Error", - .container_cannot_run => "ContainerCannotRun", - }; - } -}; - -/// The name of the cluster. -pub const k8s_cluster_name = types.StringAttribute{ - .name = "k8s.cluster.name", - .brief = "The name of the cluster.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. -pub const k8s_cluster_uid = types.StringAttribute{ - .name = "k8s.cluster.uid", - .brief = "A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace.", - .note = "K8s doesn't have support for obtaining a cluster ID. If this is ever\nadded, we will recommend collecting the `k8s.cluster.uid` through the\nofficial APIs. In the meantime, we are able to use the `uid` of the\n`kube-system` namespace as a proxy for cluster ID. Read on for the\nrationale.\n\nEvery object created in a K8s cluster is assigned a distinct UID. The\n`kube-system` namespace is used by Kubernetes itself and will exist\nfor the lifetime of the cluster. Using the `uid` of the `kube-system`\nnamespace is a reasonable proxy for the K8s ClusterID as it will only\nchange if the cluster is rebuilt. Furthermore, Kubernetes UIDs are\nUUIDs as standardized by\n[ISO/IEC 9834-8 and ITU-T X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).\nWhich states:\n\n> If generated according to one of the mechanisms defined in Rec.\n> ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be\n> different from all other UUIDs generated before 3603 A.D., or is\n> extremely likely to be different (depending on the mechanism chosen).\n\nTherefore, UIDs between clusters should be extremely unlikely to\nconflict.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the Node. -pub const k8s_node_name = types.StringAttribute{ - .name = "k8s.node.name", - .brief = "The name of the Node.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the Node. -pub const k8s_node_uid = types.StringAttribute{ - .name = "k8s.node.uid", - .brief = "The UID of the Node.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the Node, the `` being the label name, the value being the label value, even if the value is empty. -pub const k8s_node_label = types.StringAttribute{ - .name = "k8s.node.label", - .brief = "The label placed on the Node, the `` being the label name, the value being the label value, even if the value is empty.", - .note = "Examples:\n\n- A label `kubernetes.io/arch` with value `arm64` SHOULD be recorded\nas the `k8s.node.label.kubernetes.io/arch` attribute with value `\"arm64\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.node.label.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The annotation placed on the Node, the `` being the annotation name, the value being the annotation value, even if the value is empty. -pub const k8s_node_annotation = types.StringAttribute{ - .name = "k8s.node.annotation", - .brief = "The annotation placed on the Node, the `` being the annotation name, the value being the annotation value, even if the value is empty.", - .note = "Examples:\n\n- An annotation `node.alpha.kubernetes.io/ttl` with value `0` SHOULD be recorded as\nthe `k8s.node.annotation.node.alpha.kubernetes.io/ttl` attribute with value `\"0\"`.\n- An annotation `data` with empty string value SHOULD be recorded as\nthe `k8s.node.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the namespace that the pod is running in. -pub const k8s_namespace_name = types.StringAttribute{ - .name = "k8s.namespace.name", - .brief = "The name of the namespace that the pod is running in.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the Namespace, the `` being the label name, the value being the label value, even if the value is empty. -pub const k8s_namespace_label = types.StringAttribute{ - .name = "k8s.namespace.label", - .brief = "The label placed on the Namespace, the `` being the label name, the value being the label value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `kubernetes.io/metadata.name` with value `default` SHOULD be recorded\nas the `k8s.namespace.label.kubernetes.io/metadata.name` attribute with value `\"default\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.namespace.label.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The annotation placed on the Namespace, the `` being the annotation name, the value being the annotation value, even if the value is empty. -pub const k8s_namespace_annotation = types.StringAttribute{ - .name = "k8s.namespace.annotation", - .brief = "The annotation placed on the Namespace, the `` being the annotation name, the value being the annotation value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `ttl` with value `0` SHOULD be recorded\nas the `k8s.namespace.annotation.ttl` attribute with value `\"0\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.namespace.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the Pod. -pub const k8s_pod_uid = types.StringAttribute{ - .name = "k8s.pod.uid", - .brief = "The UID of the Pod.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the Pod. -pub const k8s_pod_name = types.StringAttribute{ - .name = "k8s.pod.name", - .brief = "The name of the Pod.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the Pod, the `` being the label name, the value being the label value. -pub const k8s_pod_label = types.StringAttribute{ - .name = "k8s.pod.label", - .brief = "The label placed on the Pod, the `` being the label name, the value being the label value.", - .note = "Examples:\n\n- A label `app` with value `my-app` SHOULD be recorded as\nthe `k8s.pod.label.app` attribute with value `\"my-app\"`.\n- A label `mycompany.io/arch` with value `x64` SHOULD be recorded as\nthe `k8s.pod.label.mycompany.io/arch` attribute with value `\"x64\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.pod.label.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The annotation placed on the Pod, the `` being the annotation name, the value being the annotation value. -pub const k8s_pod_annotation = types.StringAttribute{ - .name = "k8s.pod.annotation", - .brief = "The annotation placed on the Pod, the `` being the annotation name, the value being the annotation value.", - .note = "Examples:\n\n- An annotation `kubernetes.io/enforce-mountable-secrets` with value `true` SHOULD be recorded as\nthe `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets` attribute with value `\"true\"`.\n- An annotation `mycompany.io/arch` with value `x64` SHOULD be recorded as\nthe `k8s.pod.annotation.mycompany.io/arch` attribute with value `\"x64\"`.\n- An annotation `data` with empty string value SHOULD be recorded as\nthe `k8s.pod.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). -pub const k8s_container_name = types.StringAttribute{ - .name = "k8s.container.name", - .brief = "The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. -pub const k8s_container_restart_count = types.StringAttribute{ - .name = "k8s.container.restart_count", - .brief = "Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Last terminated reason of the Container. -pub const k8s_container_status_last_terminated_reason = types.StringAttribute{ - .name = "k8s.container.status.last_terminated_reason", - .brief = "Last terminated reason of the Container.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the ReplicaSet. -pub const k8s_replicaset_uid = types.StringAttribute{ - .name = "k8s.replicaset.uid", - .brief = "The UID of the ReplicaSet.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the ReplicaSet. -pub const k8s_replicaset_name = types.StringAttribute{ - .name = "k8s.replicaset.name", - .brief = "The name of the ReplicaSet.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the ReplicaSet, the `` being the label name, the value being the label value, even if the value is empty. -pub const k8s_replicaset_label = types.StringAttribute{ - .name = "k8s.replicaset.label", - .brief = "The label placed on the ReplicaSet, the `` being the label name, the value being the label value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `app` with value `guestbook` SHOULD be recorded\nas the `k8s.replicaset.label.app` attribute with value `\"guestbook\"`.\n- A label `injected` with empty string value SHOULD be recorded as\nthe `k8s.replicaset.label.injected` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The annotation placed on the ReplicaSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. -pub const k8s_replicaset_annotation = types.StringAttribute{ - .name = "k8s.replicaset.annotation", - .brief = "The annotation placed on the ReplicaSet, the `` being the annotation name, the value being the annotation value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `replicas` with value `0` SHOULD be recorded\nas the `k8s.replicaset.annotation.replicas` attribute with value `\"0\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.replicaset.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the replication controller. -pub const k8s_replicationcontroller_uid = types.StringAttribute{ - .name = "k8s.replicationcontroller.uid", - .brief = "The UID of the replication controller.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the replication controller. -pub const k8s_replicationcontroller_name = types.StringAttribute{ - .name = "k8s.replicationcontroller.name", - .brief = "The name of the replication controller.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the resource quota. -pub const k8s_resourcequota_uid = types.StringAttribute{ - .name = "k8s.resourcequota.uid", - .brief = "The UID of the resource quota.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the resource quota. -pub const k8s_resourcequota_name = types.StringAttribute{ - .name = "k8s.resourcequota.name", - .brief = "The name of the resource quota.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the Deployment. -pub const k8s_deployment_uid = types.StringAttribute{ - .name = "k8s.deployment.uid", - .brief = "The UID of the Deployment.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the Deployment. -pub const k8s_deployment_name = types.StringAttribute{ - .name = "k8s.deployment.name", - .brief = "The name of the Deployment.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the Deployment, the `` being the label name, the value being the label value, even if the value is empty. -pub const k8s_deployment_label = types.StringAttribute{ - .name = "k8s.deployment.label", - .brief = "The label placed on the Deployment, the `` being the label name, the value being the label value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `replicas` with value `0` SHOULD be recorded\nas the `k8s.deployment.label.app` attribute with value `\"guestbook\"`.\n- A label `injected` with empty string value SHOULD be recorded as\nthe `k8s.deployment.label.injected` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The annotation placed on the Deployment, the `` being the annotation name, the value being the annotation value, even if the value is empty. -pub const k8s_deployment_annotation = types.StringAttribute{ - .name = "k8s.deployment.annotation", - .brief = "The annotation placed on the Deployment, the `` being the annotation name, the value being the annotation value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `replicas` with value `1` SHOULD be recorded\nas the `k8s.deployment.annotation.replicas` attribute with value `\"1\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.deployment.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the StatefulSet. -pub const k8s_statefulset_uid = types.StringAttribute{ - .name = "k8s.statefulset.uid", - .brief = "The UID of the StatefulSet.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the StatefulSet. -pub const k8s_statefulset_name = types.StringAttribute{ - .name = "k8s.statefulset.name", - .brief = "The name of the StatefulSet.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the StatefulSet, the `` being the label name, the value being the label value, even if the value is empty. -pub const k8s_statefulset_label = types.StringAttribute{ - .name = "k8s.statefulset.label", - .brief = "The label placed on the StatefulSet, the `` being the label name, the value being the label value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `replicas` with value `0` SHOULD be recorded\nas the `k8s.statefulset.label.app` attribute with value `\"guestbook\"`.\n- A label `injected` with empty string value SHOULD be recorded as\nthe `k8s.statefulset.label.injected` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The annotation placed on the StatefulSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. -pub const k8s_statefulset_annotation = types.StringAttribute{ - .name = "k8s.statefulset.annotation", - .brief = "The annotation placed on the StatefulSet, the `` being the annotation name, the value being the annotation value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `replicas` with value `1` SHOULD be recorded\nas the `k8s.statefulset.annotation.replicas` attribute with value `\"1\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.statefulset.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the DaemonSet. -pub const k8s_daemonset_uid = types.StringAttribute{ - .name = "k8s.daemonset.uid", - .brief = "The UID of the DaemonSet.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the DaemonSet. -pub const k8s_daemonset_name = types.StringAttribute{ - .name = "k8s.daemonset.name", - .brief = "The name of the DaemonSet.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the DaemonSet, the `` being the label name, the value being the label value, even if the value is empty. -pub const k8s_daemonset_label = types.StringAttribute{ - .name = "k8s.daemonset.label", - .brief = "The label placed on the DaemonSet, the `` being the label name, the value being the label value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `app` with value `guestbook` SHOULD be recorded\nas the `k8s.daemonset.label.app` attribute with value `\"guestbook\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.daemonset.label.injected` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The annotation placed on the DaemonSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. -pub const k8s_daemonset_annotation = types.StringAttribute{ - .name = "k8s.daemonset.annotation", - .brief = "The annotation placed on the DaemonSet, the `` being the annotation name, the value being the annotation value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `replicas` with value `1` SHOULD be recorded\nas the `k8s.daemonset.annotation.replicas` attribute with value `\"1\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.daemonset.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the horizontal pod autoscaler. -pub const k8s_hpa_uid = types.StringAttribute{ - .name = "k8s.hpa.uid", - .brief = "The UID of the horizontal pod autoscaler.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the horizontal pod autoscaler. -pub const k8s_hpa_name = types.StringAttribute{ - .name = "k8s.hpa.name", - .brief = "The name of the horizontal pod autoscaler.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The kind of the target resource to scale for the HorizontalPodAutoscaler. -pub const k8s_hpa_scaletargetref_kind = types.StringAttribute{ - .name = "k8s.hpa.scaletargetref.kind", - .brief = "The kind of the target resource to scale for the HorizontalPodAutoscaler.", - .note = "This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the target resource to scale for the HorizontalPodAutoscaler. -pub const k8s_hpa_scaletargetref_name = types.StringAttribute{ - .name = "k8s.hpa.scaletargetref.name", - .brief = "The name of the target resource to scale for the HorizontalPodAutoscaler.", - .note = "This maps to the `name` field in the `scaleTargetRef` of the HPA spec.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The API version of the target resource to scale for the HorizontalPodAutoscaler. -pub const k8s_hpa_scaletargetref_api_version = types.StringAttribute{ - .name = "k8s.hpa.scaletargetref.api_version", - .brief = "The API version of the target resource to scale for the HorizontalPodAutoscaler.", - .note = "This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA spec.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The type of metric source for the horizontal pod autoscaler. -pub const k8s_hpa_metric_type = types.StringAttribute{ - .name = "k8s.hpa.metric.type", - .brief = "The type of metric source for the horizontal pod autoscaler.", - .note = "This attribute reflects the `type` field of spec.metrics[] in the HPA.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the Job. -pub const k8s_job_uid = types.StringAttribute{ - .name = "k8s.job.uid", - .brief = "The UID of the Job.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the Job. -pub const k8s_job_name = types.StringAttribute{ - .name = "k8s.job.name", - .brief = "The name of the Job.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the Job, the `` being the label name, the value being the label value, even if the value is empty. -pub const k8s_job_label = types.StringAttribute{ - .name = "k8s.job.label", - .brief = "The label placed on the Job, the `` being the label name, the value being the label value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `jobtype` with value `ci` SHOULD be recorded\nas the `k8s.job.label.jobtype` attribute with value `\"ci\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.job.label.automated` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The annotation placed on the Job, the `` being the annotation name, the value being the annotation value, even if the value is empty. -pub const k8s_job_annotation = types.StringAttribute{ - .name = "k8s.job.annotation", - .brief = "The annotation placed on the Job, the `` being the annotation name, the value being the annotation value, even if the value is empty.", - .note = "\nExamples:\n\n- A label `number` with value `1` SHOULD be recorded\nas the `k8s.job.annotation.number` attribute with value `\"1\"`.\n- A label `data` with empty string value SHOULD be recorded as\nthe `k8s.job.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The UID of the CronJob. -pub const k8s_cronjob_uid = types.StringAttribute{ - .name = "k8s.cronjob.uid", - .brief = "The UID of the CronJob.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the CronJob. -pub const k8s_cronjob_name = types.StringAttribute{ - .name = "k8s.cronjob.name", - .brief = "The name of the CronJob.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The label placed on the CronJob, the `` being the label name, the value being the label value. -pub const k8s_cronjob_label = types.StringAttribute{ - .name = "k8s.cronjob.label", - .brief = "The label placed on the CronJob, the `` being the label name, the value being the label value.", - .note = "Examples:\n\n- A label `type` with value `weekly` SHOULD be recorded as the\n`k8s.cronjob.label.type` attribute with value `\"weekly\"`.\n- A label `automated` with empty string value SHOULD be recorded as\nthe `k8s.cronjob.label.automated` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The cronjob annotation placed on the CronJob, the `` being the annotation name, the value being the annotation value. -pub const k8s_cronjob_annotation = types.StringAttribute{ - .name = "k8s.cronjob.annotation", - .brief = "The cronjob annotation placed on the CronJob, the `` being the annotation name, the value being the annotation value.", - .note = "Examples:\n\n- An annotation `retries` with value `4` SHOULD be recorded as the\n`k8s.cronjob.annotation.retries` attribute with value `\"4\"`.\n- An annotation `data` with empty string value SHOULD be recorded as\nthe `k8s.cronjob.annotation.data` attribute with value `\"\"`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the K8s volume. -pub const k8s_volume_name = types.StringAttribute{ - .name = "k8s.volume.name", - .brief = "The name of the K8s volume.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The type of the K8s volume. -pub const k8s_volume_type = types.EnumAttribute(volumeTypeValue){ - .base = types.StringAttribute{ - .name = "k8s.volume.type", - .brief = "The type of the K8s volume.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = volumeTypeValue.persistent_volume_claim, -}; - -/// The phase of the K8s namespace. -pub const k8s_namespace_phase = types.EnumAttribute(namespacePhaseValue){ - .base = types.StringAttribute{ - .name = "k8s.namespace.phase", - .brief = "The phase of the K8s namespace.", - .note = "This attribute aligns with the `phase` field of the\n[K8s NamespaceStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = namespacePhaseValue.active, -}; - -/// The condition type of a K8s Node. -pub const k8s_node_condition_type = types.EnumAttribute(nodeConditionTypeValue){ - .base = types.StringAttribute{ - .name = "k8s.node.condition.type", - .brief = "The condition type of a K8s Node.", - .note = "K8s Node conditions as described\nby [K8s documentation](https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/\n\nThis attribute aligns with the `type` field of the\n[NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/\n\nThe set of possible values is not limited to those listed here. Managed Kubernetes environments,\nor custom controllers MAY introduce additional node condition types.\nWhen this occurs, the exact value as reported by the Kubernetes API SHOULD be used.", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = nodeConditionTypeValue.ready, -}; - -/// The status of the condition, one of True, False, Unknown. -pub const k8s_node_condition_status = types.EnumAttribute(nodeConditionStatusValue){ - .base = types.StringAttribute{ - .name = "k8s.node.condition.status", - .brief = "The status of the condition, one of True, False, Unknown.", - .note = "This attribute aligns with the `status` field of the\n[NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = nodeConditionStatusValue.condition_true, -}; - -/// The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/ -pub const k8s_container_status_state = types.EnumAttribute(containerStatusStateValue){ - .base = types.StringAttribute{ - .name = "k8s.container.status.state", - .brief = "The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/", - .note = null, - .stability = .experimental, - .requirement_level = .recommended, - }, - .well_known_values = containerStatusStateValue.terminated, -}; - -/// The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/ or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/ -pub const k8s_container_status_reason = types.EnumAttribute(containerStatusReasonValue){ - .base = types.StringAttribute{ - .name = "k8s.container.status.reason", - .brief = "The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/ or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/", - .note = null, - .stability = .experimental, - .requirement_level = .recommended, - }, - .well_known_values = containerStatusReasonValue.container_creating, -}; - -/// The size (identifier) of the K8s huge page. -pub const k8s_hugepage_size = types.StringAttribute{ - .name = "k8s.hugepage.size", - .brief = "The size (identifier) of the K8s huge page.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/ object. -pub const k8s_storageclass_name = types.StringAttribute{ - .name = "k8s.storageclass.name", - .brief = "The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/ object.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the K8s resource a resource quota defines. -pub const k8s_resourcequota_resource_name = types.StringAttribute{ - .name = "k8s.resourcequota.resource_name", - .brief = "The name of the K8s resource a resource quota defines.", - .note = "The value for this attribute can be either the full `count/[.]` string (e.g., count/deployments.apps, count/pods), or, for certain core Kubernetes resources, just the resource name (e.g., pods, services, configmaps). Both forms are supported by Kubernetes for object count quotas. See [Kubernetes Resource Quotas documentation](https://kubernetes.io/docs/concepts/policy/resource-quotas/ for more details.", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/lib.zig b/src/lib.zig new file mode 100644 index 0000000..0b35899 --- /dev/null +++ b/src/lib.zig @@ -0,0 +1,18 @@ +//! OpenTelemetry semantic conventions are agreed standardized naming patterns +//! for OpenTelemetry things. This module aims to be the centralized place to +//! interact with these conventions. +//! +//! Generated from OpenTelemetry semantic conventions specification. + +pub const attribute = @import("attribute.zig"); +pub const metric = @import("metric.zig"); +pub const resource = @import("resource.zig"); +pub const trace = @import("trace.zig"); + +/// The schema URL that matches the version of the semantic conventions that +/// this module defines. +pub const SCHEMA_URL: []const u8 = "https://opentelemetry.io/schemas/1.36.0"; + +test "semantic conventions" { + @import("std").testing.refAllDecls(@This()); +} diff --git a/src/linux/linux.zig b/src/linux/linux.zig deleted file mode 100644 index 98f859a..0000000 --- a/src/linux/linux.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! linux semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/linux/registry.zig b/src/linux/registry.zig deleted file mode 100644 index fb479f4..0000000 --- a/src/linux/registry.zig +++ /dev/null @@ -1,33 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: linux -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const memorySlabStateValue = enum { - /// - reclaimable, - /// - unreclaimable, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .reclaimable => "reclaimable", - .unreclaimable => "unreclaimable", - }; - } -}; - -/// The Linux Slab memory state -pub const linux_memory_slab_state = types.EnumAttribute(memorySlabStateValue){ - .base = types.StringAttribute{ - .name = "linux.memory.slab.state", - .brief = "The Linux Slab memory state", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = memorySlabStateValue.reclaimable, -}; - diff --git a/src/log/log.zig b/src/log/log.zig deleted file mode 100644 index 8fb58d4..0000000 --- a/src/log/log.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! log semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/log/registry.zig b/src/log/registry.zig deleted file mode 100644 index 99de6c0..0000000 --- a/src/log/registry.zig +++ /dev/null @@ -1,87 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: log -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const iostreamValue = enum { - /// Logs from stdout stream - stdout, - /// Events from stderr stream - stderr, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .stdout => "stdout", - .stderr => "stderr", - }; - } -}; - -/// The stream associated with the log. See below for a list of well-known values. -pub const log_iostream = types.EnumAttribute(iostreamValue){ - .base = types.StringAttribute{ - .name = "log.iostream", - .brief = "The stream associated with the log. See below for a list of well-known values.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = iostreamValue.stdout, -}; - -/// The basename of the file. -pub const log_file_name = types.StringAttribute{ - .name = "log.file.name", - .brief = "The basename of the file.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The full path to the file. -pub const log_file_path = types.StringAttribute{ - .name = "log.file.path", - .brief = "The full path to the file.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The basename of the file, with symlinks resolved. -pub const log_file_name_resolved = types.StringAttribute{ - .name = "log.file.name_resolved", - .brief = "The basename of the file, with symlinks resolved.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The full path to the file, with symlinks resolved. -pub const log_file_path_resolved = types.StringAttribute{ - .name = "log.file.path_resolved", - .brief = "The full path to the file, with symlinks resolved.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// A unique identifier for the Log Record. -pub const log_record_uid = types.StringAttribute{ - .name = "log.record.uid", - .brief = "A unique identifier for the Log Record.", - .note = "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.\n\n 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.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The complete original Log Record. -pub const log_record_original = types.StringAttribute{ - .name = "log.record.original", - .brief = "The complete original Log Record.", - .note = "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.)", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/messaging/registry.zig b/src/messaging/registry.zig deleted file mode 100644 index 8125f78..0000000 --- a/src/messaging/registry.zig +++ /dev/null @@ -1,9 +0,0 @@ -//! Messaging semantic conventions for OpenTelemetry -//! Generated from test_messaging.yaml - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Messaging semantic convention registry -pub const MESSAGINGRegistry = struct { -}; diff --git a/src/messaging/test_entity_messaging.zig b/src/messaging/test_entity_messaging.zig deleted file mode 100644 index 958d42f..0000000 --- a/src/messaging/test_entity_messaging.zig +++ /dev/null @@ -1,17 +0,0 @@ -//! Messaging semantic conventions for OpenTelemetry -//! Generated from test_entity_messaging.yaml - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Messaging semantic convention test_entity_messaging -pub const MESSAGINGTest_entity_messaging = struct { - // Entity: Entity representing a message consumer - // Requirement Level: required - pub const messaging_system = MESSAGING_SYSTEM; // ref: messaging.system - // Requirement Level: recommended - pub const messaging_destination = MESSAGING_DESTINATION; // ref: messaging.destination - // Requirement Level: required - pub const messaging_operation = MESSAGING_OPERATION; // ref: messaging.operation - -}; diff --git a/src/messaging/test_registry_messaging.zig b/src/messaging/test_registry_messaging.zig deleted file mode 100644 index 177020d..0000000 --- a/src/messaging/test_registry_messaging.zig +++ /dev/null @@ -1,53 +0,0 @@ -//! Messaging semantic conventions for OpenTelemetry -//! Generated from test_registry_messaging.yaml - -const std = @import("std"); -const types = @import("../types.zig"); - -// Messaging semantic conventions - -/// Messaging system name -/// Examples: "kafka", "rabbitmq", "activemq" -pub const MESSAGING_SYSTEM = types.Attribute([]const u8) - .init(.{ - .name = "messaging.system", - .type = []const u8, - .brief = "Messaging system name", - .stability = types.StabilityLevel.stable, - .requirement_level = types.RequirementLevel.required, - .examples = &[_][]const u8{"kafka", "rabbitmq", "activemq"}, - }); - -/// Message destination name -/// Examples: "user-events", "order-processing" -pub const MESSAGING_DESTINATION = types.Attribute([]const u8) - .init(.{ - .name = "messaging.destination", - .type = []const u8, - .brief = "Message destination name", - .stability = types.StabilityLevel.stable, - .requirement_level = types.RequirementLevel.recommended, - .examples = &[_][]const u8{"user-events", "order-processing"}, - }); - -/// Type of messaging operation -/// Examples: "publish", "receive", "process" -pub const MESSAGING_OPERATION = types.Attribute([]const u8) - .init(.{ - .name = "messaging.operation", - .type = []const u8, - .brief = "Type of messaging operation", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - .examples = &[_][]const u8{"publish", "receive", "process"}, - }); - - -/// Messaging semantic convention test_registry_messaging -pub const MESSAGINGTest_registry_messaging = struct { - // Messaging semantic conventions - pub const messaging_system = MESSAGING_SYSTEM; - pub const messaging_destination = MESSAGING_DESTINATION; - pub const messaging_operation = MESSAGING_OPERATION; - -}; diff --git a/src/metric.zig b/src/metric.zig new file mode 100644 index 0000000..26cbf25 --- /dev/null +++ b/src/metric.zig @@ -0,0 +1,6875 @@ +// DO NOT EDIT, this is an auto-generated file +// +// If you want to update the file: +// - Edit the template at scripts/templates/registry/zig/metric.zig.j2 +// - Run the script at scripts/generate-consts-from-spec.sh + +//! # Semantic Metrics +//! +//! The entire set of semantic metrics (or [conventions](https://opentelemetry.io/docs/concepts/semantic-conventions/)) defined by the project. + +const std = @import("std"); +const types = @import("types.zig"); + +/// Number of exceptions caught by exception handling middleware. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Diagnostics`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{exception}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `aspnetcore.diagnostics.exception.result` | `Required` | +/// | `aspnetcore.diagnostics.handler.type` | `Conditionally_required`: if and only if the exception was handled by this handler. | +/// | `error.type` | `Required` | +pub const aspnetcore_diagnostics_exceptions = types.Metric{ + .name = "aspnetcore.diagnostics.exceptions", + .brief = "Number of exceptions caught by exception handling middleware.", + .stability = .stable, + .instrument = .counter, + .unit = "{exception}", + .value_type = .double, +}; + +/// Number of requests that are currently active on the server that hold a rate limiting lease. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{request}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `aspnetcore.rate_limiting.policy` | `Conditionally_required`: if the matched endpoint for the request had a rate-limiting policy. | +pub const aspnetcore_rate_limiting_active_request_leases = types.Metric{ + .name = "aspnetcore.rate_limiting.active_request_leases", + .brief = "Number of requests that are currently active on the server that hold a rate limiting lease.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{request}", + .value_type = .double, +}; + +/// Number of requests that are currently queued, waiting to acquire a rate limiting lease. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{request}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `aspnetcore.rate_limiting.policy` | `Conditionally_required`: if the matched endpoint for the request had a rate-limiting policy. | +pub const aspnetcore_rate_limiting_queued_requests = types.Metric{ + .name = "aspnetcore.rate_limiting.queued_requests", + .brief = "Number of requests that are currently queued, waiting to acquire a rate limiting lease.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{request}", + .value_type = .double, +}; + +/// The time the request spent in a queue waiting to acquire a rate limiting lease. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `aspnetcore.rate_limiting.policy` | `Conditionally_required`: if the matched endpoint for the request had a rate-limiting policy. | +/// | `aspnetcore.rate_limiting.result` | `Required` | +pub const aspnetcore_rate_limiting_request_time_in_queue = types.Metric{ + .name = "aspnetcore.rate_limiting.request.time_in_queue", + .brief = "The time the request spent in a queue waiting to acquire a rate limiting lease.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// The duration of rate limiting lease held by requests on the server. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `aspnetcore.rate_limiting.policy` | `Conditionally_required`: if the matched endpoint for the request had a rate-limiting policy. | +pub const aspnetcore_rate_limiting_request_lease_duration = types.Metric{ + .name = "aspnetcore.rate_limiting.request_lease.duration", + .brief = "The duration of rate limiting lease held by requests on the server.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Number of requests that tried to acquire a rate limiting lease. +/// +/// Notes: Requests could be: * Rejected by global or endpoint rate limiting policies * Canceled while waiting for the lease. Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{request}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `aspnetcore.rate_limiting.policy` | `Conditionally_required`: if the matched endpoint for the request had a rate-limiting policy. | +/// | `aspnetcore.rate_limiting.result` | `Required` | +pub const aspnetcore_rate_limiting_requests = types.Metric{ + .name = "aspnetcore.rate_limiting.requests", + .brief = "Number of requests that tried to acquire a rate limiting lease.", + .stability = .stable, + .instrument = .counter, + .unit = "{request}", + .value_type = .double, +}; + +/// Number of requests that were attempted to be matched to an endpoint. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Routing`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{match_attempt}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `aspnetcore.routing.is_fallback` | `Conditionally_required`: if and only if a route was successfully matched. | +/// | `aspnetcore.routing.match_status` | `Required` | +/// | `http.route` | `Conditionally_required`: if and only if a route was successfully matched. | +pub const aspnetcore_routing_match_attempts = types.Metric{ + .name = "aspnetcore.routing.match_attempts", + .brief = "Number of requests that were attempted to be matched to an endpoint.", + .stability = .stable, + .instrument = .counter, + .unit = "{match_attempt}", + .value_type = .double, +}; + +/// Number of active client instances +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{instance}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If using a port other than the default port for this DBMS and if `server.address` is set. | +pub const azure_cosmosdb_client_active_instance_count = types.Metric{ + .name = "azure.cosmosdb.client.active_instance.count", + .brief = "Number of active client instances", + .stability = .development, + .instrument = .updowncounter, + .unit = "{instance}", + .value_type = .double, +}; + +/// [Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `{request_unit}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `azure.cosmosdb.consistency.level` | `Conditionally_required`: If available. | +/// | `azure.cosmosdb.operation.contacted_regions` | `{"recommended": "if available"}` | +/// | `azure.cosmosdb.response.sub_status_code` | `Conditionally_required`: when response was received and contained sub-code. | +/// | `db.collection.name` | `Conditionally_required`: If available. | +/// | `db.namespace` | `Conditionally_required`: If available. | +/// | `db.operation.name` | `Required` | +/// | `db.response.status_code` | `Conditionally_required`: If the operation failed and status code is available. | +/// | `error.type` | `Conditionally_required`: If and only if the operation failed. | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If using a port other than the default port for this DBMS and if `server.address` is set. | +pub const azure_cosmosdb_client_operation_request_charge = types.Metric{ + .name = "azure.cosmosdb.client.operation.request_charge", + .brief = "[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation", + .stability = .development, + .instrument = .histogram, + .unit = "{request_unit}", + .value_type = .double, +}; + +/// The number of pipeline runs currently active in the system by state. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{run}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cicd.pipeline.name` | `Required` | +/// | `cicd.pipeline.run.state` | `Required` | +pub const cicd_pipeline_run_active = types.Metric{ + .name = "cicd.pipeline.run.active", + .brief = "The number of pipeline runs currently active in the system by state.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{run}", + .value_type = .double, +}; + +/// Duration of a pipeline run grouped by pipeline, state and result. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cicd.pipeline.name` | `Required` | +/// | `cicd.pipeline.result` | `Conditionally_required`: If and only if the pipeline run result has been set during that state. | +/// | `cicd.pipeline.run.state` | `Required` | +/// | `error.type` | `Conditionally_required`: If and only if the pipeline run failed. | +pub const cicd_pipeline_run_duration = types.Metric{ + .name = "cicd.pipeline.run.duration", + .brief = "Duration of a pipeline run grouped by pipeline, state and result.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// The number of errors encountered in pipeline runs (eg. compile, test failures). +/// +/// Notes: There might be errors in a pipeline run that are non fatal (eg. they are suppressed) or in a parallel stage multiple stages could have a fatal error. This means that this error count might not be the same as the count of metric `cicd.pipeline.run.duration` with run result `failure`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{error}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cicd.pipeline.name` | `Required` | +/// | `error.type` | `Required` | +pub const cicd_pipeline_run_errors = types.Metric{ + .name = "cicd.pipeline.run.errors", + .brief = "The number of errors encountered in pipeline runs (eg. compile, test failures).", + .stability = .development, + .instrument = .counter, + .unit = "{error}", + .value_type = .double, +}; + +/// The number of errors in a component of the CICD system (eg. controller, scheduler, agent). +/// +/// Notes: Errors in pipeline run execution are explicitly excluded. Ie a test failure is not counted in this metric. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{error}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cicd.system.component` | `Required` | +/// | `error.type` | `Required` | +pub const cicd_system_errors = types.Metric{ + .name = "cicd.system.errors", + .brief = "The number of errors in a component of the CICD system (eg. controller, scheduler, agent).", + .stability = .development, + .instrument = .counter, + .unit = "{error}", + .value_type = .double, +}; + +/// The number of workers on the CICD system by state. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{count}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cicd.worker.state` | `Required` | +pub const cicd_worker_count = types.Metric{ + .name = "cicd.worker.count", + .brief = "The number of workers on the CICD system by state.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{count}", + .value_type = .double, +}; + +/// Total CPU time consumed +/// +/// Notes: Total CPU time consumed by the specific container on all available CPU cores +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.mode` | `Conditionally_required`: Required if mode is available, i.e. metrics coming from the Docker Stats API. | +pub const container_cpu_time = types.Metric{ + .name = "container.cpu.time", + .brief = "Total CPU time consumed", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs +/// +/// Notes: CPU usage of the specific container on all available CPU cores, averaged over the sample window +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{cpu}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.mode` | `Conditionally_required`: Required if mode is available, i.e. metrics coming from the Docker Stats API. | +pub const container_cpu_usage = types.Metric{ + .name = "container.cpu.usage", + .brief = "Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs", + .stability = .development, + .instrument = .gauge, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Disk bytes for the container. +/// +/// Notes: The total number of bytes read/written successfully (aggregated from all disks). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `disk.io.direction` | `Recommended` | +/// | `system.device` | `Recommended` | +pub const container_disk_io = types.Metric{ + .name = "container.disk.io", + .brief = "Disk bytes for the container.", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// Memory usage of the container. +/// +/// Notes: Memory usage of the container. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +pub const container_memory_usage = types.Metric{ + .name = "container.memory.usage", + .brief = "Memory usage of the container.", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// Network bytes for the container. +/// +/// Notes: The number of bytes sent/received on all network interfaces by the container. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.interface.name` | `Recommended` | +/// | `network.io.direction` | `Recommended` | +pub const container_network_io = types.Metric{ + .name = "container.network.io", + .brief = "Network bytes for the container.", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// The time the container has been running +/// +/// Notes: Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const container_uptime = types.Metric{ + .name = "container.uptime", + .brief = "The time the container has been running", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Deprecated. Use `system.cpu.frequency` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{Hz}` | `Development` | +/// +/// Note: This metric is deprecated. Replaced by `system.cpu.frequency`. +pub const cpu_frequency = types.Metric{ + .name = "cpu.frequency", + .brief = "Deprecated. Use `system.cpu.frequency` instead.", + .stability = .development, + .instrument = .gauge, + .unit = "{Hz}", + .value_type = .double, + .deprecated_reason = "Replaced by `system.cpu.frequency`.", +}; + +/// Deprecated. Use `system.cpu.time` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.logical_number` | `Recommended` | +/// | `cpu.mode` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `system.cpu.time`. +pub const cpu_time = types.Metric{ + .name = "cpu.time", + .brief = "Deprecated. Use `system.cpu.time` instead.", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, + .deprecated_reason = "Replaced by `system.cpu.time`.", +}; + +/// Deprecated. Use `system.cpu.utilization` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.logical_number` | `Recommended` | +/// | `cpu.mode` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `system.cpu.utilization`. +pub const cpu_utilization = types.Metric{ + .name = "cpu.utilization", + .brief = "Deprecated. Use `system.cpu.utilization` instead.", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, + .deprecated_reason = "Replaced by `system.cpu.utilization`.", +}; + +/// The total number of objects collected inside a generation since interpreter start. +/// +/// Notes: This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{object}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpython.gc.generation` | `Required` | +pub const cpython_gc_collected_objects = types.Metric{ + .name = "cpython.gc.collected_objects", + .brief = "The total number of objects collected inside a generation since interpreter start.", + .stability = .development, + .instrument = .counter, + .unit = "{object}", + .value_type = .double, +}; + +/// The number of times a generation was collected since interpreter start. +/// +/// Notes: This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{collection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpython.gc.generation` | `Required` | +pub const cpython_gc_collections = types.Metric{ + .name = "cpython.gc.collections", + .brief = "The number of times a generation was collected since interpreter start.", + .stability = .development, + .instrument = .counter, + .unit = "{collection}", + .value_type = .double, +}; + +/// The total number of objects which were found to be uncollectable inside a generation since interpreter start. +/// +/// Notes: This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{object}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpython.gc.generation` | `Required` | +pub const cpython_gc_uncollectable_objects = types.Metric{ + .name = "cpython.gc.uncollectable_objects", + .brief = "The total number of objects which were found to be uncollectable inside a generation since interpreter start.", + .stability = .development, + .instrument = .counter, + .unit = "{object}", + .value_type = .double, +}; + +/// The number of connections that are currently in state described by the `state` attribute +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +/// | `db.client.connection.state` | `Required` | +pub const db_client_connection_count = types.Metric{ + .name = "db.client.connection.count", + .brief = "The number of connections that are currently in state described by the `state` attribute", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// The time it took to create a new connection +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +pub const db_client_connection_create_time = types.Metric{ + .name = "db.client.connection.create_time", + .brief = "The time it took to create a new connection", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// The maximum number of idle open connections allowed +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +pub const db_client_connection_idle_max = types.Metric{ + .name = "db.client.connection.idle.max", + .brief = "The maximum number of idle open connections allowed", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// The minimum number of idle open connections allowed +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +pub const db_client_connection_idle_min = types.Metric{ + .name = "db.client.connection.idle.min", + .brief = "The minimum number of idle open connections allowed", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// The maximum number of open connections allowed +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +pub const db_client_connection_max = types.Metric{ + .name = "db.client.connection.max", + .brief = "The maximum number of open connections allowed", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// The number of current pending requests for an open connection +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{request}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +pub const db_client_connection_pending_requests = types.Metric{ + .name = "db.client.connection.pending_requests", + .brief = "The number of current pending requests for an open connection", + .stability = .development, + .instrument = .updowncounter, + .unit = "{request}", + .value_type = .double, +}; + +/// The number of connection timeouts that have occurred trying to obtain a connection from the pool +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{timeout}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +pub const db_client_connection_timeouts = types.Metric{ + .name = "db.client.connection.timeouts", + .brief = "The number of connection timeouts that have occurred trying to obtain a connection from the pool", + .stability = .development, + .instrument = .counter, + .unit = "{timeout}", + .value_type = .double, +}; + +/// The time between borrowing a connection and returning it to the pool +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +pub const db_client_connection_use_time = types.Metric{ + .name = "db.client.connection.use_time", + .brief = "The time between borrowing a connection and returning it to the pool", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// The time it took to obtain an open connection from the pool +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connection.pool.name` | `Required` | +pub const db_client_connection_wait_time = types.Metric{ + .name = "db.client.connection.wait_time", + .brief = "The time it took to obtain an open connection from the pool", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `ms` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.create_time` with unit `s`. +pub const db_client_connections_create_time = types.Metric{ + .name = "db.client.connections.create_time", + .brief = "Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`.", + .stability = .development, + .instrument = .histogram, + .unit = "ms", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.create_time` with unit `s`.", +}; + +/// Deprecated, use `db.client.connection.idle.max` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.idle.max`. +pub const db_client_connections_idle_max = types.Metric{ + .name = "db.client.connections.idle.max", + .brief = "Deprecated, use `db.client.connection.idle.max` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.idle.max`.", +}; + +/// Deprecated, use `db.client.connection.idle.min` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.idle.min`. +pub const db_client_connections_idle_min = types.Metric{ + .name = "db.client.connections.idle.min", + .brief = "Deprecated, use `db.client.connection.idle.min` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.idle.min`.", +}; + +/// Deprecated, use `db.client.connection.max` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.max`. +pub const db_client_connections_max = types.Metric{ + .name = "db.client.connections.max", + .brief = "Deprecated, use `db.client.connection.max` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.max`.", +}; + +/// Deprecated, use `db.client.connection.pending_requests` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{request}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.pending_requests`. +pub const db_client_connections_pending_requests = types.Metric{ + .name = "db.client.connections.pending_requests", + .brief = "Deprecated, use `db.client.connection.pending_requests` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{request}", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.pending_requests`.", +}; + +/// Deprecated, use `db.client.connection.timeouts` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{timeout}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.timeouts`. +pub const db_client_connections_timeouts = types.Metric{ + .name = "db.client.connections.timeouts", + .brief = "Deprecated, use `db.client.connection.timeouts` instead.", + .stability = .development, + .instrument = .counter, + .unit = "{timeout}", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.timeouts`.", +}; + +/// Deprecated, use `db.client.connection.count` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// | `db.client.connections.state` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.count`. +pub const db_client_connections_usage = types.Metric{ + .name = "db.client.connections.usage", + .brief = "Deprecated, use `db.client.connection.count` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.count`.", +}; + +/// Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `ms` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.use_time` with unit `s`. +pub const db_client_connections_use_time = types.Metric{ + .name = "db.client.connections.use_time", + .brief = "Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`.", + .stability = .development, + .instrument = .histogram, + .unit = "ms", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.use_time` with unit `s`.", +}; + +/// Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `ms` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.client.connections.pool.name` | `Required` | +/// +/// Note: This metric is deprecated. Replaced by `db.client.connection.wait_time` with unit `s`. +pub const db_client_connections_wait_time = types.Metric{ + .name = "db.client.connections.wait_time", + .brief = "Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`.", + .stability = .development, + .instrument = .histogram, + .unit = "ms", + .value_type = .double, + .deprecated_reason = "Replaced by `db.client.connection.wait_time` with unit `s`.", +}; + +/// Deprecated, use `azure.cosmosdb.client.active_instance.count` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{instance}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If using a port other than the default port for this DBMS and if `server.address` is set. | +/// +/// Note: This metric is deprecated. Replaced by `azure.cosmosdb.client.active_instance.count`. +pub const db_client_cosmosdb_active_instance_count = types.Metric{ + .name = "db.client.cosmosdb.active_instance.count", + .brief = "Deprecated, use `azure.cosmosdb.client.active_instance.count` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{instance}", + .value_type = .double, + .deprecated_reason = "Replaced by `azure.cosmosdb.client.active_instance.count`.", +}; + +/// Deprecated, use `azure.cosmosdb.client.operation.request_charge` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `{request_unit}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.collection.name` | `Conditionally_required`: If available. | +/// | `db.cosmosdb.consistency_level` | `Conditionally_required`: If available. | +/// | `db.cosmosdb.regions_contacted` | `{"recommended": "if available"}` | +/// | `db.cosmosdb.sub_status_code` | `Conditionally_required`: when response was received and contained sub-code. | +/// | `db.namespace` | `Conditionally_required`: If available. | +/// | `db.operation.name` | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. The operation name MAY be parsed from the query text, in which case it SHOULD be the single operation name found in the query. | +/// +/// Note: This metric is deprecated. Replaced by `azure.cosmosdb.client.operation.request_charge`. +pub const db_client_cosmosdb_operation_request_charge = types.Metric{ + .name = "db.client.cosmosdb.operation.request_charge", + .brief = "Deprecated, use `azure.cosmosdb.client.operation.request_charge` instead.", + .stability = .development, + .instrument = .histogram, + .unit = "{request_unit}", + .value_type = .double, + .deprecated_reason = "Replaced by `azure.cosmosdb.client.operation.request_charge`.", +}; + +/// Duration of database client operations. +/// +/// Notes: Batch operations SHOULD be recorded as a single operation. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.collection.name` | `Conditionally_required`: If readily available and if a database call is performed on a single collection. | +/// | `db.namespace` | `Conditionally_required`: If available. | +/// | `db.operation.name` | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. | +/// | `db.query.summary` | `{"recommended": "if available through instrumentation hooks or if the instrumentation supports generating a query summary."}` | +/// | `db.query.text` | `Opt_in` | +/// | `db.response.status_code` | `Conditionally_required`: If the operation failed and status code is available. | +/// | `db.stored_procedure.name` | `{"recommended": "if operation applies to a specific stored procedure."}` | +/// | `db.system.name` | `Required` | +/// | `error.type` | `Conditionally_required`: If and only if the operation failed. | +/// | `network.peer.address` | `{"recommended": "if applicable for this database system."}` | +/// | `network.peer.port` | `{"recommended": "if and only if `network.peer.address` is set."}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If using a port other than the default port for this DBMS and if `server.address` is set. | +pub const db_client_operation_duration = types.Metric{ + .name = "db.client.operation.duration", + .brief = "Duration of database client operations.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// The actual number of records returned by the database operation. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `{row}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `db.collection.name` | `Conditionally_required`: If readily available and if a database call is performed on a single collection. | +/// | `db.namespace` | `Conditionally_required`: If available. | +/// | `db.operation.name` | `Conditionally_required`: If readily available and if there is a single operation name that describes the database call. | +/// | `db.query.summary` | `{"recommended": "if available through instrumentation hooks or if the instrumentation supports generating a query summary."}` | +/// | `db.query.text` | `Opt_in` | +/// | `db.response.status_code` | `Conditionally_required`: If the operation failed and status code is available. | +/// | `db.system.name` | `Required` | +/// | `error.type` | `Conditionally_required`: If and only if the operation failed. | +/// | `network.peer.address` | `{"recommended": "if applicable for this database system."}` | +/// | `network.peer.port` | `{"recommended": "if and only if `network.peer.address` is set."}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If using a port other than the default port for this DBMS and if `server.address` is set. | +pub const db_client_response_returned_rows = types.Metric{ + .name = "db.client.response.returned_rows", + .brief = "The actual number of records returned by the database operation.", + .stability = .development, + .instrument = .histogram, + .unit = "{row}", + .value_type = .double, +}; + +/// Measures the time taken to perform a DNS lookup. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `dns.question.name` | `Required` | +/// | `error.type` | `Conditionally_required`: if and only if an error has occurred. | +pub const dns_lookup_duration = types.Metric{ + .name = "dns.lookup.duration", + .brief = "Measures the time taken to perform a DNS lookup.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// The number of .NET assemblies that are currently loaded. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`AppDomain.CurrentDomain.GetAssemblies().Length`](https://learn.microsoft.com/dotnet/api/system.appdomain.getassemblies). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{assembly}` | `Stable` | +pub const dotnet_assembly_count = types.Metric{ + .name = "dotnet.assembly.count", + .brief = "The number of .NET assemblies that are currently loaded.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{assembly}", + .value_type = .double, +}; + +/// The number of exceptions that have been thrown in managed code. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as counting calls to [`AppDomain.CurrentDomain.FirstChanceException`](https://learn.microsoft.com/dotnet/api/system.appdomain.firstchanceexception). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{exception}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Required` | +pub const dotnet_exceptions = types.Metric{ + .name = "dotnet.exceptions", + .brief = "The number of exceptions that have been thrown in managed code.", + .stability = .stable, + .instrument = .counter, + .unit = "{exception}", + .value_type = .double, +}; + +/// The number of garbage collections that have occurred since the process has started. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric uses the [`GC.CollectionCount(int generation)`](https://learn.microsoft.com/dotnet/api/system.gc.collectioncount) API to calculate exclusive collections per generation. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{collection}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `dotnet.gc.heap.generation` | `Required` | +pub const dotnet_gc_collections = types.Metric{ + .name = "dotnet.gc.collections", + .brief = "The number of garbage collections that have occurred since the process has started.", + .stability = .stable, + .instrument = .counter, + .unit = "{collection}", + .value_type = .double, +}; + +/// The *approximate* number of bytes allocated on the managed GC heap since the process has started. The returned value does not include any native allocations. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`GC.GetTotalAllocatedBytes()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalallocatedbytes). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Stable` | +pub const dotnet_gc_heap_total_allocated = types.Metric{ + .name = "dotnet.gc.heap.total_allocated", + .brief = "The *approximate* number of bytes allocated on the managed GC heap since the process has started. The returned value does not include any native allocations.", + .stability = .stable, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// The heap fragmentation, as observed during the latest garbage collection. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`GC.GetGCMemoryInfo().GenerationInfo.FragmentationAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.fragmentationafterbytes). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `dotnet.gc.heap.generation` | `Required` | +pub const dotnet_gc_last_collection_heap_fragmentation_size = types.Metric{ + .name = "dotnet.gc.last_collection.heap.fragmentation.size", + .brief = "The heap fragmentation, as observed during the latest garbage collection.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The managed GC heap size (including fragmentation), as observed during the latest garbage collection. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`GC.GetGCMemoryInfo().GenerationInfo.SizeAfterBytes`](https://learn.microsoft.com/dotnet/api/system.gcgenerationinfo.sizeafterbytes). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `dotnet.gc.heap.generation` | `Required` | +pub const dotnet_gc_last_collection_heap_size = types.Metric{ + .name = "dotnet.gc.last_collection.heap.size", + .brief = "The managed GC heap size (including fragmentation), as observed during the latest garbage collection.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The amount of committed virtual memory in use by the .NET GC, as observed during the latest garbage collection. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`GC.GetGCMemoryInfo().TotalCommittedBytes`](https://learn.microsoft.com/dotnet/api/system.gcmemoryinfo.totalcommittedbytes). Committed virtual memory may be larger than the heap size because it includes both memory for storing existing objects (the heap size) and some extra memory that is ready to handle newly allocated objects in the future. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Stable` | +pub const dotnet_gc_last_collection_memory_committed_size = types.Metric{ + .name = "dotnet.gc.last_collection.memory.committed_size", + .brief = "The amount of committed virtual memory in use by the .NET GC, as observed during the latest garbage collection.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The total amount of time paused in GC since the process has started. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`GC.GetTotalPauseDuration()`](https://learn.microsoft.com/dotnet/api/system.gc.gettotalpauseduration). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Stable` | +pub const dotnet_gc_pause_time = types.Metric{ + .name = "dotnet.gc.pause.time", + .brief = "The total amount of time paused in GC since the process has started.", + .stability = .stable, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// The amount of time the JIT compiler has spent compiling methods since the process has started. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`JitInfo.GetCompilationTime()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompilationtime). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Stable` | +pub const dotnet_jit_compilation_time = types.Metric{ + .name = "dotnet.jit.compilation.time", + .brief = "The amount of time the JIT compiler has spent compiling methods since the process has started.", + .stability = .stable, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// Count of bytes of intermediate language that have been compiled since the process has started. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`JitInfo.GetCompiledILBytes()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledilbytes). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Stable` | +pub const dotnet_jit_compiled_il_size = types.Metric{ + .name = "dotnet.jit.compiled_il.size", + .brief = "Count of bytes of intermediate language that have been compiled since the process has started.", + .stability = .stable, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// The number of times the JIT compiler (re)compiled methods since the process has started. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`JitInfo.GetCompiledMethodCount()`](https://learn.microsoft.com/dotnet/api/system.runtime.jitinfo.getcompiledmethodcount). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{method}` | `Stable` | +pub const dotnet_jit_compiled_methods = types.Metric{ + .name = "dotnet.jit.compiled_methods", + .brief = "The number of times the JIT compiler (re)compiled methods since the process has started.", + .stability = .stable, + .instrument = .counter, + .unit = "{method}", + .value_type = .double, +}; + +/// The number of times there was contention when trying to acquire a monitor lock since the process has started. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`Monitor.LockContentionCount`](https://learn.microsoft.com/dotnet/api/system.threading.monitor.lockcontentioncount). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{contention}` | `Stable` | +pub const dotnet_monitor_lock_contentions = types.Metric{ + .name = "dotnet.monitor.lock_contentions", + .brief = "The number of times there was contention when trying to acquire a monitor lock since the process has started.", + .stability = .stable, + .instrument = .counter, + .unit = "{contention}", + .value_type = .double, +}; + +/// The number of processors available to the process. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as accessing [`Environment.ProcessorCount`](https://learn.microsoft.com/dotnet/api/system.environment.processorcount). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Stable` | +pub const dotnet_process_cpu_count = types.Metric{ + .name = "dotnet.process.cpu.count", + .brief = "The number of processors available to the process.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// CPU time used by the process. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as accessing the corresponding processor time properties on [`System.Diagnostics.Process`](https://learn.microsoft.com/dotnet/api/system.diagnostics.process). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.mode` | `Required` | +pub const dotnet_process_cpu_time = types.Metric{ + .name = "dotnet.process.cpu.time", + .brief = "CPU time used by the process.", + .stability = .stable, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// The number of bytes of physical memory mapped to the process context. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`Environment.WorkingSet`](https://learn.microsoft.com/dotnet/api/system.environment.workingset). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Stable` | +pub const dotnet_process_memory_working_set = types.Metric{ + .name = "dotnet.process.memory.working_set", + .brief = "The number of bytes of physical memory mapped to the process context.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The number of work items that are currently queued to be processed by the thread pool. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`ThreadPool.PendingWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.pendingworkitemcount). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{work_item}` | `Stable` | +pub const dotnet_thread_pool_queue_length = types.Metric{ + .name = "dotnet.thread_pool.queue.length", + .brief = "The number of work items that are currently queued to be processed by the thread pool.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{work_item}", + .value_type = .double, +}; + +/// The number of thread pool threads that currently exist. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`ThreadPool.ThreadCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.threadcount). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{thread}` | `Stable` | +pub const dotnet_thread_pool_thread_count = types.Metric{ + .name = "dotnet.thread_pool.thread.count", + .brief = "The number of thread pool threads that currently exist.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{thread}", + .value_type = .double, +}; + +/// The number of work items that the thread pool has completed since the process has started. +/// +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`ThreadPool.CompletedWorkItemCount`](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.completedworkitemcount). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{work_item}` | `Stable` | +pub const dotnet_thread_pool_work_item_count = types.Metric{ + .name = "dotnet.thread_pool.work_item.count", + .brief = "The number of work items that the thread pool has completed since the process has started.", + .stability = .stable, + .instrument = .counter, + .unit = "{work_item}", + .value_type = .double, +}; + +/// The number of timer instances that are currently active. +/// +/// Notes: Meter name: `System.Runtime`; Added in: .NET 9.0. This metric reports the same values as calling [`Timer.ActiveCount`](https://learn.microsoft.com/dotnet/api/system.threading.timer.activecount). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{timer}` | `Stable` | +pub const dotnet_timer_count = types.Metric{ + .name = "dotnet.timer.count", + .brief = "The number of timer instances that are currently active.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{timer}", + .value_type = .double, +}; + +/// Number of invocation cold starts +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{coldstart}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_coldstarts = types.Metric{ + .name = "faas.coldstarts", + .brief = "Number of invocation cold starts", + .stability = .development, + .instrument = .counter, + .unit = "{coldstart}", + .value_type = .double, +}; + +/// Distribution of CPU usage per invocation +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_cpu_usage = types.Metric{ + .name = "faas.cpu_usage", + .brief = "Distribution of CPU usage per invocation", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Number of invocation errors +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{error}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_errors = types.Metric{ + .name = "faas.errors", + .brief = "Number of invocation errors", + .stability = .development, + .instrument = .counter, + .unit = "{error}", + .value_type = .double, +}; + +/// Measures the duration of the function's initialization, such as a cold start +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_init_duration = types.Metric{ + .name = "faas.init_duration", + .brief = "Measures the duration of the function's initialization, such as a cold start", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Number of successful invocations +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{invocation}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_invocations = types.Metric{ + .name = "faas.invocations", + .brief = "Number of successful invocations", + .stability = .development, + .instrument = .counter, + .unit = "{invocation}", + .value_type = .double, +}; + +/// Measures the duration of the function's logic execution +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_invoke_duration = types.Metric{ + .name = "faas.invoke_duration", + .brief = "Measures the duration of the function's logic execution", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Distribution of max memory usage per invocation +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_mem_usage = types.Metric{ + .name = "faas.mem_usage", + .brief = "Distribution of max memory usage per invocation", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Distribution of net I/O usage per invocation +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_net_io = types.Metric{ + .name = "faas.net_io", + .brief = "Distribution of net I/O usage per invocation", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Number of invocation timeouts +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{timeout}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `faas.trigger` | `Recommended` | +pub const faas_timeouts = types.Metric{ + .name = "faas.timeouts", + .brief = "Number of invocation timeouts", + .stability = .development, + .instrument = .counter, + .unit = "{timeout}", + .value_type = .double, +}; + +/// GenAI operation duration +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: if the operation ended in an error | +/// | `gen_ai.operation.name` | `Required` | +/// | `gen_ai.request.model` | `Conditionally_required`: If available. | +/// | `gen_ai.response.model` | `Recommended` | +/// | `gen_ai.system` | `Required` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If `server.address` is set. | +pub const gen_ai_client_operation_duration = types.Metric{ + .name = "gen_ai.client.operation.duration", + .brief = "GenAI operation duration", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Measures number of input and output tokens used +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `{token}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `gen_ai.operation.name` | `Required` | +/// | `gen_ai.request.model` | `Conditionally_required`: If available. | +/// | `gen_ai.response.model` | `Recommended` | +/// | `gen_ai.system` | `Required` | +/// | `gen_ai.token.type` | `Required` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If `server.address` is set. | +pub const gen_ai_client_token_usage = types.Metric{ + .name = "gen_ai.client.token.usage", + .brief = "Measures number of input and output tokens used", + .stability = .development, + .instrument = .histogram, + .unit = "{token}", + .value_type = .double, +}; + +/// Generative AI server request duration such as time-to-last byte or last output token +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: if the operation ended in an error | +/// | `gen_ai.operation.name` | `Required` | +/// | `gen_ai.request.model` | `Conditionally_required`: If available. | +/// | `gen_ai.response.model` | `Recommended` | +/// | `gen_ai.system` | `Required` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If `server.address` is set. | +pub const gen_ai_server_request_duration = types.Metric{ + .name = "gen_ai.server.request.duration", + .brief = "Generative AI server request duration such as time-to-last byte or last output token", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Time per output token generated after the first token for successful responses +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `gen_ai.operation.name` | `Required` | +/// | `gen_ai.request.model` | `Conditionally_required`: If available. | +/// | `gen_ai.response.model` | `Recommended` | +/// | `gen_ai.system` | `Required` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If `server.address` is set. | +pub const gen_ai_server_time_per_output_token = types.Metric{ + .name = "gen_ai.server.time_per_output_token", + .brief = "Time per output token generated after the first token for successful responses", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Time to generate first token for successful responses +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `gen_ai.operation.name` | `Required` | +/// | `gen_ai.request.model` | `Conditionally_required`: If available. | +/// | `gen_ai.response.model` | `Recommended` | +/// | `gen_ai.system` | `Required` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Conditionally_required`: If `server.address` is set. | +pub const gen_ai_server_time_to_first_token = types.Metric{ + .name = "gen_ai.server.time_to_first_token", + .brief = "Time to generate first token for successful responses", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Heap size target percentage configured by the user, otherwise 100. +/// +/// Notes: The value range is \[0.0,100.0\]. Computed from `/gc/gogc:percent`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `%` | `Development` | +pub const go_config_gogc = types.Metric{ + .name = "go.config.gogc", + .brief = "Heap size target percentage configured by the user, otherwise 100.", + .stability = .development, + .instrument = .updowncounter, + .unit = "%", + .value_type = .double, +}; + +/// Count of live goroutines. +/// +/// Notes: Computed from `/sched/goroutines:goroutines`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{goroutine}` | `Development` | +pub const go_goroutine_count = types.Metric{ + .name = "go.goroutine.count", + .brief = "Count of live goroutines.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{goroutine}", + .value_type = .double, +}; + +/// Memory allocated to the heap by the application. +/// +/// Notes: Computed from `/gc/heap/allocs:bytes`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +pub const go_memory_allocated = types.Metric{ + .name = "go.memory.allocated", + .brief = "Memory allocated to the heap by the application.", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// Count of allocations to the heap by the application. +/// +/// Notes: Computed from `/gc/heap/allocs:objects`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{allocation}` | `Development` | +pub const go_memory_allocations = types.Metric{ + .name = "go.memory.allocations", + .brief = "Count of allocations to the heap by the application.", + .stability = .development, + .instrument = .counter, + .unit = "{allocation}", + .value_type = .double, +}; + +/// Heap size target for the end of the GC cycle. +/// +/// Notes: Computed from `/gc/heap/goal:bytes`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const go_memory_gc_goal = types.Metric{ + .name = "go.memory.gc.goal", + .brief = "Heap size target for the end of the GC cycle.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Go runtime memory limit configured by the user, if a limit exists. +/// +/// Notes: Computed from `/gc/gomemlimit:bytes`. This metric is excluded if the limit obtained from the Go runtime is math.MaxInt64. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const go_memory_limit = types.Metric{ + .name = "go.memory.limit", + .brief = "Go runtime memory limit configured by the user, if a limit exists.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Memory used by the Go runtime. +/// +/// Notes: Computed from `(/memory/classes/total:bytes - /memory/classes/heap/released:bytes)`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `go.memory.type` | `Recommended` | +pub const go_memory_used = types.Metric{ + .name = "go.memory.used", + .brief = "Memory used by the Go runtime.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The number of OS threads that can execute user-level Go code simultaneously. +/// +/// Notes: Computed from `/sched/gomaxprocs:threads`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{thread}` | `Development` | +pub const go_processor_limit = types.Metric{ + .name = "go.processor.limit", + .brief = "The number of OS threads that can execute user-level Go code simultaneously.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{thread}", + .value_type = .double, +}; + +/// The time goroutines have spent in the scheduler in a runnable state before actually running. +/// +/// Notes: Computed from `/sched/latencies:seconds`. Bucket boundaries are provided by the runtime, and are subject to change. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +pub const go_schedule_duration = types.Metric{ + .name = "go.schedule.duration", + .brief = "The time goroutines have spent in the scheduler in a runnable state before actually running.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Number of active HTTP requests. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{request}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `http.request.method` | `Recommended` | +/// | `server.address` | `Required` | +/// | `server.port` | `Required` | +/// | `url.scheme` | `Opt_in` | +/// | `url.template` | `Conditionally_required`: If available. | +pub const http_client_active_requests = types.Metric{ + .name = "http.client.active_requests", + .brief = "Number of active HTTP requests.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{request}", + .value_type = .double, +}; + +/// The duration of the successfully established outbound HTTP connections. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.peer.address` | `Recommended` | +/// | `network.protocol.version` | `Recommended` | +/// | `server.address` | `Required` | +/// | `server.port` | `Required` | +/// | `url.scheme` | `Opt_in` | +pub const http_client_connection_duration = types.Metric{ + .name = "http.client.connection.duration", + .brief = "The duration of the successfully established outbound HTTP connections.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Number of outbound HTTP connections that are currently active or idle on the client. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `http.connection.state` | `Required` | +/// | `network.peer.address` | `Recommended` | +/// | `network.protocol.version` | `Recommended` | +/// | `server.address` | `Required` | +/// | `server.port` | `Required` | +/// | `url.scheme` | `Opt_in` | +pub const http_client_open_connections = types.Metric{ + .name = "http.client.open_connections", + .brief = "Number of outbound HTTP connections that are currently active or idle on the client.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// Size of HTTP client request bodies. +/// +/// 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. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If request has ended with an error. | +/// | `http.request.method` | `Required` | +/// | `http.response.status_code` | `Conditionally_required`: If and only if one was received/sent. | +/// | `network.protocol.name` | `Conditionally_required`: If not `http` and `network.protocol.version` is set. | +/// | `network.protocol.version` | `Recommended` | +/// | `server.address` | `Required` | +/// | `server.port` | `Required` | +/// | `url.scheme` | `Opt_in` | +/// | `url.template` | `Conditionally_required`: If available. | +pub const http_client_request_body_size = types.Metric{ + .name = "http.client.request.body.size", + .brief = "Size of HTTP client request bodies.", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Duration of HTTP client requests. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If request has ended with an error. | +/// | `http.request.method` | `Required` | +/// | `http.response.status_code` | `Conditionally_required`: If and only if one was received/sent. | +/// | `network.protocol.name` | `Conditionally_required`: If not `http` and `network.protocol.version` is set. | +/// | `network.protocol.version` | `Recommended` | +/// | `server.address` | `Required` | +/// | `server.port` | `Required` | +/// | `url.scheme` | `Opt_in` | +/// | `url.template` | `Opt_in` | +pub const http_client_request_duration = types.Metric{ + .name = "http.client.request.duration", + .brief = "Duration of HTTP client requests.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Size of HTTP client response bodies. +/// +/// 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. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If request has ended with an error. | +/// | `http.request.method` | `Required` | +/// | `http.response.status_code` | `Conditionally_required`: If and only if one was received/sent. | +/// | `network.protocol.name` | `Conditionally_required`: If not `http` and `network.protocol.version` is set. | +/// | `network.protocol.version` | `Recommended` | +/// | `server.address` | `Required` | +/// | `server.port` | `Required` | +/// | `url.scheme` | `Opt_in` | +/// | `url.template` | `Conditionally_required`: If available. | +pub const http_client_response_body_size = types.Metric{ + .name = "http.client.response.body.size", + .brief = "Size of HTTP client response bodies.", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Number of active HTTP server requests. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{request}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `http.request.method` | `Required` | +/// | `server.address` | `Opt_in` | +/// | `server.port` | `Opt_in` | +/// | `url.scheme` | `Required` | +pub const http_server_active_requests = types.Metric{ + .name = "http.server.active_requests", + .brief = "Number of active HTTP server requests.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{request}", + .value_type = .double, +}; + +/// Size of HTTP server request bodies. +/// +/// 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. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If request has ended with an error. | +/// | `http.request.method` | `Required` | +/// | `http.response.status_code` | `Conditionally_required`: If and only if one was received/sent. | +/// | `http.route` | `Conditionally_required`: If and only if it's available | +/// | `network.protocol.name` | `Conditionally_required`: If not `http` and `network.protocol.version` is set. | +/// | `network.protocol.version` | `Recommended` | +/// | `server.address` | `Opt_in` | +/// | `server.port` | `Opt_in` | +/// | `url.scheme` | `Required` | +/// | `user_agent.synthetic.type` | `Opt_in` | +pub const http_server_request_body_size = types.Metric{ + .name = "http.server.request.body.size", + .brief = "Size of HTTP server request bodies.", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Duration of HTTP server requests. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If request has ended with an error. | +/// | `http.request.method` | `Required` | +/// | `http.response.status_code` | `Conditionally_required`: If and only if one was received/sent. | +/// | `http.route` | `Conditionally_required`: If and only if it's available | +/// | `network.protocol.name` | `Conditionally_required`: If not `http` and `network.protocol.version` is set. | +/// | `network.protocol.version` | `Recommended` | +/// | `server.address` | `Opt_in` | +/// | `server.port` | `Opt_in` | +/// | `url.scheme` | `Required` | +/// | `user_agent.synthetic.type` | `Opt_in` | +pub const http_server_request_duration = types.Metric{ + .name = "http.server.request.duration", + .brief = "Duration of HTTP server requests.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Size of HTTP server response bodies. +/// +/// 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. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If request has ended with an error. | +/// | `http.request.method` | `Required` | +/// | `http.response.status_code` | `Conditionally_required`: If and only if one was received/sent. | +/// | `http.route` | `Conditionally_required`: If and only if it's available | +/// | `network.protocol.name` | `Conditionally_required`: If not `http` and `network.protocol.version` is set. | +/// | `network.protocol.version` | `Recommended` | +/// | `server.address` | `Opt_in` | +/// | `server.port` | `Opt_in` | +/// | `url.scheme` | `Required` | +/// | `user_agent.synthetic.type` | `Opt_in` | +pub const http_server_response_body_size = types.Metric{ + .name = "http.server.response.body.size", + .brief = "Size of HTTP server response bodies.", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Energy consumed by the component +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `J` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `hw.id` | `Required` | +/// | `hw.name` | `Recommended` | +/// | `hw.parent` | `Recommended` | +/// | `hw.type` | `Required` | +pub const hw_energy = types.Metric{ + .name = "hw.energy", + .brief = "Energy consumed by the component", + .stability = .development, + .instrument = .counter, + .unit = "J", + .value_type = .double, +}; + +/// Number of errors encountered by the component +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{error}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: if and only if an error has occurred | +/// | `hw.id` | `Required` | +/// | `hw.name` | `Recommended` | +/// | `hw.parent` | `Recommended` | +/// | `hw.type` | `Required` | +pub const hw_errors = types.Metric{ + .name = "hw.errors", + .brief = "Number of errors encountered by the component", + .stability = .development, + .instrument = .counter, + .unit = "{error}", + .value_type = .double, +}; + +/// Ambient (external) temperature of the physical host +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `Cel` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `hw.id` | `Required` | +/// | `hw.name` | `Recommended` | +/// | `hw.parent` | `Recommended` | +pub const hw_host_ambient_temperature = types.Metric{ + .name = "hw.host.ambient_temperature", + .brief = "Ambient (external) temperature of the physical host", + .stability = .development, + .instrument = .gauge, + .unit = "Cel", + .value_type = .double, +}; + +/// Total energy consumed by the entire physical host, in joules +/// +/// Notes: The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `J` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `hw.id` | `Required` | +/// | `hw.name` | `Recommended` | +/// | `hw.parent` | `Recommended` | +pub const hw_host_energy = types.Metric{ + .name = "hw.host.energy", + .brief = "Total energy consumed by the entire physical host, in joules", + .stability = .development, + .instrument = .counter, + .unit = "J", + .value_type = .double, +}; + +/// By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `Cel` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `hw.id` | `Required` | +/// | `hw.name` | `Recommended` | +/// | `hw.parent` | `Recommended` | +pub const hw_host_heating_margin = types.Metric{ + .name = "hw.host.heating_margin", + .brief = "By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors", + .stability = .development, + .instrument = .gauge, + .unit = "Cel", + .value_type = .double, +}; + +/// Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred) +/// +/// +/// Notes: The overall energy usage of a host MUST be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `W` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `hw.id` | `Required` | +/// | `hw.name` | `Recommended` | +/// | `hw.parent` | `Recommended` | +pub const hw_host_power = types.Metric{ + .name = "hw.host.power", + .brief = "Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred)", + .stability = .development, + .instrument = .gauge, + .unit = "W", + .value_type = .double, +}; + +/// Instantaneous power consumed by the component +/// +/// Notes: It is recommended to report `hw.energy` instead of `hw.power` when possible. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `W` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `hw.id` | `Required` | +/// | `hw.name` | `Recommended` | +/// | `hw.parent` | `Recommended` | +/// | `hw.type` | `Required` | +pub const hw_power = types.Metric{ + .name = "hw.power", + .brief = "Instantaneous power consumed by the component", + .stability = .development, + .instrument = .gauge, + .unit = "W", + .value_type = .double, +}; + +/// Operational status: `1` (true) or `0` (false) for each of the possible states +/// +/// Notes: `hw.status` is currently specified as an *UpDownCounter* but would ideally be represented using a [*StateSet* as defined in OpenMetrics](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#stateset). This semantic convention will be updated once *StateSet* is specified in OpenTelemetry. This planned change is not expected to have any consequence on the way users query their timeseries backend to retrieve the values of `hw.status` over time. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `1` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `hw.id` | `Required` | +/// | `hw.name` | `Recommended` | +/// | `hw.parent` | `Recommended` | +/// | `hw.state` | `Required` | +/// | `hw.type` | `Required` | +pub const hw_status = types.Metric{ + .name = "hw.status", + .brief = "Operational status: `1` (true) or `0` (false) for each of the possible states", + .stability = .development, + .instrument = .updowncounter, + .unit = "1", + .value_type = .double, +}; + +/// Number of buffers in the pool. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{buffer}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.buffer.pool.name` | `Recommended` | +pub const jvm_buffer_count = types.Metric{ + .name = "jvm.buffer.count", + .brief = "Number of buffers in the pool.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{buffer}", + .value_type = .double, +}; + +/// Measure of total memory capacity of buffers. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.buffer.pool.name` | `Recommended` | +pub const jvm_buffer_memory_limit = types.Metric{ + .name = "jvm.buffer.memory.limit", + .brief = "Measure of total memory capacity of buffers.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Deprecated, use `jvm.buffer.memory.used` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.buffer.pool.name` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `jvm.buffer.memory.used`. +pub const jvm_buffer_memory_usage = types.Metric{ + .name = "jvm.buffer.memory.usage", + .brief = "Deprecated, use `jvm.buffer.memory.used` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, + .deprecated_reason = "Replaced by `jvm.buffer.memory.used`.", +}; + +/// Measure of memory used by buffers. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.buffer.pool.name` | `Recommended` | +pub const jvm_buffer_memory_used = types.Metric{ + .name = "jvm.buffer.memory.used", + .brief = "Measure of memory used by buffers.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Number of classes currently loaded. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{class}` | `Stable` | +pub const jvm_class_count = types.Metric{ + .name = "jvm.class.count", + .brief = "Number of classes currently loaded.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{class}", + .value_type = .double, +}; + +/// Number of classes loaded since JVM start. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{class}` | `Stable` | +pub const jvm_class_loaded = types.Metric{ + .name = "jvm.class.loaded", + .brief = "Number of classes loaded since JVM start.", + .stability = .stable, + .instrument = .counter, + .unit = "{class}", + .value_type = .double, +}; + +/// Number of classes unloaded since JVM start. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{class}` | `Stable` | +pub const jvm_class_unloaded = types.Metric{ + .name = "jvm.class.unloaded", + .brief = "Number of classes unloaded since JVM start.", + .stability = .stable, + .instrument = .counter, + .unit = "{class}", + .value_type = .double, +}; + +/// Number of processors available to the Java virtual machine. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Stable` | +pub const jvm_cpu_count = types.Metric{ + .name = "jvm.cpu.count", + .brief = "Number of processors available to the Java virtual machine.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Recent CPU utilization for the process as reported by the JVM. +/// +/// Notes: The value range is \[0.0,1.0\]. This utilization is not defined as being for the specific interval since last measurement (unlike `system.cpu.utilization`). [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Stable` | +pub const jvm_cpu_recent_utilization = types.Metric{ + .name = "jvm.cpu.recent_utilization", + .brief = "Recent CPU utilization for the process as reported by the JVM.", + .stability = .stable, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// CPU time used by the process as reported by the JVM. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Stable` | +pub const jvm_cpu_time = types.Metric{ + .name = "jvm.cpu.time", + .brief = "CPU time used by the process as reported by the JVM.", + .stability = .stable, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// Number of open file descriptors as reported by the JVM. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{file_descriptor}` | `Development` | +pub const jvm_file_descriptor_count = types.Metric{ + .name = "jvm.file_descriptor.count", + .brief = "Number of open file descriptors as reported by the JVM.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{file_descriptor}", + .value_type = .double, +}; + +/// Duration of JVM garbage collection actions. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.gc.action` | `Recommended` | +/// | `jvm.gc.cause` | `Opt_in` | +/// | `jvm.gc.name` | `Recommended` | +pub const jvm_gc_duration = types.Metric{ + .name = "jvm.gc.duration", + .brief = "Duration of JVM garbage collection actions.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Measure of memory committed. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.memory.pool.name` | `Recommended` | +/// | `jvm.memory.type` | `Recommended` | +pub const jvm_memory_committed = types.Metric{ + .name = "jvm.memory.committed", + .brief = "Measure of memory committed.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Measure of initial memory requested. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.memory.pool.name` | `Recommended` | +/// | `jvm.memory.type` | `Recommended` | +pub const jvm_memory_init = types.Metric{ + .name = "jvm.memory.init", + .brief = "Measure of initial memory requested.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Measure of max obtainable memory. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.memory.pool.name` | `Recommended` | +/// | `jvm.memory.type` | `Recommended` | +pub const jvm_memory_limit = types.Metric{ + .name = "jvm.memory.limit", + .brief = "Measure of max obtainable memory.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Measure of memory used. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.memory.pool.name` | `Recommended` | +/// | `jvm.memory.type` | `Recommended` | +pub const jvm_memory_used = types.Metric{ + .name = "jvm.memory.used", + .brief = "Measure of memory used.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Measure of memory used, as measured after the most recent garbage collection event on this pool. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.memory.pool.name` | `Recommended` | +/// | `jvm.memory.type` | `Recommended` | +pub const jvm_memory_used_after_last_gc = types.Metric{ + .name = "jvm.memory.used_after_last_gc", + .brief = "Measure of memory used, as measured after the most recent garbage collection event on this pool.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Average CPU load of the whole system for the last minute as reported by the JVM. +/// +/// Notes: The value range is \[0,n\], where n is the number of CPU cores - or a negative number if the value is not available. This utilization is not defined as being for the specific interval since last measurement (unlike `system.cpu.utilization`). [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{run_queue_item}` | `Development` | +pub const jvm_system_cpu_load_1m = types.Metric{ + .name = "jvm.system.cpu.load_1m", + .brief = "Average CPU load of the whole system for the last minute as reported by the JVM.", + .stability = .development, + .instrument = .gauge, + .unit = "{run_queue_item}", + .value_type = .double, +}; + +/// Recent CPU utilization for the whole system as reported by the JVM. +/// +/// Notes: The value range is \[0.0,1.0\]. This utilization is not defined as being for the specific interval since last measurement (unlike `system.cpu.utilization`). [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +pub const jvm_system_cpu_utilization = types.Metric{ + .name = "jvm.system.cpu.utilization", + .brief = "Recent CPU utilization for the whole system as reported by the JVM.", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// Number of executing platform threads. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{thread}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `jvm.thread.daemon` | `Recommended` | +/// | `jvm.thread.state` | `Recommended` | +pub const jvm_thread_count = types.Metric{ + .name = "jvm.thread.count", + .brief = "Number of executing platform threads.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{thread}", + .value_type = .double, +}; + +/// Maximum CPU resource limit set for the container +/// +/// Notes: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const k8s_container_cpu_limit = types.Metric{ + .name = "k8s.container.cpu.limit", + .brief = "Maximum CPU resource limit set for the container", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// CPU resource requested for the container +/// +/// Notes: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const k8s_container_cpu_request = types.Metric{ + .name = "k8s.container.cpu.request", + .brief = "CPU resource requested for the container", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Maximum ephemeral storage resource limit set for the container +/// +/// Notes: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_container_ephemeral_storage_limit = types.Metric{ + .name = "k8s.container.ephemeral_storage.limit", + .brief = "Maximum ephemeral storage resource limit set for the container", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Ephemeral storage resource requested for the container +/// +/// Notes: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_container_ephemeral_storage_request = types.Metric{ + .name = "k8s.container.ephemeral_storage.request", + .brief = "Ephemeral storage resource requested for the container", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Maximum memory resource limit set for the container +/// +/// Notes: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_container_memory_limit = types.Metric{ + .name = "k8s.container.memory.limit", + .brief = "Maximum memory resource limit set for the container", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Memory resource requested for the container +/// +/// Notes: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_container_memory_request = types.Metric{ + .name = "k8s.container.memory.request", + .brief = "Memory resource requested for the container", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Indicates whether the container is currently marked as ready to accept traffic, based on its readiness probe (1 = ready, 0 = not ready) +/// +/// +/// Notes: This metric SHOULD reflect the value of the `ready` field in the [K8s ContainerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{container}` | `Development` | +pub const k8s_container_ready = types.Metric{ + .name = "k8s.container.ready", + .brief = "Indicates whether the container is currently marked as ready to accept traffic, based on its readiness probe (1 = ready, 0 = not ready)", + .stability = .development, + .instrument = .updowncounter, + .unit = "{container}", + .value_type = .double, +}; + +/// Describes how many times the container has restarted (since the last counter reset) +/// +/// Notes: This value is pulled directly from the K8s API and the value can go indefinitely high and be reset to 0 at any time depending on how your kubelet is configured to prune dead containers. It is best to not depend too much on the exact value but rather look at it as either == 0, in which case you can conclude there were no restarts in the recent past, or ] 0, in which case you can conclude there were restarts in the recent past, and not try and analyze the value beyond that. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{restart}` | `Development` | +pub const k8s_container_restart_count = types.Metric{ + .name = "k8s.container.restart.count", + .brief = "Describes how many times the container has restarted (since the last counter reset)", + .stability = .development, + .instrument = .updowncounter, + .unit = "{restart}", + .value_type = .double, +}; + +/// Describes the number of K8s containers that are currently in a state for a given reason +/// +/// Notes: All possible container state reasons will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current state reason will be non-zero. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{container}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.container.status.reason` | `Required` | +pub const k8s_container_status_reason = types.Metric{ + .name = "k8s.container.status.reason", + .brief = "Describes the number of K8s containers that are currently in a state for a given reason", + .stability = .development, + .instrument = .updowncounter, + .unit = "{container}", + .value_type = .double, +}; + +/// Describes the number of K8s containers that are currently in a given state +/// +/// Notes: All possible container states will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current state will be non-zero. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{container}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.container.status.state` | `Required` | +pub const k8s_container_status_state = types.Metric{ + .name = "k8s.container.status.state", + .brief = "Describes the number of K8s containers that are currently in a given state", + .stability = .development, + .instrument = .updowncounter, + .unit = "{container}", + .value_type = .double, +}; + +/// Maximum storage resource limit set for the container +/// +/// Notes: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_container_storage_limit = types.Metric{ + .name = "k8s.container.storage.limit", + .brief = "Maximum storage resource limit set for the container", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Storage resource requested for the container +/// +/// Notes: See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_container_storage_request = types.Metric{ + .name = "k8s.container.storage.request", + .brief = "Storage resource requested for the container", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The number of actively running jobs for a cronjob +/// +/// Notes: This metric aligns with the `active` field of the [K8s CronJobStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#cronjobstatus-v1-batch). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{job}` | `Development` | +pub const k8s_cronjob_active_jobs = types.Metric{ + .name = "k8s.cronjob.active_jobs", + .brief = "The number of actively running jobs for a cronjob", + .stability = .development, + .instrument = .updowncounter, + .unit = "{job}", + .value_type = .double, +}; + +/// Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod +/// +/// Notes: This metric aligns with the `currentNumberScheduled` field of the [K8s DaemonSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{node}` | `Development` | +pub const k8s_daemonset_current_scheduled_nodes = types.Metric{ + .name = "k8s.daemonset.current_scheduled_nodes", + .brief = "Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod", + .stability = .development, + .instrument = .updowncounter, + .unit = "{node}", + .value_type = .double, +}; + +/// Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod) +/// +/// Notes: This metric aligns with the `desiredNumberScheduled` field of the [K8s DaemonSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{node}` | `Development` | +pub const k8s_daemonset_desired_scheduled_nodes = types.Metric{ + .name = "k8s.daemonset.desired_scheduled_nodes", + .brief = "Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod)", + .stability = .development, + .instrument = .updowncounter, + .unit = "{node}", + .value_type = .double, +}; + +/// Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod +/// +/// Notes: This metric aligns with the `numberMisscheduled` field of the [K8s DaemonSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{node}` | `Development` | +pub const k8s_daemonset_misscheduled_nodes = types.Metric{ + .name = "k8s.daemonset.misscheduled_nodes", + .brief = "Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod", + .stability = .development, + .instrument = .updowncounter, + .unit = "{node}", + .value_type = .double, +}; + +/// Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready +/// +/// Notes: This metric aligns with the `numberReady` field of the [K8s DaemonSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{node}` | `Development` | +pub const k8s_daemonset_ready_nodes = types.Metric{ + .name = "k8s.daemonset.ready_nodes", + .brief = "Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready", + .stability = .development, + .instrument = .updowncounter, + .unit = "{node}", + .value_type = .double, +}; + +/// Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment +/// +/// Notes: This metric aligns with the `availableReplicas` field of the [K8s DeploymentStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#deploymentstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_deployment_available_pods = types.Metric{ + .name = "k8s.deployment.available_pods", + .brief = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Number of desired replica pods in this deployment +/// +/// Notes: This metric aligns with the `replicas` field of the [K8s DeploymentSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#deploymentspec-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_deployment_desired_pods = types.Metric{ + .name = "k8s.deployment.desired_pods", + .brief = "Number of desired replica pods in this deployment", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler +/// +/// Notes: This metric aligns with the `currentReplicas` field of the [K8s HorizontalPodAutoscalerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_hpa_current_pods = types.Metric{ + .name = "k8s.hpa.current_pods", + .brief = "Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler +/// +/// Notes: This metric aligns with the `desiredReplicas` field of the [K8s HorizontalPodAutoscalerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_hpa_desired_pods = types.Metric{ + .name = "k8s.hpa.desired_pods", + .brief = "Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// The upper limit for the number of replica pods to which the autoscaler can scale up +/// +/// Notes: This metric aligns with the `maxReplicas` field of the [K8s HorizontalPodAutoscalerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_hpa_max_pods = types.Metric{ + .name = "k8s.hpa.max_pods", + .brief = "The upper limit for the number of replica pods to which the autoscaler can scale up", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Target average utilization, in percentage, for CPU resource in HPA config. +/// +/// Notes: This metric aligns with the `averageUtilization` field of the [K8s HPA MetricTarget](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#metrictarget-v2-autoscaling). If the type of the metric is [`ContainerResource`](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-metrics-apis), the `k8s.container.name` attribute MUST be set to identify the specific container within the pod to which the metric applies. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.container.name` | `Conditionally_required`: if and only if k8s.hpa.metric.type is ContainerResource. | +/// | `k8s.hpa.metric.type` | `Recommended` | +pub const k8s_hpa_metric_target_cpu_average_utilization = types.Metric{ + .name = "k8s.hpa.metric.target.cpu.average_utilization", + .brief = "Target average utilization, in percentage, for CPU resource in HPA config.", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// Target average value for CPU resource in HPA config. +/// +/// Notes: This metric aligns with the `averageValue` field of the [K8s HPA MetricTarget](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#metrictarget-v2-autoscaling). If the type of the metric is [`ContainerResource`](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-metrics-apis), the `k8s.container.name` attribute MUST be set to identify the specific container within the pod to which the metric applies. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{cpu}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.container.name` | `Conditionally_required`: if and only if k8s.hpa.metric.type is ContainerResource | +/// | `k8s.hpa.metric.type` | `Recommended` | +pub const k8s_hpa_metric_target_cpu_average_value = types.Metric{ + .name = "k8s.hpa.metric.target.cpu.average_value", + .brief = "Target average value for CPU resource in HPA config.", + .stability = .development, + .instrument = .gauge, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Target value for CPU resource in HPA config. +/// +/// Notes: This metric aligns with the `value` field of the [K8s HPA MetricTarget](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#metrictarget-v2-autoscaling). If the type of the metric is [`ContainerResource`](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-metrics-apis), the `k8s.container.name` attribute MUST be set to identify the specific container within the pod to which the metric applies. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{cpu}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.container.name` | `Conditionally_required`: if and only if k8s.hpa.metric.type is ContainerResource | +/// | `k8s.hpa.metric.type` | `Recommended` | +pub const k8s_hpa_metric_target_cpu_value = types.Metric{ + .name = "k8s.hpa.metric.target.cpu.value", + .brief = "Target value for CPU resource in HPA config.", + .stability = .development, + .instrument = .gauge, + .unit = "{cpu}", + .value_type = .double, +}; + +/// The lower limit for the number of replica pods to which the autoscaler can scale down +/// +/// Notes: This metric aligns with the `minReplicas` field of the [K8s HorizontalPodAutoscalerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_hpa_min_pods = types.Metric{ + .name = "k8s.hpa.min_pods", + .brief = "The lower limit for the number of replica pods to which the autoscaler can scale down", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// The number of pending and actively running pods for a job +/// +/// Notes: This metric aligns with the `active` field of the [K8s JobStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_job_active_pods = types.Metric{ + .name = "k8s.job.active_pods", + .brief = "The number of pending and actively running pods for a job", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// The desired number of successfully finished pods the job should be run with +/// +/// Notes: This metric aligns with the `completions` field of the [K8s JobSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobspec-v1-batch).. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_job_desired_successful_pods = types.Metric{ + .name = "k8s.job.desired_successful_pods", + .brief = "The desired number of successfully finished pods the job should be run with", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// The number of pods which reached phase Failed for a job +/// +/// Notes: This metric aligns with the `failed` field of the [K8s JobStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_job_failed_pods = types.Metric{ + .name = "k8s.job.failed_pods", + .brief = "The number of pods which reached phase Failed for a job", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// The max desired number of pods the job should run at any given time +/// +/// Notes: This metric aligns with the `parallelism` field of the [K8s JobSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobspec-v1-batch). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_job_max_parallel_pods = types.Metric{ + .name = "k8s.job.max_parallel_pods", + .brief = "The max desired number of pods the job should run at any given time", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// The number of pods which reached phase Succeeded for a job +/// +/// Notes: This metric aligns with the `succeeded` field of the [K8s JobStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_job_successful_pods = types.Metric{ + .name = "k8s.job.successful_pods", + .brief = "The number of pods which reached phase Succeeded for a job", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Describes number of K8s namespaces that are currently in a given phase. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{namespace}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.namespace.phase` | `Required` | +pub const k8s_namespace_phase = types.Metric{ + .name = "k8s.namespace.phase", + .brief = "Describes number of K8s namespaces that are currently in a given phase.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{namespace}", + .value_type = .double, +}; + +/// Amount of cpu allocatable on the node +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const k8s_node_allocatable_cpu = types.Metric{ + .name = "k8s.node.allocatable.cpu", + .brief = "Amount of cpu allocatable on the node", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Amount of ephemeral-storage allocatable on the node +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_node_allocatable_ephemeral_storage = types.Metric{ + .name = "k8s.node.allocatable.ephemeral_storage", + .brief = "Amount of ephemeral-storage allocatable on the node", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Amount of memory allocatable on the node +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_node_allocatable_memory = types.Metric{ + .name = "k8s.node.allocatable.memory", + .brief = "Amount of memory allocatable on the node", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Amount of pods allocatable on the node +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_node_allocatable_pods = types.Metric{ + .name = "k8s.node.allocatable.pods", + .brief = "Amount of pods allocatable on the node", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Describes the condition of a particular Node. +/// +/// Notes: All possible node condition pairs (type and status) will be reported at each time interval to avoid missing metrics. Condition pairs corresponding to the current conditions' statuses will be non-zero. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{node}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.node.condition.status` | `Required` | +/// | `k8s.node.condition.type` | `Required` | +pub const k8s_node_condition_status = types.Metric{ + .name = "k8s.node.condition.status", + .brief = "Describes the condition of a particular Node.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{node}", + .value_type = .double, +}; + +/// Total CPU time consumed +/// +/// Notes: Total CPU time consumed by the specific Node on all available CPU cores +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +pub const k8s_node_cpu_time = types.Metric{ + .name = "k8s.node.cpu.time", + .brief = "Total CPU time consumed", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs +/// +/// Notes: CPU usage of the specific Node on all available CPU cores, averaged over the sample window +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{cpu}` | `Development` | +pub const k8s_node_cpu_usage = types.Metric{ + .name = "k8s.node.cpu.usage", + .brief = "Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs", + .stability = .development, + .instrument = .gauge, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Memory usage of the Node +/// +/// Notes: Total memory usage of the Node +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `By` | `Development` | +pub const k8s_node_memory_usage = types.Metric{ + .name = "k8s.node.memory.usage", + .brief = "Memory usage of the Node", + .stability = .development, + .instrument = .gauge, + .unit = "By", + .value_type = .double, +}; + +/// Node network errors +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{error}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.interface.name` | `Recommended` | +/// | `network.io.direction` | `Recommended` | +pub const k8s_node_network_errors = types.Metric{ + .name = "k8s.node.network.errors", + .brief = "Node network errors", + .stability = .development, + .instrument = .counter, + .unit = "{error}", + .value_type = .double, +}; + +/// Network bytes for the Node +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.interface.name` | `Recommended` | +/// | `network.io.direction` | `Recommended` | +pub const k8s_node_network_io = types.Metric{ + .name = "k8s.node.network.io", + .brief = "Network bytes for the Node", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// The time the Node has been running +/// +/// Notes: Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const k8s_node_uptime = types.Metric{ + .name = "k8s.node.uptime", + .brief = "The time the Node has been running", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Total CPU time consumed +/// +/// Notes: Total CPU time consumed by the specific Pod on all available CPU cores +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +pub const k8s_pod_cpu_time = types.Metric{ + .name = "k8s.pod.cpu.time", + .brief = "Total CPU time consumed", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs +/// +/// Notes: CPU usage of the specific Pod on all available CPU cores, averaged over the sample window +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{cpu}` | `Development` | +pub const k8s_pod_cpu_usage = types.Metric{ + .name = "k8s.pod.cpu.usage", + .brief = "Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs", + .stability = .development, + .instrument = .gauge, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Memory usage of the Pod +/// +/// Notes: Total memory usage of the Pod +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `By` | `Development` | +pub const k8s_pod_memory_usage = types.Metric{ + .name = "k8s.pod.memory.usage", + .brief = "Memory usage of the Pod", + .stability = .development, + .instrument = .gauge, + .unit = "By", + .value_type = .double, +}; + +/// Pod network errors +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{error}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.interface.name` | `Recommended` | +/// | `network.io.direction` | `Recommended` | +pub const k8s_pod_network_errors = types.Metric{ + .name = "k8s.pod.network.errors", + .brief = "Pod network errors", + .stability = .development, + .instrument = .counter, + .unit = "{error}", + .value_type = .double, +}; + +/// Network bytes for the Pod +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.interface.name` | `Recommended` | +/// | `network.io.direction` | `Recommended` | +pub const k8s_pod_network_io = types.Metric{ + .name = "k8s.pod.network.io", + .brief = "Network bytes for the Pod", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// The time the Pod has been running +/// +/// Notes: Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const k8s_pod_uptime = types.Metric{ + .name = "k8s.pod.uptime", + .brief = "The time the Pod has been running", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset +/// +/// Notes: This metric aligns with the `availableReplicas` field of the [K8s ReplicaSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicasetstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_replicaset_available_pods = types.Metric{ + .name = "k8s.replicaset.available_pods", + .brief = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Number of desired replica pods in this replicaset +/// +/// Notes: This metric aligns with the `replicas` field of the [K8s ReplicaSetSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicasetspec-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_replicaset_desired_pods = types.Metric{ + .name = "k8s.replicaset.desired_pods", + .brief = "Number of desired replica pods in this replicaset", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Deprecated, use `k8s.replicationcontroller.available_pods` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +/// +/// Note: This metric is deprecated. Replaced by `k8s.replicationcontroller.available_pods`. +pub const k8s_replication_controller_available_pods = types.Metric{ + .name = "k8s.replication_controller.available_pods", + .brief = "Deprecated, use `k8s.replicationcontroller.available_pods` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, + .deprecated_reason = "Replaced by `k8s.replicationcontroller.available_pods`.", +}; + +/// Deprecated, use `k8s.replicationcontroller.desired_pods` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +/// +/// Note: This metric is deprecated. Replaced by `k8s.replicationcontroller.desired_pods`. +pub const k8s_replication_controller_desired_pods = types.Metric{ + .name = "k8s.replication_controller.desired_pods", + .brief = "Deprecated, use `k8s.replicationcontroller.desired_pods` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, + .deprecated_reason = "Replaced by `k8s.replicationcontroller.desired_pods`.", +}; + +/// Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller +/// +/// Notes: This metric aligns with the `availableReplicas` field of the [K8s ReplicationControllerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerstatus-v1-core) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_replicationcontroller_available_pods = types.Metric{ + .name = "k8s.replicationcontroller.available_pods", + .brief = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Number of desired replica pods in this replication controller +/// +/// Notes: This metric aligns with the `replicas` field of the [K8s ReplicationControllerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerspec-v1-core) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_replicationcontroller_desired_pods = types.Metric{ + .name = "k8s.replicationcontroller.desired_pods", + .brief = "Number of desired replica pods in this replication controller", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// The CPU limits in a specific namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const k8s_resourcequota_cpu_limit_hard = types.Metric{ + .name = "k8s.resourcequota.cpu.limit.hard", + .brief = "The CPU limits in a specific namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// The CPU limits in a specific namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const k8s_resourcequota_cpu_limit_used = types.Metric{ + .name = "k8s.resourcequota.cpu.limit.used", + .brief = "The CPU limits in a specific namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// The CPU requests in a specific namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const k8s_resourcequota_cpu_request_hard = types.Metric{ + .name = "k8s.resourcequota.cpu.request.hard", + .brief = "The CPU requests in a specific namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// The CPU requests in a specific namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const k8s_resourcequota_cpu_request_used = types.Metric{ + .name = "k8s.resourcequota.cpu.request.used", + .brief = "The CPU requests in a specific namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// The sum of local ephemeral storage limits in the namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_resourcequota_ephemeral_storage_limit_hard = types.Metric{ + .name = "k8s.resourcequota.ephemeral_storage.limit.hard", + .brief = "The sum of local ephemeral storage limits in the namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The sum of local ephemeral storage limits in the namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_resourcequota_ephemeral_storage_limit_used = types.Metric{ + .name = "k8s.resourcequota.ephemeral_storage.limit.used", + .brief = "The sum of local ephemeral storage limits in the namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The sum of local ephemeral storage requests in the namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_resourcequota_ephemeral_storage_request_hard = types.Metric{ + .name = "k8s.resourcequota.ephemeral_storage.request.hard", + .brief = "The sum of local ephemeral storage requests in the namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The sum of local ephemeral storage requests in the namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_resourcequota_ephemeral_storage_request_used = types.Metric{ + .name = "k8s.resourcequota.ephemeral_storage.request.used", + .brief = "The sum of local ephemeral storage requests in the namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The huge page requests in a specific namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{hugepage}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.hugepage.size` | `Required` | +pub const k8s_resourcequota_hugepage_count_request_hard = types.Metric{ + .name = "k8s.resourcequota.hugepage_count.request.hard", + .brief = "The huge page requests in a specific namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{hugepage}", + .value_type = .double, +}; + +/// The huge page requests in a specific namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{hugepage}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.hugepage.size` | `Required` | +pub const k8s_resourcequota_hugepage_count_request_used = types.Metric{ + .name = "k8s.resourcequota.hugepage_count.request.used", + .brief = "The huge page requests in a specific namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{hugepage}", + .value_type = .double, +}; + +/// The memory limits in a specific namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_resourcequota_memory_limit_hard = types.Metric{ + .name = "k8s.resourcequota.memory.limit.hard", + .brief = "The memory limits in a specific namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The memory limits in a specific namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_resourcequota_memory_limit_used = types.Metric{ + .name = "k8s.resourcequota.memory.limit.used", + .brief = "The memory limits in a specific namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The memory requests in a specific namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_resourcequota_memory_request_hard = types.Metric{ + .name = "k8s.resourcequota.memory.request.hard", + .brief = "The memory requests in a specific namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The memory requests in a specific namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const k8s_resourcequota_memory_request_used = types.Metric{ + .name = "k8s.resourcequota.memory.request.used", + .brief = "The memory requests in a specific namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The object count limits in a specific namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{object}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.resourcequota.resource_name` | `Required` | +pub const k8s_resourcequota_object_count_hard = types.Metric{ + .name = "k8s.resourcequota.object_count.hard", + .brief = "The object count limits in a specific namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{object}", + .value_type = .double, +}; + +/// The object count limits in a specific namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{object}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.resourcequota.resource_name` | `Required` | +pub const k8s_resourcequota_object_count_used = types.Metric{ + .name = "k8s.resourcequota.object_count.used", + .brief = "The object count limits in a specific namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{object}", + .value_type = .double, +}; + +/// The total number of PersistentVolumeClaims that can exist in the namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). The `k8s.storageclass.name` should be required when a resource quota is defined for a specific storage class. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{persistentvolumeclaim}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.storageclass.name` | `Conditionally_required`: The `k8s.storageclass.name` should be required when a resource quota is defined for a specific storage class. | +pub const k8s_resourcequota_persistentvolumeclaim_count_hard = types.Metric{ + .name = "k8s.resourcequota.persistentvolumeclaim_count.hard", + .brief = "The total number of PersistentVolumeClaims that can exist in the namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{persistentvolumeclaim}", + .value_type = .double, +}; + +/// The total number of PersistentVolumeClaims that can exist in the namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). The `k8s.storageclass.name` should be required when a resource quota is defined for a specific storage class. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{persistentvolumeclaim}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.storageclass.name` | `Conditionally_required`: The `k8s.storageclass.name` should be required when a resource quota is defined for a specific storage class. | +pub const k8s_resourcequota_persistentvolumeclaim_count_used = types.Metric{ + .name = "k8s.resourcequota.persistentvolumeclaim_count.used", + .brief = "The total number of PersistentVolumeClaims that can exist in the namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{persistentvolumeclaim}", + .value_type = .double, +}; + +/// The storage requests in a specific namespace. +/// The value represents the configured quota limit of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `hard` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). The `k8s.storageclass.name` should be required when a resource quota is defined for a specific storage class. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.storageclass.name` | `Conditionally_required`: The `k8s.storageclass.name` should be required when a resource quota is defined for a specific storage class. | +pub const k8s_resourcequota_storage_request_hard = types.Metric{ + .name = "k8s.resourcequota.storage.request.hard", + .brief = "The storage requests in a specific namespace. The value represents the configured quota limit of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The storage requests in a specific namespace. +/// The value represents the current observed total usage of the resource in the namespace. +/// +/// +/// Notes: This metric is retrieved from the `used` field of the [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). The `k8s.storageclass.name` should be required when a resource quota is defined for a specific storage class. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `k8s.storageclass.name` | `Conditionally_required`: The `k8s.storageclass.name` should be required when a resource quota is defined for a specific storage class. | +pub const k8s_resourcequota_storage_request_used = types.Metric{ + .name = "k8s.resourcequota.storage.request.used", + .brief = "The storage requests in a specific namespace. The value represents the current observed total usage of the resource in the namespace.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision +/// +/// Notes: This metric aligns with the `currentReplicas` field of the [K8s StatefulSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_statefulset_current_pods = types.Metric{ + .name = "k8s.statefulset.current_pods", + .brief = "The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Number of desired replica pods in this statefulset +/// +/// Notes: This metric aligns with the `replicas` field of the [K8s StatefulSetSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetspec-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_statefulset_desired_pods = types.Metric{ + .name = "k8s.statefulset.desired_pods", + .brief = "Number of desired replica pods in this statefulset", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// The number of replica pods created for this statefulset with a Ready Condition +/// +/// Notes: This metric aligns with the `readyReplicas` field of the [K8s StatefulSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_statefulset_ready_pods = types.Metric{ + .name = "k8s.statefulset.ready_pods", + .brief = "The number of replica pods created for this statefulset with a Ready Condition", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision +/// +/// Notes: This metric aligns with the `updatedReplicas` field of the [K8s StatefulSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{pod}` | `Development` | +pub const k8s_statefulset_updated_pods = types.Metric{ + .name = "k8s.statefulset.updated_pods", + .brief = "Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision", + .stability = .development, + .instrument = .updowncounter, + .unit = "{pod}", + .value_type = .double, +}; + +/// Number of connections that are currently active on the server. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.transport` | `Recommended` | +/// | `network.type` | `{"recommended": "if the transport is `tcp` or `udp`"}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Recommended` | +pub const kestrel_active_connections = types.Metric{ + .name = "kestrel.active_connections", + .brief = "Number of connections that are currently active on the server.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// Number of TLS handshakes that are currently in progress on the server. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{handshake}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.transport` | `Recommended` | +/// | `network.type` | `{"recommended": "if the transport is `tcp` or `udp`"}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Recommended` | +pub const kestrel_active_tls_handshakes = types.Metric{ + .name = "kestrel.active_tls_handshakes", + .brief = "Number of TLS handshakes that are currently in progress on the server.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{handshake}", + .value_type = .double, +}; + +/// The duration of connections on the server. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: if and only if an error has occurred. | +/// | `network.protocol.name` | `Recommended` | +/// | `network.protocol.version` | `Recommended` | +/// | `network.transport` | `Recommended` | +/// | `network.type` | `{"recommended": "if the transport is `tcp` or `udp`"}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Recommended` | +/// | `tls.protocol.version` | `Recommended` | +pub const kestrel_connection_duration = types.Metric{ + .name = "kestrel.connection.duration", + .brief = "The duration of connections on the server.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Number of connections that are currently queued and are waiting to start. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.transport` | `Recommended` | +/// | `network.type` | `{"recommended": "if the transport is `tcp` or `udp`"}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Recommended` | +pub const kestrel_queued_connections = types.Metric{ + .name = "kestrel.queued_connections", + .brief = "Number of connections that are currently queued and are waiting to start.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{request}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.protocol.name` | `Recommended` | +/// | `network.protocol.version` | `Recommended` | +/// | `network.transport` | `Recommended` | +/// | `network.type` | `{"recommended": "if the transport is `tcp` or `udp`"}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Recommended` | +pub const kestrel_queued_requests = types.Metric{ + .name = "kestrel.queued_requests", + .brief = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{request}", + .value_type = .double, +}; + +/// Number of connections rejected by the server. +/// +/// Notes: Connections are rejected when the currently active count exceeds the value configured with `MaxConcurrentConnections`. Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{connection}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.transport` | `Recommended` | +/// | `network.type` | `{"recommended": "if the transport is `tcp` or `udp`"}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Recommended` | +pub const kestrel_rejected_connections = types.Metric{ + .name = "kestrel.rejected_connections", + .brief = "Number of connections rejected by the server.", + .stability = .stable, + .instrument = .counter, + .unit = "{connection}", + .value_type = .double, +}; + +/// The duration of TLS handshakes on the server. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: if and only if an error has occurred. | +/// | `network.transport` | `Recommended` | +/// | `network.type` | `{"recommended": "if the transport is `tcp` or `udp`"}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Recommended` | +/// | `tls.protocol.version` | `Recommended` | +pub const kestrel_tls_handshake_duration = types.Metric{ + .name = "kestrel.tls_handshake.duration", + .brief = "The duration of TLS handshakes on the server.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Number of connections that are currently upgraded (WebSockets). . +/// +/// Notes: The counter only tracks HTTP/1.1 connections. Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.transport` | `Recommended` | +/// | `network.type` | `{"recommended": "if the transport is `tcp` or `udp`"}` | +/// | `server.address` | `Recommended` | +/// | `server.port` | `Recommended` | +pub const kestrel_upgraded_connections = types.Metric{ + .name = "kestrel.upgraded_connections", + .brief = "Number of connections that are currently upgraded (WebSockets). .", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// Number of messages that were delivered to the application. +/// +/// 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. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{message}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.consumer.group.name` | `Conditionally_required`: if applicable. | +/// | `messaging.destination.name` | `Conditionally_required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. | +/// | `messaging.destination.partition.id` | `Recommended` | +/// | `messaging.destination.subscription.name` | `Conditionally_required`: if applicable. | +/// | `messaging.destination.template` | `Conditionally_required`: if available. | +/// | `messaging.operation.name` | `Required` | +/// | `messaging.system` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +pub const messaging_client_consumed_messages = types.Metric{ + .name = "messaging.client.consumed.messages", + .brief = "Number of messages that were delivered to the application.", + .stability = .development, + .instrument = .counter, + .unit = "{message}", + .value_type = .double, +}; + +/// Duration of messaging operation initiated by a producer or consumer client. +/// +/// Notes: This metric SHOULD NOT be used to report processing duration - processing duration is reported in `messaging.process.duration` metric. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.consumer.group.name` | `Conditionally_required`: if applicable. | +/// | `messaging.destination.name` | `Conditionally_required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. | +/// | `messaging.destination.partition.id` | `Recommended` | +/// | `messaging.destination.subscription.name` | `Conditionally_required`: if applicable. | +/// | `messaging.destination.template` | `Conditionally_required`: if available. | +/// | `messaging.operation.name` | `Required` | +/// | `messaging.operation.type` | `Conditionally_required`: If applicable. | +/// | `messaging.system` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +pub const messaging_client_operation_duration = types.Metric{ + .name = "messaging.client.operation.duration", + .brief = "Duration of messaging operation initiated by a producer or consumer client.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Deprecated. Use `messaging.client.sent.messages` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{message}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.destination.name` | `Conditionally_required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. | +/// | `messaging.destination.partition.id` | `Recommended` | +/// | `messaging.destination.template` | `Conditionally_required`: if available. | +/// | `messaging.operation.name` | `Required` | +/// | `messaging.system` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `messaging.client.sent.messages`. +pub const messaging_client_published_messages = types.Metric{ + .name = "messaging.client.published.messages", + .brief = "Deprecated. Use `messaging.client.sent.messages` instead.", + .stability = .development, + .instrument = .counter, + .unit = "{message}", + .value_type = .double, + .deprecated_reason = "Replaced by `messaging.client.sent.messages`.", +}; + +/// Number of messages producer attempted to send to the broker. +/// +/// Notes: This metric MUST NOT count messages that were created but haven't yet been sent. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{message}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.destination.name` | `Conditionally_required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. | +/// | `messaging.destination.partition.id` | `Recommended` | +/// | `messaging.destination.template` | `Conditionally_required`: if available. | +/// | `messaging.operation.name` | `Required` | +/// | `messaging.system` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +pub const messaging_client_sent_messages = types.Metric{ + .name = "messaging.client.sent.messages", + .brief = "Number of messages producer attempted to send to the broker.", + .stability = .development, + .instrument = .counter, + .unit = "{message}", + .value_type = .double, +}; + +/// Duration of processing operation. +/// +/// Notes: This metric MUST be reported for operations with `messaging.operation.type` that matches `process`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.consumer.group.name` | `Conditionally_required`: if applicable. | +/// | `messaging.destination.name` | `Conditionally_required`: if and only if `messaging.destination.name` is known to have low cardinality. Otherwise, `messaging.destination.template` MAY be populated. | +/// | `messaging.destination.partition.id` | `Recommended` | +/// | `messaging.destination.subscription.name` | `Conditionally_required`: if applicable. | +/// | `messaging.destination.template` | `Conditionally_required`: if available. | +/// | `messaging.operation.name` | `Required` | +/// | `messaging.system` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +pub const messaging_process_duration = types.Metric{ + .name = "messaging.process.duration", + .brief = "Duration of processing operation.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Deprecated. Use `messaging.client.consumed.messages` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{message}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.operation.name` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `messaging.client.consumed.messages`. +pub const messaging_process_messages = types.Metric{ + .name = "messaging.process.messages", + .brief = "Deprecated. Use `messaging.client.consumed.messages` instead.", + .stability = .development, + .instrument = .counter, + .unit = "{message}", + .value_type = .double, + .deprecated_reason = "Replaced by `messaging.client.consumed.messages`.", +}; + +/// Deprecated. Use `messaging.client.operation.duration` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.operation.name` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `messaging.client.operation.duration`. +pub const messaging_publish_duration = types.Metric{ + .name = "messaging.publish.duration", + .brief = "Deprecated. Use `messaging.client.operation.duration` instead.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, + .deprecated_reason = "Replaced by `messaging.client.operation.duration`.", +}; + +/// Deprecated. Use `messaging.client.sent.messages` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{message}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.operation.name` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `messaging.client.sent.messages`. +pub const messaging_publish_messages = types.Metric{ + .name = "messaging.publish.messages", + .brief = "Deprecated. Use `messaging.client.sent.messages` instead.", + .stability = .development, + .instrument = .counter, + .unit = "{message}", + .value_type = .double, + .deprecated_reason = "Replaced by `messaging.client.sent.messages`.", +}; + +/// Deprecated. Use `messaging.client.operation.duration` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.operation.name` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `messaging.client.operation.duration`. +pub const messaging_receive_duration = types.Metric{ + .name = "messaging.receive.duration", + .brief = "Deprecated. Use `messaging.client.operation.duration` instead.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, + .deprecated_reason = "Replaced by `messaging.client.operation.duration`.", +}; + +/// Deprecated. Use `messaging.client.consumed.messages` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{message}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If and only if the messaging operation has failed. | +/// | `messaging.operation.name` | `Required` | +/// | `server.address` | `Conditionally_required`: If available. | +/// | `server.port` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `messaging.client.consumed.messages`. +pub const messaging_receive_messages = types.Metric{ + .name = "messaging.receive.messages", + .brief = "Deprecated. Use `messaging.client.consumed.messages` instead.", + .stability = .development, + .instrument = .counter, + .unit = "{message}", + .value_type = .double, + .deprecated_reason = "Replaced by `messaging.client.consumed.messages`.", +}; + +/// Event loop maximum delay. +/// +/// Notes: Value can be retrieved from value `histogram.max` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const nodejs_eventloop_delay_max = types.Metric{ + .name = "nodejs.eventloop.delay.max", + .brief = "Event loop maximum delay.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Event loop mean delay. +/// +/// Notes: Value can be retrieved from value `histogram.mean` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const nodejs_eventloop_delay_mean = types.Metric{ + .name = "nodejs.eventloop.delay.mean", + .brief = "Event loop mean delay.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Event loop minimum delay. +/// +/// Notes: Value can be retrieved from value `histogram.min` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const nodejs_eventloop_delay_min = types.Metric{ + .name = "nodejs.eventloop.delay.min", + .brief = "Event loop minimum delay.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Event loop 50 percentile delay. +/// +/// Notes: Value can be retrieved from value `histogram.percentile(50)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const nodejs_eventloop_delay_p50 = types.Metric{ + .name = "nodejs.eventloop.delay.p50", + .brief = "Event loop 50 percentile delay.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Event loop 90 percentile delay. +/// +/// Notes: Value can be retrieved from value `histogram.percentile(90)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const nodejs_eventloop_delay_p90 = types.Metric{ + .name = "nodejs.eventloop.delay.p90", + .brief = "Event loop 90 percentile delay.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Event loop 99 percentile delay. +/// +/// Notes: Value can be retrieved from value `histogram.percentile(99)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const nodejs_eventloop_delay_p99 = types.Metric{ + .name = "nodejs.eventloop.delay.p99", + .brief = "Event loop 99 percentile delay.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Event loop standard deviation delay. +/// +/// Notes: Value can be retrieved from value `histogram.stddev` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const nodejs_eventloop_delay_stddev = types.Metric{ + .name = "nodejs.eventloop.delay.stddev", + .brief = "Event loop standard deviation delay.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Cumulative duration of time the event loop has been in each state. +/// +/// Notes: Value can be retrieved from [`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `nodejs.eventloop.state` | `Required` | +pub const nodejs_eventloop_time = types.Metric{ + .name = "nodejs.eventloop.time", + .brief = "Cumulative duration of time the event loop has been in each state.", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// Event loop utilization. +/// +/// Notes: The value range is [0.0, 1.0] and can be retrieved from [`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +pub const nodejs_eventloop_utilization = types.Metric{ + .name = "nodejs.eventloop.utilization", + .brief = "Event loop utilization.", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// The number of log records for which the export has finished, either successful or failed +/// +/// Notes: For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` MUST contain the failure cause. For exporters with partial success semantics (e.g. OTLP with `rejected_log_records`), rejected log records MUST count as failed and only non-rejected log records count as success. If no rejection reason is available, `rejected` SHOULD be used as value for `error.type`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{log_record}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Recommended` | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +/// | `server.address` | `{"recommended": "when applicable"}` | +/// | `server.port` | `{"recommended": "when applicable"}` | +pub const otel_sdk_exporter_log_exported = types.Metric{ + .name = "otel.sdk.exporter.log.exported", + .brief = "The number of log records for which the export has finished, either successful or failed", + .stability = .development, + .instrument = .counter, + .unit = "{log_record}", + .value_type = .double, +}; + +/// The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed) +/// +/// Notes: For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` MUST contain the failure cause. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{log_record}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +/// | `server.address` | `{"recommended": "when applicable"}` | +/// | `server.port` | `{"recommended": "when applicable"}` | +pub const otel_sdk_exporter_log_inflight = types.Metric{ + .name = "otel.sdk.exporter.log.inflight", + .brief = "The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)", + .stability = .development, + .instrument = .updowncounter, + .unit = "{log_record}", + .value_type = .double, +}; + +/// The number of metric data points for which the export has finished, either successful or failed +/// +/// Notes: For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` MUST contain the failure cause. For exporters with partial success semantics (e.g. OTLP with `rejected_data_points`), rejected data points MUST count as failed and only non-rejected data points count as success. If no rejection reason is available, `rejected` SHOULD be used as value for `error.type`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{data_point}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Recommended` | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +/// | `server.address` | `{"recommended": "when applicable"}` | +/// | `server.port` | `{"recommended": "when applicable"}` | +pub const otel_sdk_exporter_metric_data_point_exported = types.Metric{ + .name = "otel.sdk.exporter.metric_data_point.exported", + .brief = "The number of metric data points for which the export has finished, either successful or failed", + .stability = .development, + .instrument = .counter, + .unit = "{data_point}", + .value_type = .double, +}; + +/// The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed) +/// +/// Notes: For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` MUST contain the failure cause. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{data_point}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +/// | `server.address` | `{"recommended": "when applicable"}` | +/// | `server.port` | `{"recommended": "when applicable"}` | +pub const otel_sdk_exporter_metric_data_point_inflight = types.Metric{ + .name = "otel.sdk.exporter.metric_data_point.inflight", + .brief = "The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)", + .stability = .development, + .instrument = .updowncounter, + .unit = "{data_point}", + .value_type = .double, +}; + +/// The duration of exporting a batch of telemetry records. +/// +/// Notes: This metric defines successful operations using the full success definitions for [http](https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1) and [grpc](https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success). Anything else is defined as an unsuccessful operation. For successful operations, `error.type` MUST NOT be set. For unsuccessful export operations, `error.type` MUST contain a relevant failure cause. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Conditionally_required`: If operation has ended with an error | +/// | `http.response.status_code` | `{"recommended": "when applicable"}` | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +/// | `rpc.grpc.status_code` | `{"recommended": "when applicable"}` | +/// | `server.address` | `{"recommended": "when applicable"}` | +/// | `server.port` | `{"recommended": "when applicable"}` | +pub const otel_sdk_exporter_operation_duration = types.Metric{ + .name = "otel.sdk.exporter.operation.duration", + .brief = "The duration of exporting a batch of telemetry records.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// The number of spans for which the export has finished, either successful or failed +/// +/// Notes: For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` MUST contain the failure cause. For exporters with partial success semantics (e.g. OTLP with `rejected_spans`), rejected spans MUST count as failed and only non-rejected spans count as success. If no rejection reason is available, `rejected` SHOULD be used as value for `error.type`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{span}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Recommended` | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +/// | `server.address` | `{"recommended": "when applicable"}` | +/// | `server.port` | `{"recommended": "when applicable"}` | +pub const otel_sdk_exporter_span_exported = types.Metric{ + .name = "otel.sdk.exporter.span.exported", + .brief = "The number of spans for which the export has finished, either successful or failed", + .stability = .development, + .instrument = .counter, + .unit = "{span}", + .value_type = .double, +}; + +/// Deprecated, use `otel.sdk.exporter.span.exported` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{span}` | `Development` | +/// +/// Note: This metric is deprecated. Replaced by `otel.sdk.exporter.span.exported`. +pub const otel_sdk_exporter_span_exported_count = types.Metric{ + .name = "otel.sdk.exporter.span.exported.count", + .brief = "Deprecated, use `otel.sdk.exporter.span.exported` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{span}", + .value_type = .double, + .deprecated_reason = "Replaced by `otel.sdk.exporter.span.exported`.", +}; + +/// The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed) +/// +/// Notes: For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` MUST contain the failure cause. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{span}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +/// | `server.address` | `{"recommended": "when applicable"}` | +/// | `server.port` | `{"recommended": "when applicable"}` | +pub const otel_sdk_exporter_span_inflight = types.Metric{ + .name = "otel.sdk.exporter.span.inflight", + .brief = "The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)", + .stability = .development, + .instrument = .updowncounter, + .unit = "{span}", + .value_type = .double, +}; + +/// Deprecated, use `otel.sdk.exporter.span.inflight` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{span}` | `Development` | +/// +/// Note: This metric is deprecated. Replaced by `otel.sdk.exporter.span.inflight`. +pub const otel_sdk_exporter_span_inflight_count = types.Metric{ + .name = "otel.sdk.exporter.span.inflight.count", + .brief = "Deprecated, use `otel.sdk.exporter.span.inflight` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{span}", + .value_type = .double, + .deprecated_reason = "Replaced by `otel.sdk.exporter.span.inflight`.", +}; + +/// The number of logs submitted to enabled SDK Loggers +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{log_record}` | `Development` | +pub const otel_sdk_log_created = types.Metric{ + .name = "otel.sdk.log.created", + .brief = "The number of logs submitted to enabled SDK Loggers", + .stability = .development, + .instrument = .counter, + .unit = "{log_record}", + .value_type = .double, +}; + +/// The duration of the collect operation of the metric reader. +/// +/// Notes: For successful collections, `error.type` MUST NOT be set. For failed collections, `error.type` SHOULD contain the failure cause. It can happen that metrics collection is successful for some MetricProducers, while others fail. In that case `error.type` SHOULD be set to any of the failure causes. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Recommended` | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +pub const otel_sdk_metric_reader_collection_duration = types.Metric{ + .name = "otel.sdk.metric_reader.collection.duration", + .brief = "The duration of the collect operation of the metric reader.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// The number of log records for which the processing has finished, either successful or failed +/// +/// Notes: For successful processing, `error.type` MUST NOT be set. For failed processing, `error.type` MUST contain the failure cause. For the SDK Simple and Batching Log Record Processor a log record is considered to be processed already when it has been submitted to the exporter, not when the corresponding export call has finished. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{log_record}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Recommended` | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +pub const otel_sdk_processor_log_processed = types.Metric{ + .name = "otel.sdk.processor.log.processed", + .brief = "The number of log records for which the processing has finished, either successful or failed", + .stability = .development, + .instrument = .counter, + .unit = "{log_record}", + .value_type = .double, +}; + +/// The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold +/// +/// Notes: Only applies to Log Record processors which use a queue, e.g. the SDK Batching Log Record Processor. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{log_record}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +pub const otel_sdk_processor_log_queue_capacity = types.Metric{ + .name = "otel.sdk.processor.log.queue.capacity", + .brief = "The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold", + .stability = .development, + .instrument = .updowncounter, + .unit = "{log_record}", + .value_type = .double, +}; + +/// The number of log records in the queue of a given instance of an SDK log processor +/// +/// Notes: Only applies to log record processors which use a queue, e.g. the SDK Batching Log Record Processor. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{log_record}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +pub const otel_sdk_processor_log_queue_size = types.Metric{ + .name = "otel.sdk.processor.log.queue.size", + .brief = "The number of log records in the queue of a given instance of an SDK log processor", + .stability = .development, + .instrument = .updowncounter, + .unit = "{log_record}", + .value_type = .double, +}; + +/// The number of spans for which the processing has finished, either successful or failed +/// +/// Notes: For successful processing, `error.type` MUST NOT be set. For failed processing, `error.type` MUST contain the failure cause. For the SDK Simple and Batching Span Processor a span is considered to be processed already when it has been submitted to the exporter, not when the corresponding export call has finished. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{span}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `error.type` | `Recommended` | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +pub const otel_sdk_processor_span_processed = types.Metric{ + .name = "otel.sdk.processor.span.processed", + .brief = "The number of spans for which the processing has finished, either successful or failed", + .stability = .development, + .instrument = .counter, + .unit = "{span}", + .value_type = .double, +}; + +/// Deprecated, use `otel.sdk.processor.span.processed` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{span}` | `Development` | +/// +/// Note: This metric is deprecated. Replaced by `otel.sdk.processor.span.processed`. +pub const otel_sdk_processor_span_processed_count = types.Metric{ + .name = "otel.sdk.processor.span.processed.count", + .brief = "Deprecated, use `otel.sdk.processor.span.processed` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{span}", + .value_type = .double, + .deprecated_reason = "Replaced by `otel.sdk.processor.span.processed`.", +}; + +/// The maximum number of spans the queue of a given instance of an SDK span processor can hold +/// +/// Notes: Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{span}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +pub const otel_sdk_processor_span_queue_capacity = types.Metric{ + .name = "otel.sdk.processor.span.queue.capacity", + .brief = "The maximum number of spans the queue of a given instance of an SDK span processor can hold", + .stability = .development, + .instrument = .updowncounter, + .unit = "{span}", + .value_type = .double, +}; + +/// The number of spans in the queue of a given instance of an SDK span processor +/// +/// Notes: Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{span}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.component.name` | `Recommended` | +/// | `otel.component.type` | `Recommended` | +pub const otel_sdk_processor_span_queue_size = types.Metric{ + .name = "otel.sdk.processor.span.queue.size", + .brief = "The number of spans in the queue of a given instance of an SDK span processor", + .stability = .development, + .instrument = .updowncounter, + .unit = "{span}", + .value_type = .double, +}; + +/// Use `otel.sdk.span.started` minus `otel.sdk.span.live` to derive this value. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{span}` | `Development` | +/// +/// Note: This metric is deprecated. Obsoleted. +pub const otel_sdk_span_ended = types.Metric{ + .name = "otel.sdk.span.ended", + .brief = "Use `otel.sdk.span.started` minus `otel.sdk.span.live` to derive this value.", + .stability = .development, + .instrument = .counter, + .unit = "{span}", + .value_type = .double, + .deprecated_reason = "Obsoleted.", +}; + +/// Use `otel.sdk.span.started` minus `otel.sdk.span.live` to derive this value. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{span}` | `Development` | +/// +/// Note: This metric is deprecated. Obsoleted. +pub const otel_sdk_span_ended_count = types.Metric{ + .name = "otel.sdk.span.ended.count", + .brief = "Use `otel.sdk.span.started` minus `otel.sdk.span.live` to derive this value.", + .stability = .development, + .instrument = .counter, + .unit = "{span}", + .value_type = .double, + .deprecated_reason = "Obsoleted.", +}; + +/// The number of created spans with `recording=true` for which the end operation has not been called yet +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{span}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.span.sampling_result` | `Recommended` | +pub const otel_sdk_span_live = types.Metric{ + .name = "otel.sdk.span.live", + .brief = "The number of created spans with `recording=true` for which the end operation has not been called yet", + .stability = .development, + .instrument = .updowncounter, + .unit = "{span}", + .value_type = .double, +}; + +/// Deprecated, use `otel.sdk.span.live` instead. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{span}` | `Development` | +/// +/// Note: This metric is deprecated. Replaced by `otel.sdk.span.live`. +pub const otel_sdk_span_live_count = types.Metric{ + .name = "otel.sdk.span.live.count", + .brief = "Deprecated, use `otel.sdk.span.live` instead.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{span}", + .value_type = .double, + .deprecated_reason = "Replaced by `otel.sdk.span.live`.", +}; + +/// The number of created spans +/// +/// Notes: Implementations MUST record this metric for all spans, even for non-recording ones. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{span}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `otel.span.parent.origin` | `Recommended` | +/// | `otel.span.sampling_result` | `Recommended` | +pub const otel_sdk_span_started = types.Metric{ + .name = "otel.sdk.span.started", + .brief = "The number of created spans", + .stability = .development, + .instrument = .counter, + .unit = "{span}", + .value_type = .double, +}; + +/// Number of times the process has been context switched. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{context_switch}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `process.context_switch_type` | `Recommended` | +pub const process_context_switches = types.Metric{ + .name = "process.context_switches", + .brief = "Number of times the process has been context switched.", + .stability = .development, + .instrument = .counter, + .unit = "{context_switch}", + .value_type = .double, +}; + +/// Total CPU seconds broken down by different states. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.mode` | `Recommended` | +pub const process_cpu_time = types.Metric{ + .name = "process.cpu.time", + .brief = "Total CPU seconds broken down by different states.", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.mode` | `Recommended` | +pub const process_cpu_utilization = types.Metric{ + .name = "process.cpu.utilization", + .brief = "Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process.", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// Disk bytes transferred. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `disk.io.direction` | `Recommended` | +pub const process_disk_io = types.Metric{ + .name = "process.disk.io", + .brief = "Disk bytes transferred.", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// The amount of physical memory in use. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const process_memory_usage = types.Metric{ + .name = "process.memory.usage", + .brief = "The amount of physical memory in use.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The amount of committed virtual memory. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const process_memory_virtual = types.Metric{ + .name = "process.memory.virtual", + .brief = "The amount of committed virtual memory.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Network bytes transferred. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.io.direction` | `Recommended` | +pub const process_network_io = types.Metric{ + .name = "process.network.io", + .brief = "Network bytes transferred.", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// Number of file descriptors in use by the process. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{file_descriptor}` | `Development` | +pub const process_open_file_descriptor_count = types.Metric{ + .name = "process.open_file_descriptor.count", + .brief = "Number of file descriptors in use by the process.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{file_descriptor}", + .value_type = .double, +}; + +/// Number of page faults the process has made. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{fault}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `process.paging.fault_type` | `Recommended` | +pub const process_paging_faults = types.Metric{ + .name = "process.paging.faults", + .brief = "Number of page faults the process has made.", + .stability = .development, + .instrument = .counter, + .unit = "{fault}", + .value_type = .double, +}; + +/// Process threads count. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{thread}` | `Development` | +pub const process_thread_count = types.Metric{ + .name = "process.thread.count", + .brief = "Process threads count.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{thread}", + .value_type = .double, +}; + +/// The time the process has been running. +/// +/// Notes: Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const process_uptime = types.Metric{ + .name = "process.uptime", + .brief = "The time the process has been running.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Measures the duration of outbound RPC. +/// +/// 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. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `ms` | `Development` | +pub const rpc_client_duration = types.Metric{ + .name = "rpc.client.duration", + .brief = "Measures the duration of outbound RPC.", + .stability = .development, + .instrument = .histogram, + .unit = "ms", + .value_type = .double, +}; + +/// Measures the size of RPC request messages (uncompressed). +/// +/// Notes: **Streaming**: Recorded per message in a streaming batch +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +pub const rpc_client_request_size = types.Metric{ + .name = "rpc.client.request.size", + .brief = "Measures the size of RPC request messages (uncompressed).", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Measures the number of messages received per RPC. +/// +/// Notes: Should be 1 for all non-streaming RPCs. **Streaming**: This metric is required for server and client streaming RPCs +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `{count}` | `Development` | +pub const rpc_client_requests_per_rpc = types.Metric{ + .name = "rpc.client.requests_per_rpc", + .brief = "Measures the number of messages received per RPC.", + .stability = .development, + .instrument = .histogram, + .unit = "{count}", + .value_type = .double, +}; + +/// Measures the size of RPC response messages (uncompressed). +/// +/// Notes: **Streaming**: Recorded per response in a streaming batch +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +pub const rpc_client_response_size = types.Metric{ + .name = "rpc.client.response.size", + .brief = "Measures the size of RPC response messages (uncompressed).", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Measures the number of messages sent per RPC. +/// +/// Notes: Should be 1 for all non-streaming RPCs. **Streaming**: This metric is required for server and client streaming RPCs +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `{count}` | `Development` | +pub const rpc_client_responses_per_rpc = types.Metric{ + .name = "rpc.client.responses_per_rpc", + .brief = "Measures the number of messages sent per RPC.", + .stability = .development, + .instrument = .histogram, + .unit = "{count}", + .value_type = .double, +}; + +/// Measures the duration of inbound RPC. +/// +/// 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. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `ms` | `Development` | +pub const rpc_server_duration = types.Metric{ + .name = "rpc.server.duration", + .brief = "Measures the duration of inbound RPC.", + .stability = .development, + .instrument = .histogram, + .unit = "ms", + .value_type = .double, +}; + +/// Measures the size of RPC request messages (uncompressed). +/// +/// Notes: **Streaming**: Recorded per message in a streaming batch +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +pub const rpc_server_request_size = types.Metric{ + .name = "rpc.server.request.size", + .brief = "Measures the size of RPC request messages (uncompressed).", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Measures the number of messages received per RPC. +/// +/// Notes: Should be 1 for all non-streaming RPCs. **Streaming** : This metric is required for server and client streaming RPCs +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `{count}` | `Development` | +pub const rpc_server_requests_per_rpc = types.Metric{ + .name = "rpc.server.requests_per_rpc", + .brief = "Measures the number of messages received per RPC.", + .stability = .development, + .instrument = .histogram, + .unit = "{count}", + .value_type = .double, +}; + +/// Measures the size of RPC response messages (uncompressed). +/// +/// Notes: **Streaming**: Recorded per response in a streaming batch +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `By` | `Development` | +pub const rpc_server_response_size = types.Metric{ + .name = "rpc.server.response.size", + .brief = "Measures the size of RPC response messages (uncompressed).", + .stability = .development, + .instrument = .histogram, + .unit = "By", + .value_type = .double, +}; + +/// Measures the number of messages sent per RPC. +/// +/// Notes: Should be 1 for all non-streaming RPCs. **Streaming**: This metric is required for server and client streaming RPCs +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `{count}` | `Development` | +pub const rpc_server_responses_per_rpc = types.Metric{ + .name = "rpc.server.responses_per_rpc", + .brief = "Measures the number of messages sent per RPC.", + .stability = .development, + .instrument = .histogram, + .unit = "{count}", + .value_type = .double, +}; + +/// Number of connections that are currently active on the server. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `signalr.connection.status` | `Recommended` | +/// | `signalr.transport` | `Recommended` | +pub const signalr_server_active_connections = types.Metric{ + .name = "signalr.server.active_connections", + .brief = "Number of connections that are currently active on the server.", + .stability = .stable, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// The duration of connections on the server. +/// +/// Notes: Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0 +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Stable` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `signalr.connection.status` | `Recommended` | +/// | `signalr.transport` | `Recommended` | +pub const signalr_server_connection_duration = types.Metric{ + .name = "signalr.server.connection.duration", + .brief = "The duration of connections on the server.", + .stability = .stable, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Operating frequency of the logical CPU in Hertz. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `Hz` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.logical_number` | `Recommended` | +pub const system_cpu_frequency = types.Metric{ + .name = "system.cpu.frequency", + .brief = "Operating frequency of the logical CPU in Hertz.", + .stability = .development, + .instrument = .gauge, + .unit = "Hz", + .value_type = .double, +}; + +/// Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking +/// +/// Notes: Calculated by multiplying the number of sockets by the number of cores per socket, and then by the number of threads per core +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const system_cpu_logical_count = types.Metric{ + .name = "system.cpu.logical.count", + .brief = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Reports the number of actual physical processor cores on the hardware +/// +/// Notes: Calculated by multiplying the number of sockets by the number of cores per socket +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{cpu}` | `Development` | +pub const system_cpu_physical_count = types.Metric{ + .name = "system.cpu.physical.count", + .brief = "Reports the number of actual physical processor cores on the hardware", + .stability = .development, + .instrument = .updowncounter, + .unit = "{cpu}", + .value_type = .double, +}; + +/// Seconds each logical CPU spent on each mode +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.logical_number` | `Recommended` | +/// | `cpu.mode` | `Recommended` | +pub const system_cpu_time = types.Metric{ + .name = "system.cpu.time", + .brief = "Seconds each logical CPU spent on each mode", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// For each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `cpu.logical_number` | `Recommended` | +/// | `cpu.mode` | `Recommended` | +pub const system_cpu_utilization = types.Metric{ + .name = "system.cpu.utilization", + .brief = "For each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time.", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `disk.io.direction` | `Recommended` | +/// | `system.device` | `Recommended` | +pub const system_disk_io = types.Metric{ + .name = "system.disk.io", + .brief = "", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// Time disk spent activated +/// +/// 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` +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.device` | `Recommended` | +pub const system_disk_io_time = types.Metric{ + .name = "system.disk.io_time", + .brief = "Time disk spent activated", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// The total storage capacity of the disk +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.device` | `Recommended` | +pub const system_disk_limit = types.Metric{ + .name = "system.disk.limit", + .brief = "The total storage capacity of the disk", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{operation}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `disk.io.direction` | `Recommended` | +/// | `system.device` | `Recommended` | +pub const system_disk_merged = types.Metric{ + .name = "system.disk.merged", + .brief = "", + .stability = .development, + .instrument = .counter, + .unit = "{operation}", + .value_type = .double, +}; + +/// Sum of the time each operation took to complete +/// +/// 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) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `disk.io.direction` | `Recommended` | +/// | `system.device` | `Recommended` | +pub const system_disk_operation_time = types.Metric{ + .name = "system.disk.operation_time", + .brief = "Sum of the time each operation took to complete", + .stability = .development, + .instrument = .counter, + .unit = "s", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{operation}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `disk.io.direction` | `Recommended` | +/// | `system.device` | `Recommended` | +pub const system_disk_operations = types.Metric{ + .name = "system.disk.operations", + .brief = "", + .stability = .development, + .instrument = .counter, + .unit = "{operation}", + .value_type = .double, +}; + +/// The total storage capacity of the filesystem +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.device` | `Recommended` | +/// | `system.filesystem.mode` | `Recommended` | +/// | `system.filesystem.mountpoint` | `Recommended` | +/// | `system.filesystem.type` | `Recommended` | +pub const system_filesystem_limit = types.Metric{ + .name = "system.filesystem.limit", + .brief = "The total storage capacity of the filesystem", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Reports a filesystem's space usage across different states. +/// +/// Notes: The sum of all `system.filesystem.usage` values over the different `system.filesystem.state` attributes SHOULD equal the total storage capacity of the filesystem, that is `system.filesystem.limit`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.device` | `Recommended` | +/// | `system.filesystem.mode` | `Recommended` | +/// | `system.filesystem.mountpoint` | `Recommended` | +/// | `system.filesystem.state` | `Recommended` | +/// | `system.filesystem.type` | `Recommended` | +pub const system_filesystem_usage = types.Metric{ + .name = "system.filesystem.usage", + .brief = "Reports a filesystem's space usage across different states.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.device` | `Recommended` | +/// | `system.filesystem.mode` | `Recommended` | +/// | `system.filesystem.mountpoint` | `Recommended` | +/// | `system.filesystem.state` | `Recommended` | +/// | `system.filesystem.type` | `Recommended` | +pub const system_filesystem_utilization = types.Metric{ + .name = "system.filesystem.utilization", + .brief = "", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// An estimate of how much memory is available for starting new applications, without causing swapping +/// +/// 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). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const system_linux_memory_available = types.Metric{ + .name = "system.linux.memory.available", + .brief = "An estimate of how much memory is available for starting new applications, without causing swapping", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Reports the memory used by the Linux kernel for managing caches of frequently used objects. +/// +/// 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). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `linux.memory.slab.state` | `Recommended` | +pub const system_linux_memory_slab_usage = types.Metric{ + .name = "system.linux.memory.slab.usage", + .brief = "Reports the memory used by the Linux kernel for managing caches of frequently used objects.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Total memory available in the system. +/// +/// Notes: Its value SHOULD equal the sum of `system.memory.state` over all states. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const system_memory_limit = types.Metric{ + .name = "system.memory.limit", + .brief = "Total memory available in the system.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Shared memory used (mostly by tmpfs). +/// +/// 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)" +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +pub const system_memory_shared = types.Metric{ + .name = "system.memory.shared", + .brief = "Shared memory used (mostly by tmpfs).", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Reports memory in use by state. +/// +/// Notes: The sum over all `system.memory.state` values SHOULD equal the total memory available on the system, that is `system.memory.limit`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.memory.state` | `Recommended` | +pub const system_memory_usage = types.Metric{ + .name = "system.memory.usage", + .brief = "Reports memory in use by state.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.memory.state` | `Recommended` | +pub const system_memory_utilization = types.Metric{ + .name = "system.memory.utilization", + .brief = "", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.connection.state` | `Recommended` | +/// | `network.interface.name` | `Recommended` | +/// | `network.transport` | `Recommended` | +pub const system_network_connection_count = types.Metric{ + .name = "system.network.connection.count", + .brief = "", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, +}; + +/// Deprecated, use `system.network.connection.count` instead +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{connection}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.connection.state` | `Recommended` | +/// | `network.interface.name` | `Recommended` | +/// | `network.transport` | `Recommended` | +/// +/// Note: This metric is deprecated. Replaced by `system.network.connection.count`. +pub const system_network_connections = types.Metric{ + .name = "system.network.connections", + .brief = "Deprecated, use `system.network.connection.count` instead", + .stability = .development, + .instrument = .updowncounter, + .unit = "{connection}", + .value_type = .double, + .deprecated_reason = "Replaced by `system.network.connection.count`.", +}; + +/// Count of packets that are dropped or discarded even though there was no error +/// +/// 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) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{packet}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.interface.name` | `Recommended` | +/// | `network.io.direction` | `Recommended` | +pub const system_network_dropped = types.Metric{ + .name = "system.network.dropped", + .brief = "Count of packets that are dropped or discarded even though there was no error", + .stability = .development, + .instrument = .counter, + .unit = "{packet}", + .value_type = .double, +}; + +/// Count of network errors detected +/// +/// 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). +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{error}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.interface.name` | `Recommended` | +/// | `network.io.direction` | `Recommended` | +pub const system_network_errors = types.Metric{ + .name = "system.network.errors", + .brief = "Count of network errors detected", + .stability = .development, + .instrument = .counter, + .unit = "{error}", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.interface.name` | `Recommended` | +/// | `network.io.direction` | `Recommended` | +pub const system_network_io = types.Metric{ + .name = "system.network.io", + .brief = "", + .stability = .development, + .instrument = .counter, + .unit = "By", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{packet}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `network.io.direction` | `Recommended` | +/// | `system.device` | `Recommended` | +pub const system_network_packets = types.Metric{ + .name = "system.network.packets", + .brief = "", + .stability = .development, + .instrument = .counter, + .unit = "{packet}", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{fault}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.paging.type` | `Recommended` | +pub const system_paging_faults = types.Metric{ + .name = "system.paging.faults", + .brief = "", + .stability = .development, + .instrument = .counter, + .unit = "{fault}", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{operation}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.paging.direction` | `Recommended` | +/// | `system.paging.type` | `Recommended` | +pub const system_paging_operations = types.Metric{ + .name = "system.paging.operations", + .brief = "", + .stability = .development, + .instrument = .counter, + .unit = "{operation}", + .value_type = .double, +}; + +/// Unix swap or windows pagefile usage +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.device` | `Recommended` | +/// | `system.paging.state` | `Recommended` | +pub const system_paging_usage = types.Metric{ + .name = "system.paging.usage", + .brief = "Unix swap or windows pagefile usage", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `1` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.device` | `Recommended` | +/// | `system.paging.state` | `Recommended` | +pub const system_paging_utilization = types.Metric{ + .name = "system.paging.utilization", + .brief = "", + .stability = .development, + .instrument = .gauge, + .unit = "1", + .value_type = .double, +}; + +/// Total number of processes in each state +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{process}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `system.process.status` | `Recommended` | +pub const system_process_count = types.Metric{ + .name = "system.process.count", + .brief = "Total number of processes in each state", + .stability = .development, + .instrument = .updowncounter, + .unit = "{process}", + .value_type = .double, +}; + +/// Total number of processes created over uptime of the host +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `counter` | `{process}` | `Development` | +pub const system_process_created = types.Metric{ + .name = "system.process.created", + .brief = "Total number of processes created over uptime of the host", + .stability = .development, + .instrument = .counter, + .unit = "{process}", + .value_type = .double, +}; + +/// The time the system has been running +/// +/// Notes: Instrumentations SHOULD use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +pub const system_uptime = types.Metric{ + .name = "system.uptime", + .brief = "The time the system has been running", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// Garbage collection duration. +/// +/// Notes: The values can be retrieved from [`perf_hooks.PerformanceObserver(...).observe({ entryTypes: ['gc'] })`](https://nodejs.org/api/perf_hooks.html#performanceobserverobserveoptions) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `histogram` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `v8js.gc.type` | `Required` | +pub const v8js_gc_duration = types.Metric{ + .name = "v8js.gc.duration", + .brief = "Garbage collection duration.", + .stability = .development, + .instrument = .histogram, + .unit = "s", + .value_type = .double, +}; + +/// Heap space available size. +/// +/// Notes: Value can be retrieved from value `space_available_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `v8js.heap.space.name` | `Required` | +pub const v8js_heap_space_available_size = types.Metric{ + .name = "v8js.heap.space.available_size", + .brief = "Heap space available size.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Committed size of a heap space. +/// +/// Notes: Value can be retrieved from value `physical_space_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `v8js.heap.space.name` | `Required` | +pub const v8js_heap_space_physical_size = types.Metric{ + .name = "v8js.heap.space.physical_size", + .brief = "Committed size of a heap space.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Total heap memory size pre-allocated. +/// +/// Notes: The value can be retrieved from value `space_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `v8js.heap.space.name` | `Required` | +pub const v8js_memory_heap_limit = types.Metric{ + .name = "v8js.memory.heap.limit", + .brief = "Total heap memory size pre-allocated.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// Heap Memory size allocated. +/// +/// Notes: The value can be retrieved from value `space_used_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `By` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `v8js.heap.space.name` | `Required` | +pub const v8js_memory_heap_used = types.Metric{ + .name = "v8js.memory.heap.used", + .brief = "Heap Memory size allocated.", + .stability = .development, + .instrument = .updowncounter, + .unit = "By", + .value_type = .double, +}; + +/// The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged) +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{change}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.change.state` | `Required` | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +pub const vcs_change_count = types.Metric{ + .name = "vcs.change.count", + .brief = "The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged)", + .stability = .development, + .instrument = .updowncounter, + .unit = "{change}", + .value_type = .double, +}; + +/// The time duration a change (pull request/merge request/changelist) has been in a given state. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.change.state` | `Required` | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.ref.head.name` | `Required` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +pub const vcs_change_duration = types.Metric{ + .name = "vcs.change.duration", + .brief = "The time duration a change (pull request/merge request/changelist) has been in a given state.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.ref.base.name` | `Recommended` | +/// | `vcs.ref.base.revision` | `Opt_in` | +/// | `vcs.ref.head.name` | `Required` | +/// | `vcs.ref.head.revision` | `Opt_in` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +pub const vcs_change_time_to_approval = types.Metric{ + .name = "vcs.change.time_to_approval", + .brief = "The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.ref.base.name` | `Recommended` | +/// | `vcs.ref.base.revision` | `Opt_in` | +/// | `vcs.ref.head.name` | `Required` | +/// | `vcs.ref.head.revision` | `Opt_in` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +pub const vcs_change_time_to_merge = types.Metric{ + .name = "vcs.change.time_to_merge", + .brief = "The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref.", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// The number of unique contributors to a repository +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{contributor}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +pub const vcs_contributor_count = types.Metric{ + .name = "vcs.contributor.count", + .brief = "The number of unique contributors to a repository", + .stability = .development, + .instrument = .gauge, + .unit = "{contributor}", + .value_type = .double, +}; + +/// The number of refs of type branch or tag in a repository. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{ref}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.ref.type` | `Required` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +pub const vcs_ref_count = types.Metric{ + .name = "vcs.ref.count", + .brief = "The number of refs of type branch or tag in a repository.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{ref}", + .value_type = .double, +}; + +/// The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute. +/// +/// Notes: This metric should be reported for each `vcs.line_change.type` value. For example if a ref added 3 lines and removed 2 lines, instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers). If number of lines added/removed should be calculated from the start of time, then `vcs.ref.base.name` SHOULD be set to an empty string. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{line}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.change.id` | `Conditionally_required`: if a change is associate with the ref. | +/// | `vcs.line_change.type` | `Required` | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.ref.base.name` | `Required` | +/// | `vcs.ref.base.type` | `Required` | +/// | `vcs.ref.head.name` | `Required` | +/// | `vcs.ref.head.type` | `Required` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +pub const vcs_ref_lines_delta = types.Metric{ + .name = "vcs.ref.lines_delta", + .brief = "The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute.", + .stability = .development, + .instrument = .gauge, + .unit = "{line}", + .value_type = .double, +}; + +/// The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute +/// +/// Notes: This metric should be reported for each `vcs.revision_delta.direction` value. For example if branch `a` is 3 commits behind and 2 commits ahead of `trunk`, instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers) and `vcs.ref.base.name` is set to `trunk`. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `{revision}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.change.id` | `Conditionally_required`: if a change is associate with the ref. | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.ref.base.name` | `Required` | +/// | `vcs.ref.base.type` | `Required` | +/// | `vcs.ref.head.name` | `Required` | +/// | `vcs.ref.head.type` | `Required` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +/// | `vcs.revision_delta.direction` | `Required` | +pub const vcs_ref_revisions_delta = types.Metric{ + .name = "vcs.ref.revisions_delta", + .brief = "The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute", + .stability = .development, + .instrument = .gauge, + .unit = "{revision}", + .value_type = .double, +}; + +/// Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch` +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `gauge` | `s` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +/// | `vcs.ref.head.name` | `Required` | +/// | `vcs.ref.head.type` | `Required` | +/// | `vcs.repository.name` | `Recommended` | +/// | `vcs.repository.url.full` | `Required` | +pub const vcs_ref_time = types.Metric{ + .name = "vcs.ref.time", + .brief = "Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`", + .stability = .development, + .instrument = .gauge, + .unit = "s", + .value_type = .double, +}; + +/// The number of repositories in an organization. +/// +/// ## Metadata +/// | Instrument | Unit | Status | +/// |:-|:-|:-| +/// | `updowncounter` | `{repository}` | `Development` | +/// +/// ## Attributes +/// | Name | Requirement | +/// |:-|:- | +/// | `vcs.owner.name` | `Recommended` | +/// | `vcs.provider.name` | `Opt_in` | +pub const vcs_repository_count = types.Metric{ + .name = "vcs.repository.count", + .brief = "The number of repositories in an organization.", + .stability = .development, + .instrument = .updowncounter, + .unit = "{repository}", + .value_type = .double, +}; + +test "semantic metrics" { + @import("std").testing.refAllDecls(@This()); +} diff --git a/src/network/registry.zig b/src/network/registry.zig deleted file mode 100644 index 5a2fd47..0000000 --- a/src/network/registry.zig +++ /dev/null @@ -1,330 +0,0 @@ -//! Network semantic conventions -//! -//! This module provides semantic convention attributes for network instrumentation. -//! Based on OpenTelemetry Network semantic conventions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Network transport protocol -pub const NetworkTransport = enum { - tcp, - udp, - pipe, - unix, - - pub fn toString(self: NetworkTransport) []const u8 { - return switch (self) { - .tcp => "tcp", - .udp => "udp", - .pipe => "pipe", - .unix => "unix", - }; - } - - pub fn fromString(value: []const u8) ?NetworkTransport { - const transports = [_]struct { str: []const u8, transport: NetworkTransport }{ - .{ .str = "tcp", .transport = .tcp }, - .{ .str = "udp", .transport = .udp }, - .{ .str = "pipe", .transport = .pipe }, - .{ .str = "unix", .transport = .unix }, - }; - - for (transports) |t| { - if (std.mem.eql(u8, value, t.str)) { - return t.transport; - } - } - return null; - } -}; - -/// Network connection type -pub const NetworkConnectionType = enum { - wifi, - wired, - cell, - unavailable, - unknown, - - pub fn toString(self: NetworkConnectionType) []const u8 { - return switch (self) { - .wifi => "wifi", - .wired => "wired", - .cell => "cell", - .unavailable => "unavailable", - .unknown => "unknown", - }; - } -}; - -/// Network connection subtype (for cellular) -pub const NetworkConnectionSubtype = enum { - gprs, - edge, - umts, - cdma, - evdo_0, - evdo_a, - cdma2000_1xrtt, - hsdpa, - hsupa, - hspa, - iden, - evdo_b, - lte, - ehrpd, - hspap, - gsm, - td_scdma, - iwlan, - nr, - nrnsa, - lte_ca, - - pub fn toString(self: NetworkConnectionSubtype) []const u8 { - return switch (self) { - .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", - }; - } -}; - -/// Network attribute registry -pub const Attributes = struct { - /// OSI transport layer or inter-process communication method - pub const transport = types.EnumAttribute(NetworkTransport).init( - "network.transport", - "OSI transport layer or inter-process communication method.", - .stable, - .conditionally_required, - &[_]NetworkTransport{ .tcp, .udp, .pipe, .unix }, - ).withNote("Generally tcp for TCP, udp for UDP, pipe for named or anonymous pipe, and unix for Unix domain socket.") - .withExamples(&[_][]const u8{ "tcp", "udp" }); - - /// OSI network layer or non-OSI equivalent - pub const network_type = types.StringAttribute.init( - "network.type", - "OSI network layer or non-OSI equivalent.", - .stable, - .recommended, - ).withNote("The value SHOULD be normalized to lowercase.") - .withExamples(&[_][]const u8{ "ipv4", "ipv6" }); - - /// OSI application layer or non-OSI equivalent - pub const protocol_name = types.StringAttribute.init( - "network.protocol.name", - "OSI application layer or non-OSI equivalent.", - .stable, - .conditionally_required, - ).withCondition("If applicable and not represented by `url.scheme`") - .withNote("The value SHOULD be normalized to lowercase.") - .withExamples(&[_][]const u8{ "http", "spdy" }); - - /// The actual version of the protocol used for network communication - pub const protocol_version = types.StringAttribute.init( - "network.protocol.version", - "The actual version of the protocol used for network communication.", - .stable, - .recommended, - ).withNote("If protocol version is subject to negotiation (for example using ALPN), " ++ - "this attribute SHOULD be set to the negotiated version. If the actual protocol version " ++ - "is not known, this attribute SHOULD NOT be set.") - .withExamples(&[_][]const u8{ "1.0", "1.1", "2", "3" }); - - /// Local socket peer name - pub const local_address = types.StringAttribute.init( - "network.local.address", - "Local socket address. Useful in case of a multi-IP host.", - .stable, - .opt_in, - ).withNote("Useful in case of a multi-IP host.") - .withExamples(&[_][]const u8{ "10.1.2.80", "/tmp/my.sock" }); - - /// Local socket peer port - pub const local_port = types.IntAttribute.init( - "network.local.port", - "Local socket port. Useful in case of a multi-port host.", - .stable, - .opt_in, - ).withNote("Useful in case of a multi-port host.") - .withExamples(&[_]i64{65123}); - - /// Peer address of the network connection - IP address or Unix domain socket name - pub const peer_address = types.StringAttribute.init( - "network.peer.address", - "Peer address of the network connection - IP address or Unix domain socket name.", - .stable, - .recommended, - ).withExamples(&[_][]const u8{ "10.1.2.80", "/tmp/my.sock" }); - - /// Peer port number of the network connection - pub const peer_port = types.IntAttribute.init( - "network.peer.port", - "Peer port number of the network connection.", - .stable, - .recommended, - ).withCondition("If `network.peer.address` is set") - .withExamples(&[_]i64{65123}); - - /// The internet connection type - pub const connection_type = types.EnumAttribute(NetworkConnectionType).init( - "network.connection.type", - "The internet connection type.", - .stable, - .recommended, - &[_]NetworkConnectionType{ .wifi, .wired, .cell, .unavailable, .unknown }, - ).withExamples(&[_][]const u8{ "wifi", "wired", "cell" }); - - /// This describes more details regarding the connection.type - pub const connection_subtype = types.EnumAttribute(NetworkConnectionSubtype).init( - "network.connection.subtype", - "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.", - .stable, - .recommended, - &[_]NetworkConnectionSubtype{ .gprs, .edge, .umts, .cdma, .lte, .nr }, - ).withExamples(&[_][]const u8{ "lte", "hspa" }); - - /// The name of the mobile carrier - pub const carrier_name = types.StringAttribute.init( - "network.carrier.name", - "The name of the mobile carrier.", - .stable, - .recommended, - ).withExamples(&[_][]const u8{ "sprint", "verizon" }); - - /// The mobile carrier country code - pub const carrier_mcc = types.StringAttribute.init( - "network.carrier.mcc", - "The mobile carrier country code.", - .stable, - .recommended, - ).withExamples(&[_][]const u8{"310"}); - - /// The mobile carrier network code - pub const carrier_mnc = types.StringAttribute.init( - "network.carrier.mnc", - "The mobile carrier network code.", - .stable, - .recommended, - ).withExamples(&[_][]const u8{"001"}); - - /// The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network - pub const carrier_icc = types.StringAttribute.init( - "network.carrier.icc", - "The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.", - .stable, - .recommended, - ).withExamples(&[_][]const u8{"DE"}); -}; - -/// Network semantic convention group -pub const Group = types.AttributeGroup{ - .id = "registry.network", - .brief = "This document defines semantic convention attributes in the Network namespace.", - .stability = .stable, -}; - -// Helper functions for working with network attributes - -/// Check if an address is likely an IPv4 address -pub fn isIPv4Address(address: []const u8) bool { - var dot_count: u32 = 0; - for (address) |c| { - if (c == '.') { - dot_count += 1; - } else if (!std.ascii.isDigit(c)) { - return false; - } - } - return dot_count == 3; -} - -/// Check if an address is likely an IPv6 address -pub fn isIPv6Address(address: []const u8) bool { - return std.mem.indexOf(u8, address, ":") != null and - (std.mem.startsWith(u8, address, "[") or std.mem.indexOf(u8, address, "::") != null); -} - -/// Check if an address is a Unix socket path -pub fn isUnixSocketAddress(address: []const u8) bool { - return std.mem.startsWith(u8, address, "/") or std.mem.startsWith(u8, address, "./"); -} - -/// Determine network type from address -pub fn getNetworkTypeFromAddress(address: []const u8) []const u8 { - if (isIPv4Address(address)) { - return "ipv4"; - } else if (isIPv6Address(address)) { - return "ipv6"; - } else if (isUnixSocketAddress(address)) { - return "unix"; - } else { - return "unknown"; - } -} - -// Tests -test "NetworkTransport enum" { - try std.testing.expectEqualStrings("tcp", NetworkTransport.tcp.toString()); - try std.testing.expectEqualStrings("udp", NetworkTransport.udp.toString()); - try std.testing.expectEqualStrings("pipe", NetworkTransport.pipe.toString()); -} - -test "NetworkTransport parsing" { - try std.testing.expectEqual(NetworkTransport.tcp, NetworkTransport.fromString("tcp").?); - try std.testing.expectEqual(NetworkTransport.udp, NetworkTransport.fromString("udp").?); - try std.testing.expectEqual(@as(?NetworkTransport, null), NetworkTransport.fromString("invalid")); -} - -test "Address type detection" { - try std.testing.expect(isIPv4Address("192.168.1.1")); - try std.testing.expect(isIPv4Address("10.0.0.1")); - try std.testing.expect(!isIPv4Address("192.168.1")); - try std.testing.expect(!isIPv4Address("192.168.1.1.1")); - - try std.testing.expect(isIPv6Address("::1")); - try std.testing.expect(isIPv6Address("[::1]")); - try std.testing.expect(isIPv6Address("2001:db8::1")); - try std.testing.expect(!isIPv6Address("192.168.1.1")); - - try std.testing.expect(isUnixSocketAddress("/tmp/socket")); - try std.testing.expect(isUnixSocketAddress("./socket")); - try std.testing.expect(!isUnixSocketAddress("socket")); -} - -test "Network type from address" { - try std.testing.expectEqualStrings("ipv4", getNetworkTypeFromAddress("192.168.1.1")); - try std.testing.expectEqualStrings("ipv6", getNetworkTypeFromAddress("::1")); - try std.testing.expectEqualStrings("unix", getNetworkTypeFromAddress("/tmp/socket")); - try std.testing.expectEqualStrings("unknown", getNetworkTypeFromAddress("hostname")); -} - -test "Network attribute definitions" { - try std.testing.expectEqualStrings("network.transport", Attributes.transport.base.name); - try std.testing.expectEqual(types.StabilityLevel.stable, Attributes.transport.base.stability); - try std.testing.expectEqual(types.RequirementLevel.conditionally_required, Attributes.transport.base.requirement_level); - - try std.testing.expectEqualStrings("network.peer.address", Attributes.peer_address.name); - try std.testing.expectEqual(types.StabilityLevel.stable, Attributes.peer_address.stability); -} diff --git a/src/nfs/nfs.zig b/src/nfs/nfs.zig deleted file mode 100644 index 3f8331b..0000000 --- a/src/nfs/nfs.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! nfs semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/nfs/registry.zig b/src/nfs/registry.zig deleted file mode 100644 index a0b1453..0000000 --- a/src/nfs/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: nfs -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Linux: one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or "nocache" (NFSD_STATS_RC_NOCACHE -- uncacheable) -pub const nfs_server_repcache_status = types.StringAttribute{ - .name = "nfs.server.repcache.status", - .brief = "Linux: one of \"hit\" (NFSD_STATS_RC_HITS), \"miss\" (NFSD_STATS_RC_MISSES), or \"nocache\" (NFSD_STATS_RC_NOCACHE -- uncacheable)", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// NFSv4+ operation name. -pub const nfs_operation_name = types.StringAttribute{ - .name = "nfs.operation.name", - .brief = "NFSv4+ operation name.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/nodejs/nodejs.zig b/src/nodejs/nodejs.zig deleted file mode 100644 index b00735a..0000000 --- a/src/nodejs/nodejs.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! nodejs semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/nodejs/registry.zig b/src/nodejs/registry.zig deleted file mode 100644 index 15226c7..0000000 --- a/src/nodejs/registry.zig +++ /dev/null @@ -1,33 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: nodejs -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const eventloopStateValue = enum { - /// Active time. - active, - /// Idle time. - idle, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .active => "active", - .idle => "idle", - }; - } -}; - -/// The state of event loop time. -pub const nodejs_eventloop_state = types.EnumAttribute(eventloopStateValue){ - .base = types.StringAttribute{ - .name = "nodejs.eventloop.state", - .brief = "The state of event loop time.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = eventloopStateValue.active, -}; - diff --git a/src/oci/oci.zig b/src/oci/oci.zig deleted file mode 100644 index 7575f0f..0000000 --- a/src/oci/oci.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! oci semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/oci/registry.zig b/src/oci/registry.zig deleted file mode 100644 index 97bae0e..0000000 --- a/src/oci/registry.zig +++ /dev/null @@ -1,16 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: oci -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. -pub const oci_manifest_digest = types.StringAttribute{ - .name = "oci.manifest.digest", - .brief = "The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known.", - .note = "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\n\n An example can be found in [Example Image Manifest](https://github.com/opencontainers/image-spec/blob/main/manifest.md", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/onc_rpc/onc_rpc.zig b/src/onc_rpc/onc_rpc.zig deleted file mode 100644 index 2c47723..0000000 --- a/src/onc_rpc/onc_rpc.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! onc_rpc semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/onc_rpc/registry.zig b/src/onc_rpc/registry.zig deleted file mode 100644 index c67ac8c..0000000 --- a/src/onc_rpc/registry.zig +++ /dev/null @@ -1,43 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: onc_rpc -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// ONC/Sun RPC program version. -pub const onc_rpc_version = types.StringAttribute{ - .name = "onc_rpc.version", - .brief = "ONC/Sun RPC program version.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// ONC/Sun RPC procedure number. -pub const onc_rpc_procedure_number = types.StringAttribute{ - .name = "onc_rpc.procedure.number", - .brief = "ONC/Sun RPC procedure number.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// ONC/Sun RPC procedure name. -pub const onc_rpc_procedure_name = types.StringAttribute{ - .name = "onc_rpc.procedure.name", - .brief = "ONC/Sun RPC procedure name.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// ONC/Sun RPC program name. -pub const onc_rpc_program_name = types.StringAttribute{ - .name = "onc_rpc.program.name", - .brief = "ONC/Sun RPC program name.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/openai/openai.zig b/src/openai/openai.zig deleted file mode 100644 index 1192504..0000000 --- a/src/openai/openai.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! openai semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/openai/registry.zig b/src/openai/registry.zig deleted file mode 100644 index ce373c5..0000000 --- a/src/openai/registry.zig +++ /dev/null @@ -1,51 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: openai -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const requestServiceTierValue = enum { - /// The system will utilize scale tier credits until they are exhausted. - auto, - /// The system will utilize the default scale tier. - default, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .auto => "auto", - .default => "default", - }; - } -}; - -/// The service tier requested. May be a specific tier, default, or auto. -pub const openai_request_service_tier = types.EnumAttribute(requestServiceTierValue){ - .base = types.StringAttribute{ - .name = "openai.request.service_tier", - .brief = "The service tier requested. May be a specific tier, default, or auto.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = requestServiceTierValue.auto, -}; - -/// The service tier used for the response. -pub const openai_response_service_tier = types.StringAttribute{ - .name = "openai.response.service_tier", - .brief = "The service tier used for the response.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// A fingerprint to track any eventual change in the Generative AI environment. -pub const openai_response_system_fingerprint = types.StringAttribute{ - .name = "openai.response.system_fingerprint", - .brief = "A fingerprint to track any eventual change in the Generative AI environment.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/opentracing/opentracing.zig b/src/opentracing/opentracing.zig deleted file mode 100644 index 663d6f7..0000000 --- a/src/opentracing/opentracing.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! opentracing semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/opentracing/registry.zig b/src/opentracing/registry.zig deleted file mode 100644 index 00ac79c..0000000 --- a/src/opentracing/registry.zig +++ /dev/null @@ -1,33 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: opentracing -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const refTypeValue = enum { - /// The parent Span depends on the child Span in some capacity - child_of, - /// The parent Span doesn't depend in any way on the result of the child Span - follows_from, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .child_of => "child_of", - .follows_from => "follows_from", - }; - } -}; - -/// Parent-child Reference type -pub const opentracing_ref_type = types.EnumAttribute(refTypeValue){ - .base = types.StringAttribute{ - .name = "opentracing.ref_type", - .brief = "Parent-child Reference type", - .note = "The causal relationship between a child Span and a parent Span.", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = refTypeValue.child_of, -}; - diff --git a/src/os/os.zig b/src/os/os.zig deleted file mode 100644 index b366c88..0000000 --- a/src/os/os.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! os semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/os/registry.zig b/src/os/registry.zig deleted file mode 100644 index e4b28fa..0000000 --- a/src/os/registry.zig +++ /dev/null @@ -1,96 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: os -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const typeValue = enum { - /// Microsoft Windows - windows, - /// Linux - linux, - /// Apple Darwin - darwin, - /// FreeBSD - freebsd, - /// NetBSD - netbsd, - /// OpenBSD - openbsd, - /// DragonFly BSD - dragonflybsd, - /// HP-UX (Hewlett Packard Unix) - hpux, - /// AIX (Advanced Interactive eXecutive) - aix, - /// SunOS, Oracle Solaris - solaris, - /// IBM z/OS - zos, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .windows => "windows", - .linux => "linux", - .darwin => "darwin", - .freebsd => "freebsd", - .netbsd => "netbsd", - .openbsd => "openbsd", - .dragonflybsd => "dragonflybsd", - .hpux => "hpux", - .aix => "aix", - .solaris => "solaris", - .zos => "zos", - }; - } -}; - -/// The operating system type. -pub const os_type = types.EnumAttribute(typeValue){ - .base = types.StringAttribute{ - .name = "os.type", - .brief = "The operating system type.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = typeValue.windows, -}; - -/// Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. -pub const os_description = types.StringAttribute{ - .name = "os.description", - .brief = "Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Human readable operating system name. -pub const os_name = types.StringAttribute{ - .name = "os.name", - .brief = "Human readable operating system name.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md -pub const os_version = types.StringAttribute{ - .name = "os.version", - .brief = "The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Unique identifier for a particular build or compilation of the operating system. -pub const os_build_id = types.StringAttribute{ - .name = "os.build_id", - .brief = "Unique identifier for a particular build or compilation of the operating system.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/peer/peer.zig b/src/peer/peer.zig deleted file mode 100644 index 1a90458..0000000 --- a/src/peer/peer.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! peer semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/peer/registry.zig b/src/peer/registry.zig deleted file mode 100644 index a478fff..0000000 --- a/src/peer/registry.zig +++ /dev/null @@ -1,16 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: peer -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// The [`service.name`](/docs/resource/README.md of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. -pub const peer_service = types.StringAttribute{ - .name = "peer.service", - .brief = "The [`service.name`](/docs/resource/README.md of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/pprof/pprof.zig b/src/pprof/pprof.zig deleted file mode 100644 index e0ca091..0000000 --- a/src/pprof/pprof.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! pprof semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/pprof/registry.zig b/src/pprof/registry.zig deleted file mode 100644 index f5622fc..0000000 --- a/src/pprof/registry.zig +++ /dev/null @@ -1,52 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: pprof -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Indicates that there are functions related to this mapping. -pub const pprof_mapping_has_functions = types.StringAttribute{ - .name = "pprof.mapping.has_functions", - .brief = "Indicates that there are functions related to this mapping.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Indicates that there are filenames related to this mapping. -pub const pprof_mapping_has_filenames = types.StringAttribute{ - .name = "pprof.mapping.has_filenames", - .brief = "Indicates that there are filenames related to this mapping.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Indicates that there are line numbers related to this mapping. -pub const pprof_mapping_has_line_numbers = types.StringAttribute{ - .name = "pprof.mapping.has_line_numbers", - .brief = "Indicates that there are line numbers related to this mapping.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Indicates that there are inline frames related to this mapping. -pub const pprof_mapping_has_inline_frames = types.StringAttribute{ - .name = "pprof.mapping.has_inline_frames", - .brief = "Indicates that there are inline frames related to this mapping.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Provides an indication that multiple symbols map to this location's address, for example due to identical code folding by the linker. In that case the line information represents one of the multiple symbols. This field must be recomputed when the symbolization state of the profile changes. -pub const pprof_location_is_folded = types.StringAttribute{ - .name = "pprof.location.is_folded", - .brief = "Provides an indication that multiple symbols map to this location's address, for example due to identical code folding by the linker. In that case the line information represents one of the multiple symbols. This field must be recomputed when the symbolization state of the profile changes.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/process/process.zig b/src/process/process.zig deleted file mode 100644 index 305259b..0000000 --- a/src/process/process.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! process semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/process/registry.zig b/src/process/registry.zig deleted file mode 100644 index 5c6c69a..0000000 --- a/src/process/registry.zig +++ /dev/null @@ -1,347 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: process -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const contextSwitchTypeValue = enum { - /// - voluntary, - /// - involuntary, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .voluntary => "voluntary", - .involuntary => "involuntary", - }; - } -}; - -pub const pagingFaultTypeValue = enum { - /// - major, - /// - minor, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .major => "major", - .minor => "minor", - }; - } -}; - -/// Process identifier (PID). -pub const process_pid = types.StringAttribute{ - .name = "process.pid", - .brief = "Process identifier (PID).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Parent Process identifier (PPID). -pub const process_parent_pid = types.StringAttribute{ - .name = "process.parent_pid", - .brief = "Parent Process identifier (PPID).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Virtual process identifier. -pub const process_vpid = types.StringAttribute{ - .name = "process.vpid", - .brief = "Virtual process identifier.", - .note = "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.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The PID of the process's session leader. This is also the session ID (SID) of the process. -pub const process_session_leader_pid = types.StringAttribute{ - .name = "process.session_leader.pid", - .brief = "The PID of the process's session leader. This is also the session ID (SID) of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The PID of the process's group leader. This is also the process group ID (PGID) of the process. -pub const process_group_leader_pid = types.StringAttribute{ - .name = "process.group_leader.pid", - .brief = "The PID of the process's group leader. This is also the process group ID (PGID) of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). -pub const process_executable_build_id_gnu = types.StringAttribute{ - .name = "process.executable.build_id.gnu", - .brief = "The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The Go build ID as retrieved by `go tool buildid `. -pub const process_executable_build_id_go = types.StringAttribute{ - .name = "process.executable.build_id.go", - .brief = "The Go build ID as retrieved by `go tool buildid `.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Profiling specific build ID for executables. See the OTel specification for Profiles for more information. -pub const process_executable_build_id_htlhash = types.StringAttribute{ - .name = "process.executable.build_id.htlhash", - .brief = "Profiling specific build ID for executables. See the OTel specification for Profiles for more information.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. -pub const process_executable_name = types.StringAttribute{ - .name = "process.executable.name", - .brief = "The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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`. -pub const process_executable_path = types.StringAttribute{ - .name = "process.executable.path", - .brief = "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`.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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`. -pub const process_command = types.StringAttribute{ - .name = "process.command", - .brief = "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`.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. -pub const process_command_line = types.StringAttribute{ - .name = "process.command_line", - .brief = "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. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// 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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. -pub const process_command_args = types.StringAttribute{ - .name = "process.command_args", - .brief = "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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Length of the process.command_args array -pub const process_args_count = types.StringAttribute{ - .name = "process.args_count", - .brief = "Length of the process.command_args array", - .note = "This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The username of the user that owns the process. -pub const process_owner = types.StringAttribute{ - .name = "process.owner", - .brief = "The username of the user that owns the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The effective user ID (EUID) of the process. -pub const process_user_id = types.StringAttribute{ - .name = "process.user.id", - .brief = "The effective user ID (EUID) of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The username of the effective user of the process. -pub const process_user_name = types.StringAttribute{ - .name = "process.user.name", - .brief = "The username of the effective user of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The real user ID (RUID) of the process. -pub const process_real_user_id = types.StringAttribute{ - .name = "process.real_user.id", - .brief = "The real user ID (RUID) of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The username of the real user of the process. -pub const process_real_user_name = types.StringAttribute{ - .name = "process.real_user.name", - .brief = "The username of the real user of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The saved user ID (SUID) of the process. -pub const process_saved_user_id = types.StringAttribute{ - .name = "process.saved_user.id", - .brief = "The saved user ID (SUID) of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The username of the saved user. -pub const process_saved_user_name = types.StringAttribute{ - .name = "process.saved_user.name", - .brief = "The username of the saved user.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the runtime of this process. -pub const process_runtime_name = types.StringAttribute{ - .name = "process.runtime.name", - .brief = "The name of the runtime of this process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The version of the runtime of this process, as returned by the runtime without modification. -pub const process_runtime_version = types.StringAttribute{ - .name = "process.runtime.version", - .brief = "The version of the runtime of this process, as returned by the runtime without modification.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. -pub const process_runtime_description = types.StringAttribute{ - .name = "process.runtime.description", - .brief = "An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Process title (proctitle) -pub const process_title = types.StringAttribute{ - .name = "process.title", - .brief = "Process title (proctitle)", - .note = "In many Unix-like systems, process title (proctitle), is the string that represents the name or command line of a running process, displayed by system monitoring tools like ps, top, and htop.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The date and time the process was created, in ISO 8601 format. -pub const process_creation_time = types.StringAttribute{ - .name = "process.creation.time", - .brief = "The date and time the process was created, in ISO 8601 format.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The date and time the process exited, in ISO 8601 format. -pub const process_exit_time = types.StringAttribute{ - .name = "process.exit.time", - .brief = "The date and time the process exited, in ISO 8601 format.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The exit code of the process. -pub const process_exit_code = types.StringAttribute{ - .name = "process.exit.code", - .brief = "The exit code of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Whether the process is connected to an interactive shell. -pub const process_interactive = types.StringAttribute{ - .name = "process.interactive", - .brief = "Whether the process is connected to an interactive shell.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The working directory of the process. -pub const process_working_directory = types.StringAttribute{ - .name = "process.working_directory", - .brief = "The working directory of the process.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Specifies whether the context switches for this data point were voluntary or involuntary. -pub const process_context_switch_type = types.EnumAttribute(contextSwitchTypeValue){ - .base = types.StringAttribute{ - .name = "process.context_switch_type", - .brief = "Specifies whether the context switches for this data point were voluntary or involuntary.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = contextSwitchTypeValue.voluntary, -}; - -/// 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. -pub const process_paging_fault_type = types.EnumAttribute(pagingFaultTypeValue){ - .base = types.StringAttribute{ - .name = "process.paging.fault_type", - .brief = "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.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = pagingFaultTypeValue.major, -}; - -/// Process environment variables, `` being the environment variable name, the value being the environment variable value. -pub const process_environment_variable = types.StringAttribute{ - .name = "process.environment_variable", - .brief = "Process environment variables, `` being the environment variable name, the value being the environment variable value.", - .note = "Examples:\n\n- an environment variable `USER` with value `\"ubuntu\"` SHOULD be recorded\nas the `process.environment_variable.USER` attribute with value `\"ubuntu\"`.\n\n- an environment variable `PATH` with value `\"/usr/local/bin:/usr/bin\"`\nSHOULD be recorded as the `process.environment_variable.PATH` attribute\nwith value `\"/usr/local/bin:/usr/bin\"`.\n", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The control group associated with the process. -pub const process_linux_cgroup = types.StringAttribute{ - .name = "process.linux.cgroup", - .brief = "The control group associated with the process.", - .note = "Control groups (cgroups) are a kernel feature used to organize and manage process resources. This attribute provides the path(s) to the cgroup(s) associated with the process, which should match the contents of the [proc/PID/cgroup https://man7.org/linux/man-pages/man7/cgroups.7.html file.\n\n", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/profile/profile.zig b/src/profile/profile.zig deleted file mode 100644 index 1c9c82d..0000000 --- a/src/profile/profile.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! profile semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/profile/registry.zig b/src/profile/registry.zig deleted file mode 100644 index d6c68bf..0000000 --- a/src/profile/registry.zig +++ /dev/null @@ -1,63 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: profile -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const frameTypeValue = enum { - /// [.NET](https://wikipedia.org/wiki/.NET) - dotnet, - /// [JVM](https://wikipedia.org/wiki/Java_virtual_machine) - jvm, - /// [Kernel](https://wikipedia.org/wiki/Kernel_(operating_system)) - kernel, - /// Can be one of but not limited to [C](https://wikipedia.org/wiki/C_(programming_language)), [C++](https://wikipedia.org/wiki/C%2B%2B), [Go](https://wikipedia.org/wiki/Go_(programming_language)) or [Rust](https://wikipedia.org/wiki/Rust_(programming_language)). If possible, a more precise value MUST be used. - native, - /// [Perl](https://wikipedia.org/wiki/Perl) - perl, - /// [PHP](https://wikipedia.org/wiki/PHP) - php, - /// [Python](https://wikipedia.org/wiki/Python_(programming_language)) - cpython, - /// [Ruby](https://wikipedia.org/wiki/Ruby_(programming_language)) - ruby, - /// [V8JS](https://wikipedia.org/wiki/V8_(JavaScript_engine)) - v8js, - /// [Erlang](https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)) - beam, - /// [Go](https://wikipedia.org/wiki/Go_(programming_language)), - go, - /// [Rust](https://wikipedia.org/wiki/Rust_(programming_language)) - rust, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .dotnet => "dotnet", - .jvm => "jvm", - .kernel => "kernel", - .native => "native", - .perl => "perl", - .php => "php", - .cpython => "cpython", - .ruby => "ruby", - .v8js => "v8js", - .beam => "beam", - .go => "go", - .rust => "rust", - }; - } -}; - -/// Describes the interpreter or compiler of a single frame. -pub const profile_frame_type = types.EnumAttribute(frameTypeValue){ - .base = types.StringAttribute{ - .name = "profile.frame.type", - .brief = "Describes the interpreter or compiler of a single frame.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = frameTypeValue.dotnet, -}; - diff --git a/src/resource.zig b/src/resource.zig new file mode 100644 index 0000000..453f36a --- /dev/null +++ b/src/resource.zig @@ -0,0 +1,2389 @@ +// DO NOT EDIT, this is an auto-generated file +// +// If you want to update the file: +// - Edit the template at scripts/templates/registry/zig/resource.zig.j2 +// - Run the script at scripts/generate-consts-from-spec.sh + +//! # Semantic Resource Attributes +//! +//! The entire set of semantic resource attributes (or [conventions](https://opentelemetry.io/docs/concepts/semantic-conventions/)) defined by the project. + +const std = @import("std"); +const types = @import("types.zig"); + +/// 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). +/// +/// # Examples +/// +/// - 33 +/// - 32 +/// Note: This attribute is experimental and may change in the future. +pub const android_os_api_level = types.StringAttribute{ + .name = "android.os.api_level", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// A unique identifier representing the installation of an application on a specific device +/// +/// # Examples +/// +/// - 2ab2916d-a51f-4ac8-80ee-45ac31a28092 +/// Note: This attribute is experimental and may change in the future. +pub const app_installation_id = types.StringAttribute{ + .name = "app.installation.id", + .brief = "A unique identifier representing the installation of an application on a specific device", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). +/// +/// # Examples +/// +/// - arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster +/// Note: This attribute is experimental and may change in the future. +pub const aws_ecs_cluster_arn = types.StringAttribute{ + .name = "aws.ecs.cluster.arn", + .brief = "The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). +/// +/// # Examples +/// +/// - arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9 +/// Note: This attribute is experimental and may change in the future. +pub const aws_ecs_container_arn = types.StringAttribute{ + .name = "aws.ecs.container.arn", + .brief = "The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. +/// Note: This attribute is experimental and may change in the future. +pub const aws_ecs_launchtype = types.StringAttribute{ + .name = "aws.ecs.launchtype", + .brief = "The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). +/// +/// # 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 +/// Note: This attribute is experimental and may change in the future. +pub const aws_ecs_task_arn = types.StringAttribute{ + .name = "aws.ecs.task.arn", + .brief = "The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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. +/// +/// # Examples +/// +/// - opentelemetry-family +/// Note: This attribute is experimental and may change in the future. +pub const aws_ecs_task_family = types.StringAttribute{ + .name = "aws.ecs.task.family", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The ID of a running ECS task. The ID MUST be extracted from `task.arn`. +/// +/// # Examples +/// +/// - 10838bed-421f-43ef-870a-f43feacbbb5b +/// - 23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd +/// Note: This attribute is experimental and may change in the future. +pub const aws_ecs_task_id = types.StringAttribute{ + .name = "aws.ecs.task.id", + .brief = "The ID of a running ECS task. The ID MUST be extracted from `task.arn`.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The revision for the task definition used to create the ECS task. +/// +/// # Examples +/// +/// - 8 +/// - 26 +/// Note: This attribute is experimental and may change in the future. +pub const aws_ecs_task_revision = types.StringAttribute{ + .name = "aws.ecs.task.revision", + .brief = "The revision for the task definition used to create the ECS task.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The ARN of an EKS cluster. +/// +/// # Examples +/// +/// - arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster +/// Note: This attribute is experimental and may change in the future. +pub const aws_eks_cluster_arn = types.StringAttribute{ + .name = "aws.eks.cluster.arn", + .brief = "The ARN of an EKS cluster.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The Amazon Resource Name(s) (ARN) of the AWS log group(s). +/// +/// # Examples +/// +/// - [\"arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_log_group_arns = types.StringAttribute{ + .name = "aws.log.group.arns", + .brief = "The Amazon Resource Name(s) (ARN) of the AWS log group(s).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name(s) of the AWS log group(s) an application is writing to. +/// +/// # Examples +/// +/// - [\"/aws/lambda/my-function\", \"opentelemetry-service\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_log_group_names = types.StringAttribute{ + .name = "aws.log.group.names", + .brief = "The name(s) of the AWS log group(s) an application is writing to.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The ARN(s) of the AWS log stream(s). +/// +/// # Examples +/// +/// - [\"arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_log_stream_arns = types.StringAttribute{ + .name = "aws.log.stream.arns", + .brief = "The ARN(s) of the AWS log stream(s).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name(s) of the AWS log stream(s) an application is writing to. +/// +/// # Examples +/// +/// - [\"logs/main/10838bed-421f-43ef-870a-f43feacbbb5b\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_log_stream_names = types.StringAttribute{ + .name = "aws.log.stream.names", + .brief = "The name(s) of the AWS log stream(s) an application is writing to.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Array of brand name and version separated by a space +/// +/// # Examples +/// +/// - [\" Not A;Brand 99\", \"Chromium 99\", \"Chrome 99\"] +/// Note: This attribute is experimental and may change in the future. +pub const browser_brands = types.StringAttribute{ + .name = "browser.brands", + .brief = "Array of brand name and version separated by a space", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Preferred language of the user using the browser +/// +/// # Examples +/// +/// - en +/// - en-US +/// - fr +/// - fr-FR +/// Note: This attribute is experimental and may change in the future. +pub const browser_language = types.StringAttribute{ + .name = "browser.language", + .brief = "Preferred language of the user using the browser", + .stability = .development, + .requirement_level = .recommended, +}; + +/// A boolean that is true if the browser is running on a mobile device +/// Note: This attribute is experimental and may change in the future. +pub const browser_mobile = types.BooleanAttribute{ + .name = "browser.mobile", + .brief = "A boolean that is true if the browser is running on a mobile device", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The platform on which the browser is running +/// +/// # Examples +/// +/// - Windows +/// - macOS +/// - Android +/// Note: This attribute is experimental and may change in the future. +pub const browser_platform = types.StringAttribute{ + .name = "browser.platform", + .brief = "The platform on which the browser is running", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The human readable name of the pipeline within a CI/CD system. +/// +/// # Examples +/// +/// - Build and Test +/// - Lint +/// - Deploy Go Project +/// - deploy_to_environment +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_name = types.StringAttribute{ + .name = "cicd.pipeline.name", + .brief = "The human readable name of the pipeline within a CI/CD system.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The unique identifier of a pipeline run within a CI/CD system. +/// +/// # Examples +/// +/// - 120912 +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_run_id = types.StringAttribute{ + .name = "cicd.pipeline.run.id", + .brief = "The unique identifier of a pipeline run within a CI/CD system.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run. +/// +/// # Examples +/// +/// - https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075 +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_run_url_full = types.StringAttribute{ + .name = "cicd.pipeline.run.url.full", + .brief = "The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The unique identifier of a worker within a CICD system. +/// +/// # Examples +/// +/// - abc123 +/// - 10.0.1.2 +/// - controller +/// Note: This attribute is experimental and may change in the future. +pub const cicd_worker_id = types.StringAttribute{ + .name = "cicd.worker.id", + .brief = "The unique identifier of a worker within a CICD system.", + .stability = .development, + .requirement_level = .required, +}; + +/// The name of a worker within a CICD system. +/// +/// # Examples +/// +/// - agent-abc +/// - controller +/// - Ubuntu LTS +/// Note: This attribute is experimental and may change in the future. +pub const cicd_worker_name = types.StringAttribute{ + .name = "cicd.worker.name", + .brief = "The name of a worker within a CICD system.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker. +/// +/// # Examples +/// +/// - https://cicd.example.org/worker/abc123 +/// Note: This attribute is experimental and may change in the future. +pub const cicd_worker_url_full = types.StringAttribute{ + .name = "cicd.worker.url.full", + .brief = "The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The cloud account ID the resource is assigned to. +/// +/// # Examples +/// +/// - 111111111111 +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const cloud_account_id = types.StringAttribute{ + .name = "cloud.account.id", + .brief = "The cloud account ID the resource is assigned to.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. +/// +/// # Examples +/// +/// - us-east-1c +/// Note: This attribute is experimental and may change in the future. +pub const cloud_availability_zone = types.StringAttribute{ + .name = "cloud.availability_zone", + .brief = "Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The cloud platform in use. +/// Note: This attribute is experimental and may change in the future. +pub const cloud_platform = types.StringAttribute{ + .name = "cloud.platform", + .brief = "The cloud platform in use.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Name of the cloud provider. +/// Note: This attribute is experimental and may change in the future. +pub const cloud_provider = types.StringAttribute{ + .name = "cloud.provider", + .brief = "Name of the cloud provider.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. +/// +/// # Examples +/// +/// - us-central1 +/// - us-east-1 +/// Note: This attribute is experimental and may change in the future. +pub const cloud_region = types.StringAttribute{ + .name = "cloud.region", + .brief = "The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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://google.aip.dev/122#full-resource-names) on GCP) +/// +/// # 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/ +/// Note: This attribute is experimental and may change in the future. +pub const cloud_resource_id = types.StringAttribute{ + .name = "cloud.resource_id", + .brief = "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://google.aip.dev/122#full-resource-names) on GCP)", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The guid of the application. +/// +/// # Examples +/// +/// - 218fc5a9-a5f1-4b54-aa05-46717d0ab26d +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_app_id = types.StringAttribute{ + .name = "cloudfoundry.app.id", + .brief = "The guid of the application.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the application. +/// +/// # Examples +/// +/// - my-app-name +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_app_name = types.StringAttribute{ + .name = "cloudfoundry.app.name", + .brief = "The name of the application.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The guid of the CloudFoundry org the application is running in. +/// +/// # Examples +/// +/// - 218fc5a9-a5f1-4b54-aa05-46717d0ab26d +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_org_id = types.StringAttribute{ + .name = "cloudfoundry.org.id", + .brief = "The guid of the CloudFoundry org the application is running in.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the CloudFoundry organization the app is running in. +/// +/// # Examples +/// +/// - my-org-name +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_org_name = types.StringAttribute{ + .name = "cloudfoundry.org.name", + .brief = "The name of the CloudFoundry organization the app is running in.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID identifying the process. +/// +/// # Examples +/// +/// - 218fc5a9-a5f1-4b54-aa05-46717d0ab26d +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_process_id = types.StringAttribute{ + .name = "cloudfoundry.process.id", + .brief = "The UID identifying the process.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The type of process. +/// +/// # Examples +/// +/// - web +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_process_type = types.StringAttribute{ + .name = "cloudfoundry.process.type", + .brief = "The type of process.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The guid of the CloudFoundry space the application is running in. +/// +/// # Examples +/// +/// - 218fc5a9-a5f1-4b54-aa05-46717d0ab26d +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_space_id = types.StringAttribute{ + .name = "cloudfoundry.space.id", + .brief = "The guid of the CloudFoundry space the application is running in.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the CloudFoundry space the application is running in. +/// +/// # Examples +/// +/// - my-space-name +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_space_name = types.StringAttribute{ + .name = "cloudfoundry.space.name", + .brief = "The name of the CloudFoundry space the application is running in.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// A guid or another name describing the event source. +/// +/// # Examples +/// +/// - cf/gorouter +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_system_id = types.StringAttribute{ + .name = "cloudfoundry.system.id", + .brief = "A guid or another name describing the event source.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// A guid describing the concrete instance of the event source. +/// +/// # Examples +/// +/// - 218fc5a9-a5f1-4b54-aa05-46717d0ab26d +/// Note: This attribute is experimental and may change in the future. +pub const cloudfoundry_system_instance_id = types.StringAttribute{ + .name = "cloudfoundry.system.instance.id", + .brief = "A guid describing the concrete instance of the event source.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The command used to run the container (i.e. the command name). +/// +/// # Examples +/// +/// - otelcontribcol +/// Note: This attribute is experimental and may change in the future. +pub const container_command = types.StringAttribute{ + .name = "container.command", + .brief = "The command used to run the container (i.e. the command name).", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// All the command arguments (including the command/executable itself) run by the container. +/// +/// # Examples +/// +/// - [\"otelcontribcol\", \"--config\", \"config.yaml\"] +/// Note: This attribute is experimental and may change in the future. +pub const container_command_args = types.StringAttribute{ + .name = "container.command_args", + .brief = "All the command arguments (including the command/executable itself) run by the container.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The full command run by the container as a single string representing the full command. +/// +/// # Examples +/// +/// - otelcontribcol --config config.yaml +/// Note: This attribute is experimental and may change in the future. +pub const container_command_line = types.StringAttribute{ + .name = "container.command_line", + .brief = "The full command run by the container as a single string representing the full command.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. +/// +/// # Examples +/// +/// - a3bf90e006b2 +/// Note: This attribute is experimental and may change in the future. +pub const container_id = types.StringAttribute{ + .name = "container.id", + .brief = "Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Runtime specific image identifier. Usually a hash algorithm followed by a UUID. +/// +/// # Examples +/// +/// - sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f +/// Note: This attribute is experimental and may change in the future. +pub const container_image_id = types.StringAttribute{ + .name = "container.image.id", + .brief = "Runtime specific image identifier. Usually a hash algorithm followed by a UUID.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Name of the image the container was built on. +/// +/// # Examples +/// +/// - gcr.io/opentelemetry/operator +/// Note: This attribute is experimental and may change in the future. +pub const container_image_name = types.StringAttribute{ + .name = "container.image.name", + .brief = "Name of the image the container was built on.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Repo digests of the container image as provided by the container runtime. +/// +/// # Examples +/// +/// - [\"example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb\", \"internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578\"] +/// Note: This attribute is experimental and may change in the future. +pub const container_image_repo_digests = types.StringAttribute{ + .name = "container.image.repo_digests", + .brief = "Repo digests of the container image as provided by the container runtime.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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:`. +/// +/// # Examples +/// +/// - [\"v1.27.1\", \"3.5.7-0\"] +/// Note: This attribute is experimental and may change in the future. +pub const container_image_tags = types.StringAttribute{ + .name = "container.image.tags", + .brief = "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:`.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Container labels, `` being the label name, the value being the label value. +/// +/// # Examples +/// +/// - nginx +/// Note: This attribute is experimental and may change in the future. +pub const container_label = types.StringAttribute{ + .name = "container.label", + .brief = "Container labels, `` being the label name, the value being the label value.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Container name used by container runtime. +/// +/// # Examples +/// +/// - opentelemetry-autoconf +/// Note: This attribute is experimental and may change in the future. +pub const container_name = types.StringAttribute{ + .name = "container.name", + .brief = "Container name used by container runtime.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The container runtime managing this container. +/// +/// # Examples +/// +/// - docker +/// - containerd +/// - rkt +/// Note: This attribute is experimental and may change in the future. +pub const container_runtime = types.StringAttribute{ + .name = "container.runtime", + .brief = "The container runtime managing this container.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). +/// +/// # Examples +/// +/// - staging +/// - production +/// Note: This attribute is experimental and may change in the future. +pub const deployment_environment_name = types.StringAttribute{ + .name = "deployment.environment.name", + .brief = "Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// A unique identifier representing the device +/// +/// # Examples +/// +/// - 123456789012345 +/// - 01:23:45:67:89:AB +/// Note: This attribute is experimental and may change in the future. +pub const device_id = types.StringAttribute{ + .name = "device.id", + .brief = "A unique identifier representing the device", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the device manufacturer +/// +/// # Examples +/// +/// - Apple +/// - Samsung +/// Note: This attribute is experimental and may change in the future. +pub const device_manufacturer = types.StringAttribute{ + .name = "device.manufacturer", + .brief = "The name of the device manufacturer", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The model identifier for the device +/// +/// # Examples +/// +/// - iPhone3,4 +/// - SM-G920F +/// Note: This attribute is experimental and may change in the future. +pub const device_model_identifier = types.StringAttribute{ + .name = "device.model.identifier", + .brief = "The model identifier for the device", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The marketing name for the device model +/// +/// # Examples +/// +/// - iPhone 6s Plus +/// - Samsung Galaxy S6 +/// Note: This attribute is experimental and may change in the future. +pub const device_model_name = types.StringAttribute{ + .name = "device.model.name", + .brief = "The marketing name for the device model", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. +/// +/// # Examples +/// +/// - 2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de +/// Note: This attribute is experimental and may change in the future. +pub const faas_instance = types.StringAttribute{ + .name = "faas.instance", + .brief = "The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The amount of memory available to the serverless function converted to Bytes. +/// +/// # Examples +/// +/// - 134217728 +/// Note: This attribute is experimental and may change in the future. +pub const faas_max_memory = types.IntAttribute{ + .name = "faas.max_memory", + .brief = "The amount of memory available to the serverless function converted to Bytes.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the single function that this runtime instance executes. +/// +/// # Examples +/// +/// - my-function +/// - myazurefunctionapp/some-function-name +/// Note: This attribute is experimental and may change in the future. +pub const faas_name = types.StringAttribute{ + .name = "faas.name", + .brief = "The name of the single function that this runtime instance executes.", + .stability = .development, + .requirement_level = .required, +}; + +/// The immutable version of the function being executed. +/// +/// # Examples +/// +/// - 26 +/// - pinkfroid-00002 +/// Note: This attribute is experimental and may change in the future. +pub const faas_version = types.StringAttribute{ + .name = "faas.version", + .brief = "The immutable version of the function being executed.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The container within GCP where the AppHub application is defined. +/// +/// # Examples +/// +/// - projects/my-container-project +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_application_container = types.StringAttribute{ + .name = "gcp.apphub.application.container", + .brief = "The container within GCP where the AppHub application is defined.", + .stability = .development, + .requirement_level = .required, +}; + +/// The name of the application as configured in AppHub. +/// +/// # Examples +/// +/// - my-application +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_application_id = types.StringAttribute{ + .name = "gcp.apphub.application.id", + .brief = "The name of the application as configured in AppHub.", + .stability = .development, + .requirement_level = .required, +}; + +/// The GCP zone or region where the application is defined. +/// +/// # Examples +/// +/// - us-central1 +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_application_location = types.StringAttribute{ + .name = "gcp.apphub.application.location", + .brief = "The GCP zone or region where the application is defined.", + .stability = .development, + .requirement_level = .required, +}; + +/// Criticality of a service indicates its importance to the business. +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_service_criticality_type = types.StringAttribute{ + .name = "gcp.apphub.service.criticality_type", + .brief = "Criticality of a service indicates its importance to the business.", + .stability = .development, + .requirement_level = .required, +}; + +/// Environment of a service is the stage of a software lifecycle. +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_service_environment_type = types.StringAttribute{ + .name = "gcp.apphub.service.environment_type", + .brief = "Environment of a service is the stage of a software lifecycle.", + .stability = .development, + .requirement_level = .required, +}; + +/// The name of the service as configured in AppHub. +/// +/// # Examples +/// +/// - my-service +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_service_id = types.StringAttribute{ + .name = "gcp.apphub.service.id", + .brief = "The name of the service as configured in AppHub.", + .stability = .development, + .requirement_level = .required, +}; + +/// Criticality of a workload indicates its importance to the business. +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_workload_criticality_type = types.StringAttribute{ + .name = "gcp.apphub.workload.criticality_type", + .brief = "Criticality of a workload indicates its importance to the business.", + .stability = .development, + .requirement_level = .required, +}; + +/// Environment of a workload is the stage of a software lifecycle. +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_workload_environment_type = types.StringAttribute{ + .name = "gcp.apphub.workload.environment_type", + .brief = "Environment of a workload is the stage of a software lifecycle.", + .stability = .development, + .requirement_level = .required, +}; + +/// The name of the workload as configured in AppHub. +/// +/// # Examples +/// +/// - my-workload +/// Note: This attribute is experimental and may change in the future. +pub const gcp_apphub_workload_id = types.StringAttribute{ + .name = "gcp.apphub.workload.id", + .brief = "The name of the workload as configured in AppHub.", + .stability = .development, + .requirement_level = .required, +}; + +/// 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. +/// +/// # Examples +/// +/// - job-name-xxxx +/// - sample-job-mdw84 +/// Note: This attribute is experimental and may change in the future. +pub const gcp_cloud_run_job_execution = types.StringAttribute{ + .name = "gcp.cloud_run.job.execution", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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. +/// +/// # Examples +/// +/// - 0 +/// - 1 +/// Note: This attribute is experimental and may change in the future. +pub const gcp_cloud_run_job_task_index = types.IntAttribute{ + .name = "gcp.cloud_run.job.task_index", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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). +/// +/// # Examples +/// +/// - my-host1234.example.com +/// - sample-vm.us-west1-b.c.my-project.internal +/// Note: This attribute is experimental and may change in the future. +pub const gcp_gce_instance_hostname = types.StringAttribute{ + .name = "gcp.gce.instance.hostname", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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). +/// +/// # Examples +/// +/// - instance-1 +/// - my-vm-name +/// Note: This attribute is experimental and may change in the future. +pub const gcp_gce_instance_name = types.StringAttribute{ + .name = "gcp.gce.instance.name", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Unique identifier for the application +/// +/// # Examples +/// +/// - 2daa2797-e42b-4624-9322-ec3f968df4da +/// Note: This attribute is experimental and may change in the future. +pub const heroku_app_id = types.StringAttribute{ + .name = "heroku.app.id", + .brief = "Unique identifier for the application", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Commit hash for the current release +/// +/// # Examples +/// +/// - e6134959463efd8966b20e75b913cafe3f5ec +/// Note: This attribute is experimental and may change in the future. +pub const heroku_release_commit = types.StringAttribute{ + .name = "heroku.release.commit", + .brief = "Commit hash for the current release", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Time and date the release was created +/// +/// # Examples +/// +/// - 2022-10-23T18:00:42Z +/// Note: This attribute is experimental and may change in the future. +pub const heroku_release_creation_timestamp = types.StringAttribute{ + .name = "heroku.release.creation_timestamp", + .brief = "Time and date the release was created", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The CPU architecture the host system is running on. +/// Note: This attribute is experimental and may change in the future. +pub const host_arch = types.StringAttribute{ + .name = "host.arch", + .brief = "The CPU architecture the host system is running on.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The amount of level 2 memory cache available to the processor (in Bytes). +/// +/// # Examples +/// +/// - 12288000 +/// Note: This attribute is experimental and may change in the future. +pub const host_cpu_cache_l2_size = types.IntAttribute{ + .name = "host.cpu.cache.l2.size", + .brief = "The amount of level 2 memory cache available to the processor (in Bytes).", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Family or generation of the CPU. +/// +/// # Examples +/// +/// - 6 +/// - PA-RISC 1.1e +/// Note: This attribute is experimental and may change in the future. +pub const host_cpu_family = types.StringAttribute{ + .name = "host.cpu.family", + .brief = "Family or generation of the CPU.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. +/// +/// # Examples +/// +/// - 6 +/// - 9000/778/B180L +/// Note: This attribute is experimental and may change in the future. +pub const host_cpu_model_id = types.StringAttribute{ + .name = "host.cpu.model.id", + .brief = "Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Model designation of the processor. +/// +/// # Examples +/// +/// - 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz +/// Note: This attribute is experimental and may change in the future. +pub const host_cpu_model_name = types.StringAttribute{ + .name = "host.cpu.model.name", + .brief = "Model designation of the processor.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Stepping or core revisions. +/// +/// # Examples +/// +/// - 1 +/// - r1p1 +/// Note: This attribute is experimental and may change in the future. +pub const host_cpu_stepping = types.StringAttribute{ + .name = "host.cpu.stepping", + .brief = "Stepping or core revisions.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Processor manufacturer identifier. A maximum 12-character string. +/// +/// # Examples +/// +/// - GenuineIntel +/// Note: This attribute is experimental and may change in the future. +pub const host_cpu_vendor_id = types.StringAttribute{ + .name = "host.cpu.vendor.id", + .brief = "Processor manufacturer identifier. A maximum 12-character string.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// 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. +/// +/// # Examples +/// +/// - fdbf79e8af94cb7f9e8df36789187052 +/// Note: This attribute is experimental and may change in the future. +pub const host_id = types.StringAttribute{ + .name = "host.id", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// VM image ID or host OS image ID. For Cloud, this value is from the provider. +/// +/// # Examples +/// +/// - ami-07b06b442921831e5 +/// Note: This attribute is experimental and may change in the future. +pub const host_image_id = types.StringAttribute{ + .name = "host.image.id", + .brief = "VM image ID or host OS image ID. For Cloud, this value is from the provider.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Name of the VM image or OS install the host was instantiated from. +/// +/// # Examples +/// +/// - infra-ami-eks-worker-node-7d4ec78312 +/// - CentOS-8-x86_64-1905 +/// Note: This attribute is experimental and may change in the future. +pub const host_image_name = types.StringAttribute{ + .name = "host.image.name", + .brief = "Name of the VM image or OS install the host was instantiated from.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +/// +/// # Examples +/// +/// - 0.1 +/// Note: This attribute is experimental and may change in the future. +pub const host_image_version = types.StringAttribute{ + .name = "host.image.version", + .brief = "The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Available IP addresses of the host, excluding loopback interfaces. +/// +/// # Examples +/// +/// - [\"192.168.1.140\", \"fe80::abc2:4a28:737a:609e\"] +/// Note: This attribute is experimental and may change in the future. +pub const host_ip = types.StringAttribute{ + .name = "host.ip", + .brief = "Available IP addresses of the host, excluding loopback interfaces.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Available MAC addresses of the host, excluding loopback interfaces. +/// +/// # Examples +/// +/// - [\"AC-DE-48-23-45-67\", \"AC-DE-48-23-45-67-01-9F\"] +/// Note: This attribute is experimental and may change in the future. +pub const host_mac = types.StringAttribute{ + .name = "host.mac", + .brief = "Available MAC addresses of the host, excluding loopback interfaces.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// 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. +/// +/// # Examples +/// +/// - opentelemetry-test +/// Note: This attribute is experimental and may change in the future. +pub const host_name = types.StringAttribute{ + .name = "host.name", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Type of host. For Cloud, this must be the machine type. +/// +/// # Examples +/// +/// - n1-standard-1 +/// Note: This attribute is experimental and may change in the future. +pub const host_type = types.StringAttribute{ + .name = "host.type", + .brief = "Type of host. For Cloud, this must be the machine type.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the cluster. +/// +/// # Examples +/// +/// - opentelemetry-cluster +/// Note: This attribute is experimental and may change in the future. +pub const k8s_cluster_name = types.StringAttribute{ + .name = "k8s.cluster.name", + .brief = "The name of the cluster.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. +/// +/// # Examples +/// +/// - 218fc5a9-a5f1-4b54-aa05-46717d0ab26d +/// Note: This attribute is experimental and may change in the future. +pub const k8s_cluster_uid = types.StringAttribute{ + .name = "k8s.cluster.uid", + .brief = "A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). +/// +/// # Examples +/// +/// - redis +/// Note: This attribute is experimental and may change in the future. +pub const k8s_container_name = types.StringAttribute{ + .name = "k8s.container.name", + .brief = "The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. +/// Note: This attribute is experimental and may change in the future. +pub const k8s_container_restart_count = types.IntAttribute{ + .name = "k8s.container.restart_count", + .brief = "Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Last terminated reason of the Container. +/// +/// # Examples +/// +/// - Evicted +/// - Error +/// Note: This attribute is experimental and may change in the future. +pub const k8s_container_status_last_terminated_reason = types.StringAttribute{ + .name = "k8s.container.status.last_terminated_reason", + .brief = "Last terminated reason of the Container.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The cronjob annotation placed on the CronJob, the `` being the annotation name, the value being the annotation value. +/// +/// # Examples +/// +/// - 4 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_cronjob_annotation = types.StringAttribute{ + .name = "k8s.cronjob.annotation", + .brief = "The cronjob annotation placed on the CronJob, the `` being the annotation name, the value being the annotation value.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the CronJob, the `` being the label name, the value being the label value. +/// +/// # Examples +/// +/// - weekly +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_cronjob_label = types.StringAttribute{ + .name = "k8s.cronjob.label", + .brief = "The label placed on the CronJob, the `` being the label name, the value being the label value.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the CronJob. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_cronjob_name = types.StringAttribute{ + .name = "k8s.cronjob.name", + .brief = "The name of the CronJob.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the CronJob. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_cronjob_uid = types.StringAttribute{ + .name = "k8s.cronjob.uid", + .brief = "The UID of the CronJob.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The annotation placed on the DaemonSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. +/// +/// # Examples +/// +/// - 1 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_daemonset_annotation = types.StringAttribute{ + .name = "k8s.daemonset.annotation", + .brief = "The annotation placed on the DaemonSet, the `` being the annotation name, the value being the annotation value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the DaemonSet, the `` being the label name, the value being the label value, even if the value is empty. +/// +/// # Examples +/// +/// - guestbook +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_daemonset_label = types.StringAttribute{ + .name = "k8s.daemonset.label", + .brief = "The label placed on the DaemonSet, the `` being the label name, the value being the label value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the DaemonSet. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_daemonset_name = types.StringAttribute{ + .name = "k8s.daemonset.name", + .brief = "The name of the DaemonSet.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the DaemonSet. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_daemonset_uid = types.StringAttribute{ + .name = "k8s.daemonset.uid", + .brief = "The UID of the DaemonSet.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The annotation placed on the Deployment, the `` being the annotation name, the value being the annotation value, even if the value is empty. +/// +/// # Examples +/// +/// - 1 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_deployment_annotation = types.StringAttribute{ + .name = "k8s.deployment.annotation", + .brief = "The annotation placed on the Deployment, the `` being the annotation name, the value being the annotation value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the Deployment, the `` being the label name, the value being the label value, even if the value is empty. +/// +/// # Examples +/// +/// - guestbook +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_deployment_label = types.StringAttribute{ + .name = "k8s.deployment.label", + .brief = "The label placed on the Deployment, the `` being the label name, the value being the label value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the Deployment. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_deployment_name = types.StringAttribute{ + .name = "k8s.deployment.name", + .brief = "The name of the Deployment.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the Deployment. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_deployment_uid = types.StringAttribute{ + .name = "k8s.deployment.uid", + .brief = "The UID of the Deployment.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the horizontal pod autoscaler. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_hpa_name = types.StringAttribute{ + .name = "k8s.hpa.name", + .brief = "The name of the horizontal pod autoscaler.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The API version of the target resource to scale for the HorizontalPodAutoscaler. +/// +/// # Examples +/// +/// - apps/v1 +/// - autoscaling/v2 +/// Note: This attribute is experimental and may change in the future. +pub const k8s_hpa_scaletargetref_api_version = types.StringAttribute{ + .name = "k8s.hpa.scaletargetref.api_version", + .brief = "The API version of the target resource to scale for the HorizontalPodAutoscaler.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The kind of the target resource to scale for the HorizontalPodAutoscaler. +/// +/// # Examples +/// +/// - Deployment +/// - StatefulSet +/// Note: This attribute is experimental and may change in the future. +pub const k8s_hpa_scaletargetref_kind = types.StringAttribute{ + .name = "k8s.hpa.scaletargetref.kind", + .brief = "The kind of the target resource to scale for the HorizontalPodAutoscaler.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the target resource to scale for the HorizontalPodAutoscaler. +/// +/// # Examples +/// +/// - my-deployment +/// - my-statefulset +/// Note: This attribute is experimental and may change in the future. +pub const k8s_hpa_scaletargetref_name = types.StringAttribute{ + .name = "k8s.hpa.scaletargetref.name", + .brief = "The name of the target resource to scale for the HorizontalPodAutoscaler.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the horizontal pod autoscaler. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_hpa_uid = types.StringAttribute{ + .name = "k8s.hpa.uid", + .brief = "The UID of the horizontal pod autoscaler.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The annotation placed on the Job, the `` being the annotation name, the value being the annotation value, even if the value is empty. +/// +/// # Examples +/// +/// - 1 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_job_annotation = types.StringAttribute{ + .name = "k8s.job.annotation", + .brief = "The annotation placed on the Job, the `` being the annotation name, the value being the annotation value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the Job, the `` being the label name, the value being the label value, even if the value is empty. +/// +/// # Examples +/// +/// - ci +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_job_label = types.StringAttribute{ + .name = "k8s.job.label", + .brief = "The label placed on the Job, the `` being the label name, the value being the label value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the Job. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_job_name = types.StringAttribute{ + .name = "k8s.job.name", + .brief = "The name of the Job.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the Job. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_job_uid = types.StringAttribute{ + .name = "k8s.job.uid", + .brief = "The UID of the Job.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The annotation placed on the Namespace, the `` being the annotation name, the value being the annotation value, even if the value is empty. +/// +/// # Examples +/// +/// - 0 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_namespace_annotation = types.StringAttribute{ + .name = "k8s.namespace.annotation", + .brief = "The annotation placed on the Namespace, the `` being the annotation name, the value being the annotation value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the Namespace, the `` being the label name, the value being the label value, even if the value is empty. +/// +/// # Examples +/// +/// - default +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_namespace_label = types.StringAttribute{ + .name = "k8s.namespace.label", + .brief = "The label placed on the Namespace, the `` being the label name, the value being the label value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the namespace that the pod is running in. +/// +/// # Examples +/// +/// - default +/// Note: This attribute is experimental and may change in the future. +pub const k8s_namespace_name = types.StringAttribute{ + .name = "k8s.namespace.name", + .brief = "The name of the namespace that the pod is running in.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The annotation placed on the Node, the `` being the annotation name, the value being the annotation value, even if the value is empty. +/// +/// # Examples +/// +/// - 0 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_node_annotation = types.StringAttribute{ + .name = "k8s.node.annotation", + .brief = "The annotation placed on the Node, the `` being the annotation name, the value being the annotation value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the Node, the `` being the label name, the value being the label value, even if the value is empty. +/// +/// # Examples +/// +/// - arm64 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_node_label = types.StringAttribute{ + .name = "k8s.node.label", + .brief = "The label placed on the Node, the `` being the label name, the value being the label value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the Node. +/// +/// # Examples +/// +/// - node-1 +/// Note: This attribute is experimental and may change in the future. +pub const k8s_node_name = types.StringAttribute{ + .name = "k8s.node.name", + .brief = "The name of the Node.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the Node. +/// +/// # Examples +/// +/// - 1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2 +/// Note: This attribute is experimental and may change in the future. +pub const k8s_node_uid = types.StringAttribute{ + .name = "k8s.node.uid", + .brief = "The UID of the Node.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The annotation placed on the Pod, the `` being the annotation name, the value being the annotation value. +/// +/// # Examples +/// +/// - true +/// - x64 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_pod_annotation = types.StringAttribute{ + .name = "k8s.pod.annotation", + .brief = "The annotation placed on the Pod, the `` being the annotation name, the value being the annotation value.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the Pod, the `` being the label name, the value being the label value. +/// +/// # Examples +/// +/// - my-app +/// - x64 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_pod_label = types.StringAttribute{ + .name = "k8s.pod.label", + .brief = "The label placed on the Pod, the `` being the label name, the value being the label value.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the Pod. +/// +/// # Examples +/// +/// - opentelemetry-pod-autoconf +/// Note: This attribute is experimental and may change in the future. +pub const k8s_pod_name = types.StringAttribute{ + .name = "k8s.pod.name", + .brief = "The name of the Pod.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the Pod. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_pod_uid = types.StringAttribute{ + .name = "k8s.pod.uid", + .brief = "The UID of the Pod.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The annotation placed on the ReplicaSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. +/// +/// # Examples +/// +/// - 0 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_replicaset_annotation = types.StringAttribute{ + .name = "k8s.replicaset.annotation", + .brief = "The annotation placed on the ReplicaSet, the `` being the annotation name, the value being the annotation value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the ReplicaSet, the `` being the label name, the value being the label value, even if the value is empty. +/// +/// # Examples +/// +/// - guestbook +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_replicaset_label = types.StringAttribute{ + .name = "k8s.replicaset.label", + .brief = "The label placed on the ReplicaSet, the `` being the label name, the value being the label value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the ReplicaSet. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_replicaset_name = types.StringAttribute{ + .name = "k8s.replicaset.name", + .brief = "The name of the ReplicaSet.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the ReplicaSet. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_replicaset_uid = types.StringAttribute{ + .name = "k8s.replicaset.uid", + .brief = "The UID of the ReplicaSet.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the replication controller. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_replicationcontroller_name = types.StringAttribute{ + .name = "k8s.replicationcontroller.name", + .brief = "The name of the replication controller.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the replication controller. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_replicationcontroller_uid = types.StringAttribute{ + .name = "k8s.replicationcontroller.uid", + .brief = "The UID of the replication controller.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the resource quota. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_resourcequota_name = types.StringAttribute{ + .name = "k8s.resourcequota.name", + .brief = "The name of the resource quota.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the resource quota. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_resourcequota_uid = types.StringAttribute{ + .name = "k8s.resourcequota.uid", + .brief = "The UID of the resource quota.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The annotation placed on the StatefulSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. +/// +/// # Examples +/// +/// - 1 +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_statefulset_annotation = types.StringAttribute{ + .name = "k8s.statefulset.annotation", + .brief = "The annotation placed on the StatefulSet, the `` being the annotation name, the value being the annotation value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The label placed on the StatefulSet, the `` being the label name, the value being the label value, even if the value is empty. +/// +/// # Examples +/// +/// - guestbook +/// - +/// Note: This attribute is experimental and may change in the future. +pub const k8s_statefulset_label = types.StringAttribute{ + .name = "k8s.statefulset.label", + .brief = "The label placed on the StatefulSet, the `` being the label name, the value being the label value, even if the value is empty.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the StatefulSet. +/// +/// # Examples +/// +/// - opentelemetry +/// Note: This attribute is experimental and may change in the future. +pub const k8s_statefulset_name = types.StringAttribute{ + .name = "k8s.statefulset.name", + .brief = "The name of the StatefulSet.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UID of the StatefulSet. +/// +/// # Examples +/// +/// - 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff +/// Note: This attribute is experimental and may change in the future. +pub const k8s_statefulset_uid = types.StringAttribute{ + .name = "k8s.statefulset.uid", + .brief = "The UID of the StatefulSet.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Name of the logical partition that hosts a systems with a mainframe operating system. +/// +/// # Examples +/// +/// - LPAR01 +/// Note: This attribute is experimental and may change in the future. +pub const mainframe_lpar_name = types.StringAttribute{ + .name = "mainframe.lpar.name", + .brief = "Name of the logical partition that hosts a systems with a mainframe operating system.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. +/// +/// # Examples +/// +/// - sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4 +/// Note: This attribute is experimental and may change in the future. +pub const oci_manifest_digest = types.StringAttribute{ + .name = "oci.manifest.digest", + .brief = "The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Unique identifier for a particular build or compilation of the operating system. +/// +/// # Examples +/// +/// - TQ3C.230805.001.B2 +/// - 20E247 +/// - 22621 +/// Note: This attribute is experimental and may change in the future. +pub const os_build_id = types.StringAttribute{ + .name = "os.build_id", + .brief = "Unique identifier for a particular build or compilation of the operating system.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. +/// +/// # Examples +/// +/// - Microsoft Windows [Version 10.0.18363.778] +/// - Ubuntu 18.04.1 LTS +/// Note: This attribute is experimental and may change in the future. +pub const os_description = types.StringAttribute{ + .name = "os.description", + .brief = "Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Human readable operating system name. +/// +/// # Examples +/// +/// - iOS +/// - Android +/// - Ubuntu +/// Note: This attribute is experimental and may change in the future. +pub const os_name = types.StringAttribute{ + .name = "os.name", + .brief = "Human readable operating system name.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The operating system type. +/// Note: This attribute is experimental and may change in the future. +pub const os_type = types.StringAttribute{ + .name = "os.type", + .brief = "The operating system type.", + .stability = .development, + .requirement_level = .required, +}; + +/// The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +/// +/// # Examples +/// +/// - 14.2.1 +/// - 18.04.1 +/// Note: This attribute is experimental and may change in the future. +pub const os_version = types.StringAttribute{ + .name = "os.version", + .brief = "The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). +/// +/// # Examples +/// +/// - io.opentelemetry.contrib.mongodb +pub const otel_scope_name = types.StringAttribute{ + .name = "otel.scope.name", + .brief = "The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). +/// +/// # Examples +/// +/// - 1.0.0 +pub const otel_scope_version = types.StringAttribute{ + .name = "otel.scope.version", + .brief = "The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// 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`. +/// +/// # Examples +/// +/// - cmd/otelcol +/// Note: This attribute is experimental and may change in the future. +pub const process_command = types.StringAttribute{ + .name = "process.command", + .brief = "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`.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// 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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. +/// +/// # Examples +/// +/// - [\"cmd/otecol\", \"--config=config.yaml\"] +/// Note: This attribute is experimental and may change in the future. +pub const process_command_args = types.StringAttribute{ + .name = "process.command_args", + .brief = "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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// 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. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. +/// +/// # Examples +/// +/// - C:\cmd\otecol --config=\"my directory\config.yaml\" +/// Note: This attribute is experimental and may change in the future. +pub const process_command_line = types.StringAttribute{ + .name = "process.command_line", + .brief = "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. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. +/// +/// # Examples +/// +/// - otelcol +/// Note: This attribute is experimental and may change in the future. +pub const process_executable_name = types.StringAttribute{ + .name = "process.executable.name", + .brief = "The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// 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`. +/// +/// # Examples +/// +/// - /usr/bin/cmd/otelcol +/// Note: This attribute is experimental and may change in the future. +pub const process_executable_path = types.StringAttribute{ + .name = "process.executable.path", + .brief = "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`.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The control group associated with the process. +/// +/// # Examples +/// +/// - 1:name=systemd:/user.slice/user-1000.slice/session-3.scope +/// - 0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope +/// Note: This attribute is experimental and may change in the future. +pub const process_linux_cgroup = types.StringAttribute{ + .name = "process.linux.cgroup", + .brief = "The control group associated with the process.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The username of the user that owns the process. +/// +/// # Examples +/// +/// - root +/// Note: This attribute is experimental and may change in the future. +pub const process_owner = types.StringAttribute{ + .name = "process.owner", + .brief = "The username of the user that owns the process.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Parent Process identifier (PPID). +/// +/// # Examples +/// +/// - 111 +/// Note: This attribute is experimental and may change in the future. +pub const process_parent_pid = types.IntAttribute{ + .name = "process.parent_pid", + .brief = "Parent Process identifier (PPID).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Process identifier (PID). +/// +/// # Examples +/// +/// - 1234 +/// Note: This attribute is experimental and may change in the future. +pub const process_pid = types.IntAttribute{ + .name = "process.pid", + .brief = "Process identifier (PID).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. +/// +/// # Examples +/// +/// - Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0 +/// Note: This attribute is experimental and may change in the future. +pub const process_runtime_description = types.StringAttribute{ + .name = "process.runtime.description", + .brief = "An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the runtime of this process. +/// +/// # Examples +/// +/// - OpenJDK Runtime Environment +/// Note: This attribute is experimental and may change in the future. +pub const process_runtime_name = types.StringAttribute{ + .name = "process.runtime.name", + .brief = "The name of the runtime of this process.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The version of the runtime of this process, as returned by the runtime without modification. +/// +/// # Examples +/// +/// - 14.0.2 +/// Note: This attribute is experimental and may change in the future. +pub const process_runtime_version = types.StringAttribute{ + .name = "process.runtime.version", + .brief = "The version of the runtime of this process, as returned by the runtime without modification.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The string ID of the service instance. +/// +/// # Examples +/// +/// - 627cc493-f310-47de-96bd-71410b7dec09 +/// Note: This attribute is experimental and may change in the future. +pub const service_instance_id = types.StringAttribute{ + .name = "service.instance.id", + .brief = "The string ID of the service instance.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Logical name of the service. +/// +/// # Examples +/// +/// - shoppingcart +pub const service_name = types.StringAttribute{ + .name = "service.name", + .brief = "Logical name of the service.", + .stability = .stable, + .requirement_level = .required, +}; + +/// A namespace for `service.name`. +/// +/// # Examples +/// +/// - Shop +/// Note: This attribute is experimental and may change in the future. +pub const service_namespace = types.StringAttribute{ + .name = "service.namespace", + .brief = "A namespace for `service.name`.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The version string of the service API or implementation. The format is not defined by these conventions. +/// +/// # Examples +/// +/// - 2.0.0 +/// - a01dbef8a +pub const service_version = types.StringAttribute{ + .name = "service.version", + .brief = "The version string of the service API or implementation. The format is not defined by these conventions.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// The name of the auto instrumentation agent or distribution, if used. +/// +/// # Examples +/// +/// - parts-unlimited-java +/// Note: This attribute is experimental and may change in the future. +pub const telemetry_distro_name = types.StringAttribute{ + .name = "telemetry.distro.name", + .brief = "The name of the auto instrumentation agent or distribution, if used.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The version string of the auto instrumentation agent or distribution, if used. +/// +/// # Examples +/// +/// - 1.2.3 +/// Note: This attribute is experimental and may change in the future. +pub const telemetry_distro_version = types.StringAttribute{ + .name = "telemetry.distro.version", + .brief = "The version string of the auto instrumentation agent or distribution, if used.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The language of the telemetry SDK. +pub const telemetry_sdk_language = types.StringAttribute{ + .name = "telemetry.sdk.language", + .brief = "The language of the telemetry SDK.", + .stability = .stable, + .requirement_level = .required, +}; + +/// The name of the telemetry SDK as defined above. +/// +/// # Examples +/// +/// - opentelemetry +pub const telemetry_sdk_name = types.StringAttribute{ + .name = "telemetry.sdk.name", + .brief = "The name of the telemetry SDK as defined above.", + .stability = .stable, + .requirement_level = .required, +}; + +/// The version string of the telemetry SDK. +/// +/// # Examples +/// +/// - 1.2.3 +pub const telemetry_sdk_version = types.StringAttribute{ + .name = "telemetry.sdk.version", + .brief = "The version string of the telemetry SDK.", + .stability = .stable, + .requirement_level = .required, +}; + +/// Full user-agent string provided by the browser +/// +/// # Examples +/// +/// - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 +pub const user_agent_original = types.StringAttribute{ + .name = "user_agent.original", + .brief = "Full user-agent string provided by the browser", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. +/// +/// # Examples +/// +/// - my-feature-branch +/// - tag-1-test +/// Note: This attribute is experimental and may change in the future. +pub const vcs_ref_head_name = types.StringAttribute{ + .name = "vcs.ref.head.name", + .brief = "The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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. +/// +/// # Examples +/// +/// - 9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc +/// - main +/// - 123 +/// - HEAD +/// Note: This attribute is experimental and may change in the future. +pub const vcs_ref_head_revision = types.StringAttribute{ + .name = "vcs.ref.head.revision", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +/// +/// # Examples +/// +/// - branch +/// - tag +/// Note: This attribute is experimental and may change in the future. +pub const vcs_ref_type = types.StringAttribute{ + .name = "vcs.ref.type", + .brief = "The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. +/// +/// # Examples +/// +/// - semantic-conventions +/// - my-cool-repo +/// Note: This attribute is experimental and may change in the future. +pub const vcs_repository_name = types.StringAttribute{ + .name = "vcs.repository.name", + .brief = "The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. +/// +/// # Examples +/// +/// - https://github.com/opentelemetry/open-telemetry-collector-contrib +/// - https://gitlab.com/my-org/my-project/my-projects-project/repo +/// Note: This attribute is experimental and may change in the future. +pub const vcs_repository_url_full = types.StringAttribute{ + .name = "vcs.repository.url.full", + .brief = "The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Additional description of the web engine (e.g. detailed version and edition information). +/// +/// # Examples +/// +/// - WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final +/// Note: This attribute is experimental and may change in the future. +pub const webengine_description = types.StringAttribute{ + .name = "webengine.description", + .brief = "Additional description of the web engine (e.g. detailed version and edition information).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the web engine. +/// +/// # Examples +/// +/// - WildFly +/// Note: This attribute is experimental and may change in the future. +pub const webengine_name = types.StringAttribute{ + .name = "webengine.name", + .brief = "The name of the web engine.", + .stability = .development, + .requirement_level = .required, +}; + +/// The version of the web engine. +/// +/// # Examples +/// +/// - 21.0.0 +/// Note: This attribute is experimental and may change in the future. +pub const webengine_version = types.StringAttribute{ + .name = "webengine.version", + .brief = "The version of the web engine.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis. +/// +/// # Examples +/// +/// - SYS1 +/// Note: This attribute is experimental and may change in the future. +pub const zos_smf_id = types.StringAttribute{ + .name = "zos.smf.id", + .brief = "The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis.", + .stability = .development, + .requirement_level = .required, +}; + +/// The name of the SYSPLEX to which the z/OS system belongs too. +/// +/// # Examples +/// +/// - SYSPLEX1 +/// Note: This attribute is experimental and may change in the future. +pub const zos_sysplex_name = types.StringAttribute{ + .name = "zos.sysplex.name", + .brief = "The name of the SYSPLEX to which the z/OS system belongs too.", + .stability = .development, + .requirement_level = .required, +}; + +test "semantic resource attributes" { + @import("std").testing.refAllDecls(@This()); +} diff --git a/src/rpc/registry.zig b/src/rpc/registry.zig deleted file mode 100644 index b557fc2..0000000 --- a/src/rpc/registry.zig +++ /dev/null @@ -1,327 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: rpc -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const connectRpcErrorCodeValue = enum { - /// - cancelled, - /// - unknown, - /// - invalid_argument, - /// - deadline_exceeded, - /// - not_found, - /// - already_exists, - /// - permission_denied, - /// - resource_exhausted, - /// - failed_precondition, - /// - aborted, - /// - out_of_range, - /// - unimplemented, - /// - internal, - /// - unavailable, - /// - data_loss, - /// - unauthenticated, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .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", - }; - } -}; - -pub const grpcStatusCodeValue = enum { - /// OK - ok, - /// 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, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .ok => "", - .cancelled => "", - .unknown => "", - .invalid_argument => "", - .deadline_exceeded => "", - .not_found => "", - .already_exists => "", - .permission_denied => "", - .resource_exhausted => "", - .failed_precondition => "", - .aborted => "", - .out_of_range => "", - .unimplemented => "", - .internal => "", - .unavailable => "", - .data_loss => "", - .unauthenticated => "", - }; - } -}; - -pub const systemValue = enum { - /// gRPC - grpc, - /// Java RMI - java_rmi, - /// .NET WCF - dotnet_wcf, - /// Apache Dubbo - apache_dubbo, - /// Connect RPC - connect_rpc, - /// [ONC RPC (Sun RPC)](https://datatracker.ietf.org/doc/html/rfc5531) - onc_rpc, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .grpc => "grpc", - .java_rmi => "java_rmi", - .dotnet_wcf => "dotnet_wcf", - .apache_dubbo => "apache_dubbo", - .connect_rpc => "connect_rpc", - .onc_rpc => "onc_rpc", - }; - } -}; - -pub const messageTypeValue = enum { - /// - sent, - /// - received, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .sent => "SENT", - .received => "RECEIVED", - }; - } -}; - -/// The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values. -pub const rpc_connect_rpc_error_code = types.EnumAttribute(connectRpcErrorCodeValue){ - .base = types.StringAttribute{ - .name = "rpc.connect_rpc.error_code", - .brief = "The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = connectRpcErrorCodeValue.cancelled, -}; - -/// Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. -pub const rpc_connect_rpc_request_metadata = types.StringAttribute{ - .name = "rpc.connect_rpc.request.metadata", - .brief = "Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values.", - .note = "Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\nIncluding all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\n\nFor example, a property `my-custom-key` with value `[\"1.2.3.4\", \"1.2.3.5\"]` SHOULD be recorded as\nthe `rpc.connect_rpc.request.metadata.my-custom-key` attribute with value `[\"1.2.3.4\", \"1.2.3.5\"]`", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. -pub const rpc_connect_rpc_response_metadata = types.StringAttribute{ - .name = "rpc.connect_rpc.response.metadata", - .brief = "Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values.", - .note = "Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\nIncluding all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\n\nFor example, a property `my-custom-key` with value `\"attribute_value\"` SHOULD be recorded as\nthe `rpc.connect_rpc.response.metadata.my-custom-key` attribute with value `[\"attribute_value\"]`", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. -pub const rpc_grpc_status_code = types.EnumAttribute(grpcStatusCodeValue){ - .base = types.StringAttribute{ - .name = "rpc.grpc.status_code", - .brief = "The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = grpcStatusCodeValue.ok, -}; - -/// gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. -pub const rpc_grpc_request_metadata = types.StringAttribute{ - .name = "rpc.grpc.request.metadata", - .brief = "gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values.", - .note = "Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\nIncluding all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\n\nFor example, a property `my-custom-key` with value `[\"1.2.3.4\", \"1.2.3.5\"]` SHOULD be recorded as\n`rpc.grpc.request.metadata.my-custom-key` attribute with value `[\"1.2.3.4\", \"1.2.3.5\"]`", - .stability = .development, - .requirement_level = .recommended, -}; - -/// gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. -pub const rpc_grpc_response_metadata = types.StringAttribute{ - .name = "rpc.grpc.response.metadata", - .brief = "gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values.", - .note = "Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\nIncluding all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\n\nFor example, a property `my-custom-key` with value `[\"attribute_value\"]` SHOULD be recorded as\nthe `rpc.grpc.response.metadata.my-custom-key` attribute with value `[\"attribute_value\"]`", - .stability = .development, - .requirement_level = .recommended, -}; - -/// `error.code` property of response if it is an error response. -pub const rpc_jsonrpc_error_code = types.StringAttribute{ - .name = "rpc.jsonrpc.error_code", - .brief = "`error.code` property of response if it is an error response.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// `error.message` property of response if it is an error response. -pub const rpc_jsonrpc_error_message = types.StringAttribute{ - .name = "rpc.jsonrpc.error_message", - .brief = "`error.message` property of response if it is an error response.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// `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. -pub const rpc_jsonrpc_request_id = types.StringAttribute{ - .name = "rpc.jsonrpc.request_id", - .brief = "`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.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. -pub const rpc_jsonrpc_version = types.StringAttribute{ - .name = "rpc.jsonrpc.version", - .brief = "Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the (logical) method being called, must be equal to the $method part in the span name. -pub const rpc_method = types.StringAttribute{ - .name = "rpc.method", - .brief = "The name of the (logical) method being called, must be equal to the $method part in the span name.", - .note = "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.name` 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).", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The full (logical) name of the service being called, including its package name, if applicable. -pub const rpc_service = types.StringAttribute{ - .name = "rpc.service", - .brief = "The full (logical) name of the service being called, including its package name, if applicable.", - .note = "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).", - .stability = .development, - .requirement_level = .recommended, -}; - -/// A string identifying the remoting system. See below for a list of well-known identifiers. -pub const rpc_system = types.EnumAttribute(systemValue){ - .base = types.StringAttribute{ - .name = "rpc.system", - .brief = "A string identifying the remoting system. See below for a list of well-known identifiers.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = systemValue.grpc, -}; - -/// Whether this is a received or sent message. -pub const rpc_message_type = types.EnumAttribute(messageTypeValue){ - .base = types.StringAttribute{ - .name = "rpc.message.type", - .brief = "Whether this is a received or sent message.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = messageTypeValue.sent, -}; - -/// MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. -pub const rpc_message_id = types.StringAttribute{ - .name = "rpc.message.id", - .brief = "MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.", - .note = "This way we guarantee that the values will be consistent between different implementations.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Compressed size of the message in bytes. -pub const rpc_message_compressed_size = types.StringAttribute{ - .name = "rpc.message.compressed_size", - .brief = "Compressed size of the message in bytes.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Uncompressed size of the message in bytes. -pub const rpc_message_uncompressed_size = types.StringAttribute{ - .name = "rpc.message.uncompressed_size", - .brief = "Uncompressed size of the message in bytes.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/rpc/rpc.zig b/src/rpc/rpc.zig deleted file mode 100644 index 94667ec..0000000 --- a/src/rpc/rpc.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! rpc semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/security-rule/registry.zig b/src/security-rule/registry.zig deleted file mode 100644 index b27e0ce..0000000 --- a/src/security-rule/registry.zig +++ /dev/null @@ -1,79 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: security-rule -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// A categorization value keyword used by the entity using the rule for detection of this event -pub const security_rule_category = types.StringAttribute{ - .name = "security_rule.category", - .brief = "A categorization value keyword used by the entity using the rule for detection of this event", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The description of the rule generating the event. -pub const security_rule_description = types.StringAttribute{ - .name = "security_rule.description", - .brief = "The description of the rule generating the event.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Name of the license under which the rule used to generate this event is made available. -pub const security_rule_license = types.StringAttribute{ - .name = "security_rule.license", - .brief = "Name of the license under which the rule used to generate this event is made available.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the rule or signature generating the event. -pub const security_rule_name = types.StringAttribute{ - .name = "security_rule.name", - .brief = "The name of the rule or signature generating the event.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Reference URL to additional information about the rule used to generate this event. -pub const security_rule_reference = types.StringAttribute{ - .name = "security_rule.reference", - .brief = "Reference URL to additional information about the rule used to generate this event.", - .note = "The URL can point to the vendor’s documentation about the rule. If that’s not available, it can also be a link to a more general page describing this type of alert.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member. -pub const security_rule_ruleset_name = types.StringAttribute{ - .name = "security_rule.ruleset.name", - .brief = "Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event. -pub const security_rule_uuid = types.StringAttribute{ - .name = "security_rule.uuid", - .brief = "A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The version / revision of the rule being used for analysis. -pub const security_rule_version = types.StringAttribute{ - .name = "security_rule.version", - .brief = "The version / revision of the rule being used for analysis.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/security-rule/security-rule.zig b/src/security-rule/security-rule.zig deleted file mode 100644 index a8be2f3..0000000 --- a/src/security-rule/security-rule.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! security-rule semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/server/registry.zig b/src/server/registry.zig deleted file mode 100644 index 713ccd8..0000000 --- a/src/server/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: server -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. -pub const server_address = types.StringAttribute{ - .name = "server.address", - .brief = "Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", - .note = "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.", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// Server port number. -pub const server_port = types.StringAttribute{ - .name = "server.port", - .brief = "Server port number.", - .note = "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.", - .stability = .stable, - .requirement_level = .recommended, -}; - diff --git a/src/server/server.zig b/src/server/server.zig deleted file mode 100644 index 89e9fd5..0000000 --- a/src/server/server.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! server semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/service/registry.zig b/src/service/registry.zig deleted file mode 100644 index 03c7f1e..0000000 --- a/src/service/registry.zig +++ /dev/null @@ -1,43 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: service -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Logical name of the service. -pub const service_name = types.StringAttribute{ - .name = "service.name", - .brief = "Logical name of the service.", - .note = "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`.", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// The version string of the service API or implementation. The format is not defined by these conventions. -pub const service_version = types.StringAttribute{ - .name = "service.version", - .brief = "The version string of the service API or implementation. The format is not defined by these conventions.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, -}; - -/// A namespace for `service.name`. -pub const service_namespace = types.StringAttribute{ - .name = "service.namespace", - .brief = "A namespace for `service.name`.", - .note = "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.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The string ID of the service instance. -pub const service_instance_id = types.StringAttribute{ - .name = "service.instance.id", - .brief = "The string ID of the service instance.", - .note = "MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words\n`service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to\ndistinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled\nservice).\n\nImplementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC\n4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of\nthis value if stability is desirable. In that case, the ID SHOULD be used as source of a UUID Version 5 and\nSHOULD use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.\n\nUUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is\nneeded. Similar to what can be seen in the man page for the\n[`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) file, the underlying\ndata, such as pod name and namespace should be treated as confidential, being the user's choice to expose it\nor not via another resource attribute.\n\nFor applications running behind an application server (like unicorn), we do not recommend using one identifier\nfor all processes participating in the application. Instead, it's recommended each division (e.g. a worker\nthread in unicorn) to have its own instance.id.\n\nIt's not recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the\nservice instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will\nlikely be wrong, as the Collector might not know from which container within that pod the telemetry originated.\nHowever, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance\nfor that telemetry. This is typically the case for scraping receivers, as they know the target address and\nport.", - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/service/service.zig b/src/service/service.zig deleted file mode 100644 index c78edeb..0000000 --- a/src/service/service.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! service semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/session/registry.zig b/src/session/registry.zig deleted file mode 100644 index 810b6fe..0000000 --- a/src/session/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: session -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// A unique id to identify a session. -pub const session_id = types.StringAttribute{ - .name = "session.id", - .brief = "A unique id to identify a session.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The previous `session.id` for this user, when known. -pub const session_previous_id = types.StringAttribute{ - .name = "session.previous_id", - .brief = "The previous `session.id` for this user, when known.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/session/session.zig b/src/session/session.zig deleted file mode 100644 index 1ea6409..0000000 --- a/src/session/session.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! session semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/signalr/registry.zig b/src/signalr/registry.zig deleted file mode 100644 index 4dbb85c..0000000 --- a/src/signalr/registry.zig +++ /dev/null @@ -1,65 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: signalr -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const connectionStatusValue = enum { - /// The connection was closed normally. - normal_closure, - /// The connection was closed due to a timeout. - timeout, - /// The connection was closed because the app is shutting down. - app_shutdown, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .normal_closure => "normal_closure", - .timeout => "timeout", - .app_shutdown => "app_shutdown", - }; - } -}; - -pub const transportValue = enum { - /// ServerSentEvents protocol - server_sent_events, - /// LongPolling protocol - long_polling, - /// WebSockets protocol - web_sockets, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .server_sent_events => "server_sent_events", - .long_polling => "long_polling", - .web_sockets => "web_sockets", - }; - } -}; - -/// SignalR HTTP connection closure status. -pub const signalr_connection_status = types.EnumAttribute(connectionStatusValue){ - .base = types.StringAttribute{ - .name = "signalr.connection.status", - .brief = "SignalR HTTP connection closure status.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, - }, - .well_known_values = connectionStatusValue.normal_closure, -}; - -/// [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) -pub const signalr_transport = types.EnumAttribute(transportValue){ - .base = types.StringAttribute{ - .name = "signalr.transport", - .brief = "[SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)", - .note = null, - .stability = .stable, - .requirement_level = .recommended, - }, - .well_known_values = transportValue.server_sent_events, -}; - diff --git a/src/signalr/signalr.zig b/src/signalr/signalr.zig deleted file mode 100644 index faf234d..0000000 --- a/src/signalr/signalr.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! signalr semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/source/registry.zig b/src/source/registry.zig deleted file mode 100644 index 1b7733e..0000000 --- a/src/source/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: source -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. -pub const source_address = types.StringAttribute{ - .name = "source.address", - .brief = "Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", - .note = "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.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Source port number -pub const source_port = types.StringAttribute{ - .name = "source.port", - .brief = "Source port number", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/source/source.zig b/src/source/source.zig deleted file mode 100644 index 8e7dd32..0000000 --- a/src/source/source.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! source semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/system/registry.zig b/src/system/registry.zig deleted file mode 100644 index bf9189f..0000000 --- a/src/system/registry.zig +++ /dev/null @@ -1,243 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: system -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const memoryStateValue = enum { - /// Actual used virtual memory in bytes. - used, - /// - free, - /// - buffers, - /// - cached, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .used => "used", - .free => "free", - .buffers => "buffers", - .cached => "cached", - }; - } -}; - -pub const pagingStateValue = enum { - /// - used, - /// - free, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .used => "used", - .free => "free", - }; - } -}; - -pub const pagingTypeValue = enum { - /// - major, - /// - minor, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .major => "major", - .minor => "minor", - }; - } -}; - -pub const pagingDirectionValue = enum { - /// - in, - /// - out, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .in => "in", - .out => "out", - }; - } -}; - -pub const filesystemStateValue = enum { - /// - used, - /// - free, - /// - reserved, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .used => "used", - .free => "free", - .reserved => "reserved", - }; - } -}; - -pub const filesystemTypeValue = enum { - /// - fat32, - /// - exfat, - /// - ntfs, - /// - refs, - /// - hfsplus, - /// - ext4, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .fat32 => "fat32", - .exfat => "exfat", - .ntfs => "ntfs", - .refs => "refs", - .hfsplus => "hfsplus", - .ext4 => "ext4", - }; - } -}; - -pub const processStatusValue = enum { - /// - running, - /// - sleeping, - /// - stopped, - /// - defunct, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .running => "running", - .sleeping => "sleeping", - .stopped => "stopped", - .defunct => "defunct", - }; - } -}; - -/// The device identifier -pub const system_device = types.StringAttribute{ - .name = "system.device", - .brief = "The device identifier", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The memory state -pub const system_memory_state = types.EnumAttribute(memoryStateValue){ - .base = types.StringAttribute{ - .name = "system.memory.state", - .brief = "The memory state", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = memoryStateValue.used, -}; - -/// The memory paging state -pub const system_paging_state = types.EnumAttribute(pagingStateValue){ - .base = types.StringAttribute{ - .name = "system.paging.state", - .brief = "The memory paging state", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = pagingStateValue.used, -}; - -/// The memory paging type -pub const system_paging_type = types.EnumAttribute(pagingTypeValue){ - .base = types.StringAttribute{ - .name = "system.paging.type", - .brief = "The memory paging type", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = pagingTypeValue.major, -}; - -/// The paging access direction -pub const system_paging_direction = types.EnumAttribute(pagingDirectionValue){ - .base = types.StringAttribute{ - .name = "system.paging.direction", - .brief = "The paging access direction", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = pagingDirectionValue.in, -}; - -/// The filesystem state -pub const system_filesystem_state = types.EnumAttribute(filesystemStateValue){ - .base = types.StringAttribute{ - .name = "system.filesystem.state", - .brief = "The filesystem state", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = filesystemStateValue.used, -}; - -/// The filesystem type -pub const system_filesystem_type = types.EnumAttribute(filesystemTypeValue){ - .base = types.StringAttribute{ - .name = "system.filesystem.type", - .brief = "The filesystem type", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = filesystemTypeValue.fat32, -}; - -/// The filesystem mode -pub const system_filesystem_mode = types.StringAttribute{ - .name = "system.filesystem.mode", - .brief = "The filesystem mode", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The filesystem mount path -pub const system_filesystem_mountpoint = types.StringAttribute{ - .name = "system.filesystem.mountpoint", - .brief = "The filesystem mount path", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html -pub const system_process_status = types.EnumAttribute(processStatusValue){ - .base = types.StringAttribute{ - .name = "system.process.status", - .brief = "The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = processStatusValue.running, -}; - diff --git a/src/system/system.zig b/src/system/system.zig deleted file mode 100644 index d151161..0000000 --- a/src/system/system.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! system semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/telemetry/entities.zig b/src/telemetry/entities.zig deleted file mode 100644 index 7a8afef..0000000 --- a/src/telemetry/entities.zig +++ /dev/null @@ -1,56 +0,0 @@ -const std = @import("std"); -const telemetry_registry = @import("registry.zig"); -const types = @import("../types.zig"); - -/// Telemetry SDK entity definition. -/// The telemetry SDK used to capture data recorded by the instrumentation libraries. -pub const TelemetrySdk = struct { - /// Name of the telemetry SDK as defined by the vendor. - pub const name = telemetry_registry.Attributes.telemetry_sdk_name; - - /// Language of the telemetry SDK. - pub const language = telemetry_registry.Attributes.telemetry_sdk_language; - - /// Version string of the telemetry SDK. - pub const version = telemetry_registry.Attributes.telemetry_sdk_version; - - /// Entity definition for telemetry SDK - pub const entity = types.EntityGroup{ - .id = "entity.telemetry.sdk", - .name = "telemetry.sdk", - .brief = "The telemetry SDK used to capture data recorded by the instrumentation libraries.", - .stability = .stable, - }; -}; - -/// Telemetry distribution entity definition. -/// The distribution of telemetry SDK used to capture data recorded by the instrumentation libraries. -pub const TelemetryDistro = struct { - /// Name of the telemetry distribution. - pub const name = telemetry_registry.Attributes.telemetry_distro_name; - - /// Version string of the telemetry distribution. - pub const version = telemetry_registry.Attributes.telemetry_distro_version; - - /// Entity definition for telemetry distribution - pub const entity = types.EntityGroup{ - .id = "entity.telemetry.distro", - .name = "telemetry.distro", - .brief = "The distribution of telemetry SDK used to capture data recorded by the instrumentation libraries.", - .stability = .experimental, - }; -}; - -test "telemetry entities" { - const testing = std.testing; - - // Test SDK entity - try testing.expectEqualStrings("entity.telemetry.sdk", TelemetrySdk.entity.id); - try testing.expectEqualStrings("telemetry.sdk", TelemetrySdk.entity.name); - try testing.expectEqual(types.StabilityLevel.stable, TelemetrySdk.entity.stability); - - // Test distribution entity - try testing.expectEqualStrings("entity.telemetry.distro", TelemetryDistro.entity.id); - try testing.expectEqualStrings("telemetry.distro", TelemetryDistro.entity.name); - try testing.expectEqual(types.StabilityLevel.experimental, TelemetryDistro.entity.stability); -} diff --git a/src/telemetry/registry.zig b/src/telemetry/registry.zig deleted file mode 100644 index dfb32f3..0000000 --- a/src/telemetry/registry.zig +++ /dev/null @@ -1,99 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: telemetry -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const sdkLanguageValue = enum { - /// - cpp, - /// - dotnet, - /// - erlang, - /// - go, - /// - java, - /// - nodejs, - /// - php, - /// - python, - /// - ruby, - /// - rust, - /// - swift, - /// - webjs, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .cpp => "cpp", - .dotnet => "dotnet", - .erlang => "erlang", - .go => "go", - .java => "java", - .nodejs => "nodejs", - .php => "php", - .python => "python", - .ruby => "ruby", - .rust => "rust", - .swift => "swift", - .webjs => "webjs", - }; - } -}; - -/// The name of the telemetry SDK as defined above. -pub const telemetry_sdk_name = types.StringAttribute{ - .name = "telemetry.sdk.name", - .brief = "The name of the telemetry SDK as defined above.", - .note = "The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.\nIf another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the\n`telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point\nor another suitable identifier depending on the language.\nThe identifier `opentelemetry` is reserved and MUST NOT be used in this case.\nAll custom identifiers SHOULD be stable across different versions of an implementation.", - .stability = .stable, - .requirement_level = .recommended, -}; - -/// The language of the telemetry SDK. -pub const telemetry_sdk_language = types.EnumAttribute(sdkLanguageValue){ - .base = types.StringAttribute{ - .name = "telemetry.sdk.language", - .brief = "The language of the telemetry SDK.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, - }, - .well_known_values = sdkLanguageValue.cpp, -}; - -/// The version string of the telemetry SDK. -pub const telemetry_sdk_version = types.StringAttribute{ - .name = "telemetry.sdk.version", - .brief = "The version string of the telemetry SDK.", - .note = null, - .stability = .stable, - .requirement_level = .recommended, -}; - -/// The name of the auto instrumentation agent or distribution, if used. -pub const telemetry_distro_name = types.StringAttribute{ - .name = "telemetry.distro.name", - .brief = "The name of the auto instrumentation agent or distribution, if used.", - .note = "Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to\na string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The version string of the auto instrumentation agent or distribution, if used. -pub const telemetry_distro_version = types.StringAttribute{ - .name = "telemetry.distro.version", - .brief = "The version string of the auto instrumentation agent or distribution, if used.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/telemetry/telemetry.zig b/src/telemetry/telemetry.zig deleted file mode 100644 index 5279053..0000000 --- a/src/telemetry/telemetry.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! telemetry semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/test_simple/registry.zig b/src/test_simple/registry.zig deleted file mode 100644 index dd2c743..0000000 --- a/src/test_simple/registry.zig +++ /dev/null @@ -1,9 +0,0 @@ -//! Test_simple semantic conventions for OpenTelemetry -//! Generated from simple_test.yaml - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Test_simple semantic convention registry -pub const TEST_SIMPLERegistry = struct { -}; diff --git a/src/thread/registry.zig b/src/thread/registry.zig deleted file mode 100644 index 820f7a0..0000000 --- a/src/thread/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: thread -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// Current "managed" thread ID (as opposed to OS thread ID). -pub const thread_id = types.StringAttribute{ - .name = "thread.id", - .brief = "Current \"managed\" thread ID (as opposed to OS thread ID).", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// Current thread name. -pub const thread_name = types.StringAttribute{ - .name = "thread.name", - .brief = "Current thread name.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/thread/thread.zig b/src/thread/thread.zig deleted file mode 100644 index 7ecbbd4..0000000 --- a/src/thread/thread.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! thread semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/tls/registry.zig b/src/tls/registry.zig deleted file mode 100644 index 719277e..0000000 --- a/src/tls/registry.zig +++ /dev/null @@ -1,136 +0,0 @@ -//! Tls semantic conventions for OpenTelemetry -//! Generated from registry.yaml - -const std = @import("std"); -const types = @import("../types.zig"); - -// This document defines semantic convention attributes in the TLS namespace. - -/// 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. -/// 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). -pub const TLS_CIPHER = types.Attribute([]const u8) - .init(.{ - .name = "tls.cipher", - .type = []const u8, - .brief = "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.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - .note = "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).", - }); - -/// 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. -pub const TLS_CLIENT_CERTIFICATE_CHAIN = types.Attribute(types.ArrayAttribute) - .init(.{ - .name = "tls.client.certificate_chain", - .type = types.ArrayAttribute, - .brief = "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.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - }); - -/// 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. -pub const TLS_CLIENT_HASH_MD5 = types.Attribute([]const u8) - .init(.{ - .name = "tls.client.hash.md5", - .type = []const u8, - .brief = "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.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - }); - -/// 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. -pub const TLS_CLIENT_HASH_SHA1 = types.Attribute([]const u8) - .init(.{ - .name = "tls.client.hash.sha1", - .type = []const u8, - .brief = "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.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - }); - -/// 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. -/// Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com" -pub const TLS_CLIENT_HASH_SHA256 = types.Attribute([]const u8) - .init(.{ - .name = "tls.client.hash.sha256", - .type = []const u8, - .brief = "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.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - .examples = &[_][]const u8{"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"}, - }); - -/// A hash that identifies clients based on how they perform an SSL/TLS handshake. -/// Examples: "d4e5b18d6b55c71272893221c96ba240" -pub const TLS_CLIENT_JA3 = types.Attribute([]const u8) - .init(.{ - .name = "tls.client.ja3", - .type = []const u8, - .brief = "A hash that identifies clients based on how they perform an SSL/TLS handshake.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - .examples = &[_][]const u8{"d4e5b18d6b55c71272893221c96ba240"}, - }); - -/// Date/Time indicating when client certificate is no longer considered valid. -/// Examples: "2021-01-01T00:00:00.000Z" -pub const TLS_CLIENT_NOT_AFTER = types.Attribute([]const u8) - .init(.{ - .name = "tls.client.not_after", - .type = []const u8, - .brief = "Date/Time indicating when client certificate is no longer considered valid.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - .examples = &[_][]const u8{"2021-01-01T00:00:00.000Z"}, - }); - -/// Date/Time indicating when client certificate is first considered valid. -/// Examples: "1970-01-01T00:00:00.000Z" -pub const TLS_CLIENT_NOT_BEFORE = types.Attribute([]const u8) - .init(.{ - .name = "tls.client.not_before", - .type = []const u8, - .brief = "Date/Time indicating when client certificate is first considered valid.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - .examples = &[_][]const u8{"1970-01-01T00:00:00.000Z"}, - }); - -/// Distinguished name of subject of the x.509 certificate presented by the client. -/// Examples: "CN=myclient, OU=Documentation Team, DC=example, DC=com" -pub const TLS_CLIENT_SUBJECT = types.Attribute([]const u8) - .init(.{ - .name = "tls.client.subject", - .type = []const u8, - .brief = "Distinguished name of subject of the x.509 certificate presented by the client.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - .examples = &[_][]const u8{"CN=myclient, OU=Documentation Team, DC=example, DC=com"}, - }); - -/// Array of ciphers offered by the client during the client hello. -pub const TLS_CLIENT_SUPPORTED_CIPHERS = types.Attribute(types.ArrayAttribute) - .init(.{ - .name = "tls.client.supported_ciphers", - .type = types.ArrayAttribute, - .brief = "Array of ciphers offered by the client during the client hello.", - .stability = types.StabilityLevel.experimental, - .requirement_level = types.RequirementLevel.recommended, - }); - - -/// Tls semantic convention registry -pub const TLSRegistry = struct { - // This document defines semantic convention attributes in the TLS namespace. - pub const tls_cipher = TLS_CIPHER; - pub const tls_client_certificate_chain = TLS_CLIENT_CERTIFICATE_CHAIN; - pub const tls_client_hash_md5 = TLS_CLIENT_HASH_MD5; - pub const tls_client_hash_sha1 = TLS_CLIENT_HASH_SHA1; - pub const tls_client_hash_sha256 = TLS_CLIENT_HASH_SHA256; - pub const tls_client_ja3 = TLS_CLIENT_JA3; - pub const tls_client_not_after = TLS_CLIENT_NOT_AFTER; - pub const tls_client_not_before = TLS_CLIENT_NOT_BEFORE; - pub const tls_client_subject = TLS_CLIENT_SUBJECT; - pub const tls_client_supported_ciphers = TLS_CLIENT_SUPPORTED_CIPHERS; - -}; diff --git a/src/trace.zig b/src/trace.zig new file mode 100644 index 0000000..226f001 --- /dev/null +++ b/src/trace.zig @@ -0,0 +1,2376 @@ +// DO NOT EDIT, this is an auto-generated file +// +// If you want to update the file: +// - Edit the template at scripts/templates/registry/zig/trace.zig.j2 +// - Run the script at scripts/generate-consts-from-spec.sh + +//! # Semantic Trace Attributes +//! +//! The entire set of semantic trace attributes (or [conventions](https://opentelemetry.io/docs/concepts/semantic-conventions/)) defined by the project. + +const std = @import("std"); +const types = @import("types.zig"); + +/// This attribute represents the state of the application. +/// +/// # Examples +/// +/// - created +/// Note: This attribute is experimental and may change in the future. +pub const android_app_state = types.StringAttribute{ + .name = "android.app.state", + .brief = "This attribute represents the state of the application.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The x (horizontal) coordinate of a screen coordinate, in screen pixels. +/// +/// # Examples +/// +/// - 0 +/// - 131 +/// Note: This attribute is experimental and may change in the future. +pub const app_screen_coordinate_x = types.IntAttribute{ + .name = "app.screen.coordinate.x", + .brief = "The x (horizontal) coordinate of a screen coordinate, in screen pixels.", + .stability = .development, + .requirement_level = .required, +}; + +/// The y (vertical) component of a screen coordinate, in screen pixels. +/// +/// # Examples +/// +/// - 12 +/// - 99 +/// Note: This attribute is experimental and may change in the future. +pub const app_screen_coordinate_y = types.IntAttribute{ + .name = "app.screen.coordinate.y", + .brief = "The y (vertical) component of a screen coordinate, in screen pixels.", + .stability = .development, + .requirement_level = .required, +}; + +/// An identifier that uniquely differentiates this widget from other widgets in the same application. +/// +/// # Examples +/// +/// - f9bc787d-ff05-48ad-90e1-fca1d46130b3 +/// - submit_order_1829 +/// Note: This attribute is experimental and may change in the future. +pub const app_widget_id = types.StringAttribute{ + .name = "app.widget.id", + .brief = "An identifier that uniquely differentiates this widget from other widgets in the same application.", + .stability = .development, + .requirement_level = .required, +}; + +/// The name of an application widget. +/// +/// # Examples +/// +/// - submit +/// - attack +/// - Clear Cart +/// Note: This attribute is experimental and may change in the future. +pub const app_widget_name = types.StringAttribute{ + .name = "app.widget.name", + .brief = "The name of an application widget.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The unique identifier of the AWS Bedrock Guardrail. A [guardrail](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) helps safeguard and prevent unwanted behavior from model responses or user messages. +/// +/// # Examples +/// +/// - sgi5gkybzqak +/// Note: This attribute is experimental and may change in the future. +pub const aws_bedrock_guardrail_id = types.StringAttribute{ + .name = "aws.bedrock.guardrail.id", + .brief = "The unique identifier of the AWS Bedrock Guardrail. A [guardrail](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) helps safeguard and prevent unwanted behavior from model responses or user messages.", + .stability = .development, + .requirement_level = .required, +}; + +/// The unique identifier of the AWS Bedrock Knowledge base. A [knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) is a bank of information that can be queried by models to generate more relevant responses and augment prompts. +/// +/// # Examples +/// +/// - XFWUPB9PAW +/// Note: This attribute is experimental and may change in the future. +pub const aws_bedrock_knowledge_base_id = types.StringAttribute{ + .name = "aws.bedrock.knowledge_base.id", + .brief = "The unique identifier of the AWS Bedrock Knowledge base. A [knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) is a bank of information that can be queried by models to generate more relevant responses and augment prompts.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The JSON-serialized value of each item in the `AttributeDefinitions` request field. +/// +/// # Examples +/// +/// - [\"{ \\"AttributeName\\": \\"string\\", \\"AttributeType\\": \\"string\\" }\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_attribute_definitions = types.StringAttribute{ + .name = "aws.dynamodb.attribute_definitions", + .brief = "The JSON-serialized value of each item in the `AttributeDefinitions` request field.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `AttributesToGet` request parameter. +/// +/// # Examples +/// +/// - [\"lives\", \"id\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_attributes_to_get = types.StringAttribute{ + .name = "aws.dynamodb.attributes_to_get", + .brief = "The value of the `AttributesToGet` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `ConsistentRead` request parameter. +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_consistent_read = types.BooleanAttribute{ + .name = "aws.dynamodb.consistent_read", + .brief = "The value of the `ConsistentRead` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The JSON-serialized value of each item in the `ConsumedCapacity` response field. +/// +/// # 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 }\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_consumed_capacity = types.StringAttribute{ + .name = "aws.dynamodb.consumed_capacity", + .brief = "The JSON-serialized value of each item in the `ConsumedCapacity` response field.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `Count` response parameter. +/// +/// # Examples +/// +/// - 10 +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_count = types.IntAttribute{ + .name = "aws.dynamodb.count", + .brief = "The value of the `Count` response parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `ExclusiveStartTableName` request parameter. +/// +/// # Examples +/// +/// - Users +/// - CatsTable +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_exclusive_start_table = types.StringAttribute{ + .name = "aws.dynamodb.exclusive_start_table", + .brief = "The value of the `ExclusiveStartTableName` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. +/// +/// # Examples +/// +/// - [\"{ \\"Create\\": { \\"IndexName\\": \\"string\\", \\"KeySchema\\": [ { \\"AttributeName\\": \\"string\\", \\"KeyType\\": \\"string\\" } ], \\"Projection\\": { \\"NonKeyAttributes\\": [ \\"string\\" ], \\"ProjectionType\\": \\"string\\" }, \\"ProvisionedThroughput\\": { \\"ReadCapacityUnits\\": number, \\"WriteCapacityUnits\\": number } }\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_global_secondary_index_updates = types.StringAttribute{ + .name = "aws.dynamodb.global_secondary_index_updates", + .brief = "The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field +/// +/// # Examples +/// +/// - [\"{ \\"IndexName\\": \\"string\\", \\"KeySchema\\": [ { \\"AttributeName\\": \\"string\\", \\"KeyType\\": \\"string\\" } ], \\"Projection\\": { \\"NonKeyAttributes\\": [ \\"string\\" ], \\"ProjectionType\\": \\"string\\" }, \\"ProvisionedThroughput\\": { \\"ReadCapacityUnits\\": number, \\"WriteCapacityUnits\\": number } }\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_global_secondary_indexes = types.StringAttribute{ + .name = "aws.dynamodb.global_secondary_indexes", + .brief = "The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `IndexName` request parameter. +/// +/// # Examples +/// +/// - name_to_group +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_index_name = types.StringAttribute{ + .name = "aws.dynamodb.index_name", + .brief = "The value of the `IndexName` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The JSON-serialized value of the `ItemCollectionMetrics` response field. +/// +/// # 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 ] } ] } +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_item_collection_metrics = types.StringAttribute{ + .name = "aws.dynamodb.item_collection_metrics", + .brief = "The JSON-serialized value of the `ItemCollectionMetrics` response field.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `Limit` request parameter. +/// +/// # Examples +/// +/// - 10 +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_limit = types.IntAttribute{ + .name = "aws.dynamodb.limit", + .brief = "The value of the `Limit` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. +/// +/// # Examples +/// +/// - [\"{ \\"IndexArn\\": \\"string\\", \\"IndexName\\": \\"string\\", \\"IndexSizeBytes\\": number, \\"ItemCount\\": number, \\"KeySchema\\": [ { \\"AttributeName\\": \\"string\\", \\"KeyType\\": \\"string\\" } ], \\"Projection\\": { \\"NonKeyAttributes\\": [ \\"string\\" ], \\"ProjectionType\\": \\"string\\" } }\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_local_secondary_indexes = types.StringAttribute{ + .name = "aws.dynamodb.local_secondary_indexes", + .brief = "The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `ProjectionExpression` request parameter. +/// +/// # Examples +/// +/// - Title +/// - Title, Price, Color +/// - Title, Description, RelatedItems, ProductReviews +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_projection = types.StringAttribute{ + .name = "aws.dynamodb.projection", + .brief = "The value of the `ProjectionExpression` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. +/// +/// # Examples +/// +/// - 1.0 +/// - 2.0 +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_provisioned_read_capacity = types.DoubleAttribute{ + .name = "aws.dynamodb.provisioned_read_capacity", + .brief = "The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. +/// +/// # Examples +/// +/// - 1.0 +/// - 2.0 +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_provisioned_write_capacity = types.DoubleAttribute{ + .name = "aws.dynamodb.provisioned_write_capacity", + .brief = "The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `ScanIndexForward` request parameter. +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_scan_forward = types.BooleanAttribute{ + .name = "aws.dynamodb.scan_forward", + .brief = "The value of the `ScanIndexForward` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `ScannedCount` response parameter. +/// +/// # Examples +/// +/// - 50 +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_scanned_count = types.IntAttribute{ + .name = "aws.dynamodb.scanned_count", + .brief = "The value of the `ScannedCount` response parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `Segment` request parameter. +/// +/// # Examples +/// +/// - 10 +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_segment = types.IntAttribute{ + .name = "aws.dynamodb.segment", + .brief = "The value of the `Segment` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `Select` request parameter. +/// +/// # Examples +/// +/// - ALL_ATTRIBUTES +/// - COUNT +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_select = types.StringAttribute{ + .name = "aws.dynamodb.select", + .brief = "The value of the `Select` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The number of items in the `TableNames` response parameter. +/// +/// # Examples +/// +/// - 20 +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_table_count = types.IntAttribute{ + .name = "aws.dynamodb.table_count", + .brief = "The number of items in the `TableNames` response parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The keys in the `RequestItems` object field. +/// +/// # Examples +/// +/// - [\"Users\", \"Cats\"] +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_table_names = types.StringAttribute{ + .name = "aws.dynamodb.table_names", + .brief = "The keys in the `RequestItems` object field.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value of the `TotalSegments` request parameter. +/// +/// # Examples +/// +/// - 100 +/// Note: This attribute is experimental and may change in the future. +pub const aws_dynamodb_total_segments = types.IntAttribute{ + .name = "aws.dynamodb.total_segments", + .brief = "The value of the `TotalSegments` request parameter.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The AWS extended request ID as returned in the response header `x-amz-id-2`. +/// +/// # Examples +/// +/// - wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ= +/// Note: This attribute is experimental and may change in the future. +pub const aws_extended_request_id = types.StringAttribute{ + .name = "aws.extended_request_id", + .brief = "The AWS extended request ID as returned in the response header `x-amz-id-2`.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// 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). +/// +/// # Examples +/// +/// - arn:aws:lambda:us-east-1:123456:function:myfunction:myalias +/// Note: This attribute is experimental and may change in the future. +pub const aws_lambda_invoked_arn = types.StringAttribute{ + .name = "aws.lambda.invoked_arn", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environtment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping. +/// +/// # Examples +/// +/// - 587ad24b-03b9-4413-8202-bbd56b36e5b7 +/// Note: This attribute is experimental and may change in the future. +pub const aws_lambda_resource_mapping_id = types.StringAttribute{ + .name = "aws.lambda.resource_mapping.id", + .brief = "The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environtment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. +/// +/// # Examples +/// +/// - 79b9da39-b7ae-508a-a6bc-864b2829c622 +/// - C9ER4AJX75574TDJ +/// Note: This attribute is experimental and may change in the future. +pub const aws_request_id = types.StringAttribute{ + .name = "aws.request_id", + .brief = "The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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. +/// +/// # Examples +/// +/// - some-bucket-name +/// Note: This attribute is experimental and may change in the future. +pub const aws_s3_bucket = types.StringAttribute{ + .name = "aws.s3.bucket", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The source object (in the form `bucket`/`key`) for the copy operation. +/// +/// # Examples +/// +/// - someFile.yml +/// Note: This attribute is experimental and may change in the future. +pub const aws_s3_copy_source = types.StringAttribute{ + .name = "aws.s3.copy_source", + .brief = "The source object (in the form `bucket`/`key`) for the copy operation.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The delete request container that specifies the objects to be deleted. +/// +/// # Examples +/// +/// - Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean +/// Note: This attribute is experimental and may change in the future. +pub const aws_s3_delete = types.StringAttribute{ + .name = "aws.s3.delete", + .brief = "The delete request container that specifies the objects to be deleted.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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. +/// +/// # Examples +/// +/// - someFile.yml +/// Note: This attribute is experimental and may change in the future. +pub const aws_s3_key = types.StringAttribute{ + .name = "aws.s3.key", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000. +/// +/// # Examples +/// +/// - 3456 +/// Note: This attribute is experimental and may change in the future. +pub const aws_s3_part_number = types.IntAttribute{ + .name = "aws.s3.part_number", + .brief = "The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Upload ID that identifies the multipart upload. +/// +/// # Examples +/// +/// - dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ +/// Note: This attribute is experimental and may change in the future. +pub const aws_s3_upload_id = types.StringAttribute{ + .name = "aws.s3.upload_id", + .brief = "Upload ID that identifies the multipart upload.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Deprecated, use `azure.service.request.id` instead. +/// +/// # Examples +/// +/// - 00000000-0000-0000-0000-000000000000 +/// Note: This attribute is experimental and may change in the future. +/// Note: This attribute is deprecated. {"note": "Replaced by `azure.service.request.id`.", "reason": "renamed", "renamed_to": "azure.service.request.id"} +pub const az_service_request_id = types.StringAttribute{ + .name = "az.service_request_id", + .brief = "Deprecated, use `azure.service.request.id` instead.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The unique identifier of the client instance. +/// +/// # Examples +/// +/// - 3ba4827d-4422-483f-b59f-85b74211c11d +/// - storage-client-1 +/// Note: This attribute is experimental and may change in the future. +pub const azure_client_id = types.StringAttribute{ + .name = "azure.client.id", + .brief = "The unique identifier of the client instance.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Cosmos client connection mode. +/// Note: This attribute is experimental and may change in the future. +pub const azure_cosmosdb_connection_mode = types.StringAttribute{ + .name = "azure.cosmosdb.connection.mode", + .brief = "Cosmos client connection mode.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). +/// +/// # Examples +/// +/// - Eventual +/// - ConsistentPrefix +/// - BoundedStaleness +/// - Strong +/// - Session +/// Note: This attribute is experimental and may change in the future. +pub const azure_cosmosdb_consistency_level = types.StringAttribute{ + .name = "azure.cosmosdb.consistency.level", + .brief = "Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels).", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. +/// +/// # Examples +/// +/// - [\"North Central US\", \"Australia East\", \"Australia Southeast\"] +/// Note: This attribute is experimental and may change in the future. +pub const azure_cosmosdb_operation_contacted_regions = types.StringAttribute{ + .name = "azure.cosmosdb.operation.contacted_regions", + .brief = "List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The number of request units consumed by the operation. +/// +/// # Examples +/// +/// - 46.18 +/// - 1.0 +/// Note: This attribute is experimental and may change in the future. +pub const azure_cosmosdb_operation_request_charge = types.DoubleAttribute{ + .name = "azure.cosmosdb.operation.request_charge", + .brief = "The number of request units consumed by the operation.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Request payload size in bytes. +/// Note: This attribute is experimental and may change in the future. +pub const azure_cosmosdb_request_body_size = types.IntAttribute{ + .name = "azure.cosmosdb.request.body.size", + .brief = "Request payload size in bytes.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Cosmos DB sub status code. +/// +/// # Examples +/// +/// - 1000 +/// - 1002 +/// Note: This attribute is experimental and may change in the future. +pub const azure_cosmosdb_response_sub_status_code = types.IntAttribute{ + .name = "azure.cosmosdb.response.sub_status_code", + .brief = "Cosmos DB sub status code.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// [Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client. +/// +/// # Examples +/// +/// - Microsoft.DocumentDB +/// Note: This attribute is experimental and may change in the future. +pub const azure_resource_provider_namespace = types.StringAttribute{ + .name = "azure.resource_provider.namespace", + .brief = "[Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The unique identifier of the service request. It's generated by the Azure service and returned with the response. +/// +/// # Examples +/// +/// - 00000000-0000-0000-0000-000000000000 +/// Note: This attribute is experimental and may change in the future. +pub const azure_service_request_id = types.StringAttribute{ + .name = "azure.service.request.id", + .brief = "The unique identifier of the service request. It's generated by the Azure service and returned with the response.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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). +/// Note: This attribute is experimental and may change in the future. +pub const cassandra_consistency_level = types.StringAttribute{ + .name = "cassandra.consistency.level", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The data center of the coordinating node for a query. +/// +/// # Examples +/// +/// - us-west-2 +/// Note: This attribute is experimental and may change in the future. +pub const cassandra_coordinator_dc = types.StringAttribute{ + .name = "cassandra.coordinator.dc", + .brief = "The data center of the coordinating node for a query.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The ID of the coordinating node for a query. +/// +/// # Examples +/// +/// - be13faa2-8574-4d71-926d-27f16cf8a7af +/// Note: This attribute is experimental and may change in the future. +pub const cassandra_coordinator_id = types.StringAttribute{ + .name = "cassandra.coordinator.id", + .brief = "The ID of the coordinating node for a query.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The fetch size used for paging, i.e. how many rows will be returned at once. +/// +/// # Examples +/// +/// - 5000 +/// Note: This attribute is experimental and may change in the future. +pub const cassandra_page_size = types.IntAttribute{ + .name = "cassandra.page.size", + .brief = "The fetch size used for paging, i.e. how many rows will be returned at once.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Whether or not the query is idempotent. +/// Note: This attribute is experimental and may change in the future. +pub const cassandra_query_idempotent = types.BooleanAttribute{ + .name = "cassandra.query.idempotent", + .brief = "Whether or not the query is idempotent.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. +/// +/// # Examples +/// +/// - 0 +/// - 2 +/// Note: This attribute is experimental and may change in the future. +pub const cassandra_speculative_execution_count = types.IntAttribute{ + .name = "cassandra.speculative_execution.count", + .brief = "The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The kind of action a pipeline run is performing. +/// +/// # Examples +/// +/// - BUILD +/// - RUN +/// - SYNC +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_action_name = types.StringAttribute{ + .name = "cicd.pipeline.action.name", + .brief = "The kind of action a pipeline run is performing.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The result of a pipeline run. +/// +/// # Examples +/// +/// - success +/// - failure +/// - timeout +/// - skipped +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_result = types.StringAttribute{ + .name = "cicd.pipeline.result", + .brief = "The result of a pipeline run.", + .stability = .development, + .requirement_level = .required, +}; + +/// The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. +/// +/// # Examples +/// +/// - Run GoLang Linter +/// - Go Build +/// - go-test +/// - deploy_binary +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_task_name = types.StringAttribute{ + .name = "cicd.pipeline.task.name", + .brief = "The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures.", + .stability = .development, + .requirement_level = .required, +}; + +/// The unique identifier of a task run within a pipeline. +/// +/// # Examples +/// +/// - 12097 +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_task_run_id = types.StringAttribute{ + .name = "cicd.pipeline.task.run.id", + .brief = "The unique identifier of a task run within a pipeline.", + .stability = .development, + .requirement_level = .required, +}; + +/// The result of a task run. +/// +/// # Examples +/// +/// - success +/// - failure +/// - timeout +/// - skipped +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_task_run_result = types.StringAttribute{ + .name = "cicd.pipeline.task.run.result", + .brief = "The result of a task run.", + .stability = .development, + .requirement_level = .required, +}; + +/// The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. +/// +/// # Examples +/// +/// - https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075 +/// Note: This attribute is experimental and may change in the future. +pub const cicd_pipeline_task_run_url_full = types.StringAttribute{ + .name = "cicd.pipeline.task.run.url.full", + .brief = "The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run.", + .stability = .development, + .requirement_level = .required, +}; + +/// Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. +/// +/// # Examples +/// +/// - 83.164.160.102 +pub const client_address = types.StringAttribute{ + .name = "client.address", + .brief = "Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// The port of whichever client was captured in `client.address`. +/// +/// # Examples +/// +/// - 65123 +pub const client_port = types.IntAttribute{ + .name = "client.port", + .brief = "The port of whichever client was captured in `client.address`.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The AWS Region where the requested service is being accessed. +/// +/// # Examples +/// +/// - us-east-1 +/// - us-west-2 +/// Note: This attribute is experimental and may change in the future. +pub const cloud_region = types.StringAttribute{ + .name = "cloud.region", + .brief = "The AWS Region where the requested service is being accessed.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The [Fully Qualified Azure Resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) the log is emitted for. +/// +/// # 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/ +/// Note: This attribute is experimental and may change in the future. +pub const cloud_resource_id = types.StringAttribute{ + .name = "cloud.resource_id", + .brief = "The [Fully Qualified Azure Resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) the log is emitted for.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Cosmos DB container name. +/// +/// # Examples +/// +/// - public.users +/// - customers +pub const db_collection_name = types.StringAttribute{ + .name = "db.collection.name", + .brief = "Cosmos DB container name.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The name of the database, fully qualified within the server address and port. +/// +/// # Examples +/// +/// - customers +/// - test.users +pub const db_namespace = types.StringAttribute{ + .name = "db.namespace", + .brief = "The name of the database, fully qualified within the server address and port.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The number of queries included in a batch operation. +/// +/// # Examples +/// +/// - 2 +/// - 3 +/// - 4 +pub const db_operation_batch_size = types.IntAttribute{ + .name = "db.operation.batch.size", + .brief = "The number of queries included in a batch operation.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// The name of the operation or command being executed. +/// +/// # Examples +/// +/// - create_item +/// - query_items +/// - read_item +pub const db_operation_name = types.StringAttribute{ + .name = "db.operation.name", + .brief = "The name of the operation or command being executed.", + .stability = .stable, + .requirement_level = .required, +}; + +/// A dynamic value in the url path. +/// +/// # Examples +/// +/// - db.operation.parameter.index=\"test-index\" +/// - db.operation.parameter=\"123\" +/// Note: This attribute is experimental and may change in the future. +pub const db_operation_parameter = types.StringAttribute{ + .name = "db.operation.parameter", + .brief = "A dynamic value in the url path.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// A database query parameter, with `` being the parameter name, and the attribute value being a string representation of the parameter value. +/// +/// # Examples +/// +/// - someval +/// - 55 +/// Note: This attribute is experimental and may change in the future. +pub const db_query_parameter = types.StringAttribute{ + .name = "db.query.parameter", + .brief = "A database query parameter, with `` being the parameter name, and the attribute value being a string representation of the parameter value.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Low cardinality summary of a database query. +/// +/// # Examples +/// +/// - SELECT wuser_table +/// - INSERT shipping_details SELECT orders +/// - get user by id +pub const db_query_summary = types.StringAttribute{ + .name = "db.query.summary", + .brief = "Low cardinality summary of a database query.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The database query being executed. +/// +/// # Examples +/// +/// - SELECT * FROM wuser_table where username = ? +/// - SET mykey ? +pub const db_query_text = types.StringAttribute{ + .name = "db.query.text", + .brief = "The database query being executed.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// Cosmos DB row count in result set. +/// +/// # Examples +/// +/// - 10 +/// - 20 +/// Note: This attribute is experimental and may change in the future. +pub const db_response_returned_rows = types.IntAttribute{ + .name = "db.response.returned_rows", + .brief = "Cosmos DB row count in result set.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Cosmos DB status code. +/// +/// # Examples +/// +/// - 200 +/// - 201 +pub const db_response_status_code = types.StringAttribute{ + .name = "db.response.status_code", + .brief = "Cosmos DB status code.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The name of a stored procedure within the database. +/// +/// # Examples +/// +/// - GetCustomer +pub const db_stored_procedure_name = types.StringAttribute{ + .name = "db.stored_procedure.name", + .brief = "The name of a stored procedure within the database.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The database management system (DBMS) product as identified by the client instrumentation. +pub const db_system_name = types.StringAttribute{ + .name = "db.system.name", + .brief = "The database management system (DBMS) product as identified by the client instrumentation.", + .stability = .stable, + .requirement_level = .required, +}; + +/// List of resolved IP addresses (for DNS lookup) or a single element containing domain name (for reverse lookup). +/// +/// # Examples +/// +/// - [\"10.0.0.1\", \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"] +/// Note: This attribute is experimental and may change in the future. +pub const dns_answers = types.StringAttribute{ + .name = "dns.answers", + .brief = "List of resolved IP addresses (for DNS lookup) or a single element containing domain name (for reverse lookup).", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The domain name or an IP address being queried. +/// +/// # Examples +/// +/// - www.example.com +/// - opentelemetry.io +/// Note: This attribute is experimental and may change in the future. +pub const dns_question_name = types.StringAttribute{ + .name = "dns.question.name", + .brief = "The domain name or an IP address being queried.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Represents the human-readable identifier of the node/instance to which a request was routed. +/// +/// # Examples +/// +/// - instance-0000000001 +/// Note: This attribute is experimental and may change in the future. +pub const elasticsearch_node_name = types.StringAttribute{ + .name = "elasticsearch.node.name", + .brief = "Represents the human-readable identifier of the node/instance to which a request was routed.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// A message providing more detail about an error in human-readable form. +/// +/// # Examples +/// +/// - Unexpected input type: string +/// - The user has exceeded their storage quota +/// Note: This attribute is experimental and may change in the future. +pub const error_message = types.StringAttribute{ + .name = "error.message", + .brief = "A message providing more detail about an error in human-readable form.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Describes a class of error the operation ended with. +/// +/// # Examples +/// +/// - timeout +/// - java.net.UnknownHostException +/// - server_certificate_invalid +/// - 500 +pub const error_type = types.StringAttribute{ + .name = "error.type", + .brief = "Describes a class of error the operation ended with.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// Indicates that the exception is escaping the scope of the span. +/// Note: This attribute is deprecated. {"note": "It's no longer recommended to record exceptions that are handled and do not escape the scope of a span.\n", "reason": "obsoleted"} +pub const exception_escaped = types.BooleanAttribute{ + .name = "exception.escaped", + .brief = "Indicates that the exception is escaping the scope of the span.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// The exception message. +/// +/// # Examples +/// +/// - Division by zero +/// - Can't convert 'int' object to str implicitly +pub const exception_message = types.StringAttribute{ + .name = "exception.message", + .brief = "The exception message.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// 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. +/// +/// # 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)\n +pub const exception_stacktrace = types.StringAttribute{ + .name = "exception.stacktrace", + .brief = "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.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// 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. +/// +/// # Examples +/// +/// - java.net.ConnectException +/// - OSError +pub const exception_type = types.StringAttribute{ + .name = "exception.type", + .brief = "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.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// A boolean that is true if the serverless function is executed for the first time (aka cold-start). +/// Note: This attribute is experimental and may change in the future. +pub const faas_coldstart = types.BooleanAttribute{ + .name = "faas.coldstart", + .brief = "A boolean that is true if the serverless function is executed for the first time (aka cold-start).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). +/// +/// # Examples +/// +/// - 0/5 * * * ? * +/// Note: This attribute is experimental and may change in the future. +pub const faas_cron = types.StringAttribute{ + .name = "faas.cron", + .brief = "A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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. +/// +/// # Examples +/// +/// - myBucketName +/// - myDbName +/// Note: This attribute is experimental and may change in the future. +pub const faas_document_collection = types.StringAttribute{ + .name = "faas.document.collection", + .brief = "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.", + .stability = .development, + .requirement_level = .required, +}; + +/// 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. +/// +/// # Examples +/// +/// - myFile.txt +/// - myTableName +/// Note: This attribute is experimental and may change in the future. +pub const faas_document_name = types.StringAttribute{ + .name = "faas.document.name", + .brief = "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.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Describes the type of the operation that was performed on the data. +/// Note: This attribute is experimental and may change in the future. +pub const faas_document_operation = types.StringAttribute{ + .name = "faas.document.operation", + .brief = "Describes the type of the operation that was performed on the data.", + .stability = .development, + .requirement_level = .required, +}; + +/// 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). +/// +/// # Examples +/// +/// - 2020-01-23T13:47:06Z +/// Note: This attribute is experimental and may change in the future. +pub const faas_document_time = types.StringAttribute{ + .name = "faas.document.time", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the invoked function. +/// +/// # Examples +/// +/// - my-function +/// Note: This attribute is experimental and may change in the future. +pub const faas_invoked_name = types.StringAttribute{ + .name = "faas.invoked_name", + .brief = "The name of the invoked function.", + .stability = .development, + .requirement_level = .required, +}; + +/// The cloud provider of the invoked function. +/// Note: This attribute is experimental and may change in the future. +pub const faas_invoked_provider = types.StringAttribute{ + .name = "faas.invoked_provider", + .brief = "The cloud provider of the invoked function.", + .stability = .development, + .requirement_level = .required, +}; + +/// The cloud region of the invoked function. +/// +/// # Examples +/// +/// - eu-central-1 +/// Note: This attribute is experimental and may change in the future. +pub const faas_invoked_region = types.StringAttribute{ + .name = "faas.invoked_region", + .brief = "The cloud region of the invoked function.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// 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). +/// +/// # Examples +/// +/// - 2020-01-23T13:47:06Z +/// Note: This attribute is experimental and may change in the future. +pub const faas_time = types.StringAttribute{ + .name = "faas.time", + .brief = "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).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Type of the trigger which caused this function invocation. +/// Note: This attribute is experimental and may change in the future. +pub const faas_trigger = types.StringAttribute{ + .name = "faas.trigger", + .brief = "Type of the trigger which caused this function invocation.", + .stability = .development, + .requirement_level = .required, +}; + +/// The unique identifier for the flag evaluation context. For example, the targeting key. +/// +/// # Examples +/// +/// - 5157782b-2203-4c80-a857-dbbd5e7761db +/// Note: This attribute is experimental and may change in the future. +pub const feature_flag_context_id = types.StringAttribute{ + .name = "feature_flag.context.id", + .brief = "The unique identifier for the flag evaluation context. For example, the targeting key.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The lookup key of the feature flag. +/// +/// # Examples +/// +/// - logo-color +/// Note: This attribute is experimental and may change in the future. +pub const feature_flag_key = types.StringAttribute{ + .name = "feature_flag.key", + .brief = "The lookup key of the feature flag.", + .stability = .development, + .requirement_level = .required, +}; + +/// Identifies the feature flag provider. +/// +/// # Examples +/// +/// - Flag Manager +/// Note: This attribute is experimental and may change in the future. +pub const feature_flag_provider_name = types.StringAttribute{ + .name = "feature_flag.provider.name", + .brief = "Identifies the feature flag provider.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The reason code which shows how a feature flag value was determined. +/// +/// # Examples +/// +/// - static +/// - targeting_match +/// - error +/// - default +/// Note: This attribute is experimental and may change in the future. +pub const feature_flag_result_reason = types.StringAttribute{ + .name = "feature_flag.result.reason", + .brief = "The reason code which shows how a feature flag value was determined.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The evaluated value of the feature flag. +/// +/// # Examples +/// +/// - #ff0000 +/// - true +/// - 3 +/// Note: This attribute is experimental and may change in the future. +pub const feature_flag_result_value = types.StringAttribute{ + .name = "feature_flag.result.value", + .brief = "The evaluated value of the feature flag.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// A semantic identifier for an evaluated flag value. +/// +/// # Examples +/// +/// - red +/// - true +/// - on +/// Note: This attribute is experimental and may change in the future. +pub const feature_flag_result_variant = types.StringAttribute{ + .name = "feature_flag.result.variant", + .brief = "A semantic identifier for an evaluated flag value.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs. +/// +/// # Examples +/// +/// - proj-1 +/// - ab98sgs +/// - service1/dev +/// Note: This attribute is experimental and may change in the future. +pub const feature_flag_set_id = types.StringAttribute{ + .name = "feature_flag.set.id", + .brief = "The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset. +/// +/// # Examples +/// +/// - 1 +/// - 01ABCDEF +/// Note: This attribute is experimental and may change in the future. +pub const feature_flag_version = types.StringAttribute{ + .name = "feature_flag.version", + .brief = "The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Free-form description of the GenAI agent provided by the application. +/// +/// # Examples +/// +/// - Helps with math problems +/// - Generates fiction stories +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_agent_description = types.StringAttribute{ + .name = "gen_ai.agent.description", + .brief = "Free-form description of the GenAI agent provided by the application.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The unique identifier of the GenAI agent. +/// +/// # Examples +/// +/// - asst_5j66UpCpwteGg4YSxUnt7lPY +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_agent_id = types.StringAttribute{ + .name = "gen_ai.agent.id", + .brief = "The unique identifier of the GenAI agent.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Human-readable name of the GenAI agent provided by the application. +/// +/// # Examples +/// +/// - Math Tutor +/// - Fiction Writer +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_agent_name = types.StringAttribute{ + .name = "gen_ai.agent.name", + .brief = "Human-readable name of the GenAI agent provided by the application.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation. +/// +/// # Examples +/// +/// - conv_5j66UpCpwteGg4YSxUnt7lPY +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_conversation_id = types.StringAttribute{ + .name = "gen_ai.conversation.id", + .brief = "The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The data source identifier. +/// +/// # Examples +/// +/// - H7STPQYOND +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_data_source_id = types.StringAttribute{ + .name = "gen_ai.data_source.id", + .brief = "The data source identifier.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The service tier requested. May be a specific tier, default, or auto. +/// +/// # Examples +/// +/// - auto +/// - default +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_openai_request_service_tier = types.StringAttribute{ + .name = "gen_ai.openai.request.service_tier", + .brief = "The service tier requested. May be a specific tier, default, or auto.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The service tier used for the response. +/// +/// # Examples +/// +/// - scale +/// - default +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_openai_response_service_tier = types.StringAttribute{ + .name = "gen_ai.openai.response.service_tier", + .brief = "The service tier used for the response.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// A fingerprint to track any eventual change in the Generative AI environment. +/// +/// # Examples +/// +/// - fp_44709d6fcb +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_openai_response_system_fingerprint = types.StringAttribute{ + .name = "gen_ai.openai.response.system_fingerprint", + .brief = "A fingerprint to track any eventual change in the Generative AI environment.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the operation being performed. +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_operation_name = types.StringAttribute{ + .name = "gen_ai.operation.name", + .brief = "The name of the operation being performed.", + .stability = .development, + .requirement_level = .required, +}; + +/// Represents the content type requested by the client. +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_output_type = types.StringAttribute{ + .name = "gen_ai.output.type", + .brief = "Represents the content type requested by the client.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The target number of candidate completions to return. +/// +/// # Examples +/// +/// - 3 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_choice_count = types.IntAttribute{ + .name = "gen_ai.request.choice.count", + .brief = "The target number of candidate completions to return.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The encoding formats requested in an embeddings operation, if specified. +/// +/// # Examples +/// +/// - [\"base64\"] +/// - [\"float\", \"binary\"] +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_encoding_formats = types.StringAttribute{ + .name = "gen_ai.request.encoding_formats", + .brief = "The encoding formats requested in an embeddings operation, if specified.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The frequency penalty setting for the GenAI request. +/// +/// # Examples +/// +/// - 0.1 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_frequency_penalty = types.DoubleAttribute{ + .name = "gen_ai.request.frequency_penalty", + .brief = "The frequency penalty setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The maximum number of tokens the model generates for a request. +/// +/// # Examples +/// +/// - 100 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_max_tokens = types.IntAttribute{ + .name = "gen_ai.request.max_tokens", + .brief = "The maximum number of tokens the model generates for a request.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the GenAI model a request is being made to. +/// +/// # Examples +/// +/// - gpt-4 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_model = types.StringAttribute{ + .name = "gen_ai.request.model", + .brief = "The name of the GenAI model a request is being made to.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The presence penalty setting for the GenAI request. +/// +/// # Examples +/// +/// - 0.1 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_presence_penalty = types.DoubleAttribute{ + .name = "gen_ai.request.presence_penalty", + .brief = "The presence penalty setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Requests with same seed value more likely to return same result. +/// +/// # Examples +/// +/// - 100 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_seed = types.IntAttribute{ + .name = "gen_ai.request.seed", + .brief = "Requests with same seed value more likely to return same result.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// List of sequences that the model will use to stop generating further tokens. +/// +/// # Examples +/// +/// - [\"forest\", \"lived\"] +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_stop_sequences = types.StringAttribute{ + .name = "gen_ai.request.stop_sequences", + .brief = "List of sequences that the model will use to stop generating further tokens.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The temperature setting for the GenAI request. +/// +/// # Examples +/// +/// - 0.0 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_temperature = types.DoubleAttribute{ + .name = "gen_ai.request.temperature", + .brief = "The temperature setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The top_k sampling setting for the GenAI request. +/// +/// # Examples +/// +/// - 1.0 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_top_k = types.DoubleAttribute{ + .name = "gen_ai.request.top_k", + .brief = "The top_k sampling setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The top_p sampling setting for the GenAI request. +/// +/// # Examples +/// +/// - 1.0 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_request_top_p = types.DoubleAttribute{ + .name = "gen_ai.request.top_p", + .brief = "The top_p sampling setting for the GenAI request.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Array of reasons the model stopped generating tokens, corresponding to each generation received. +/// +/// # Examples +/// +/// - [\"stop\"] +/// - [\"stop\", \"length\"] +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_response_finish_reasons = types.StringAttribute{ + .name = "gen_ai.response.finish_reasons", + .brief = "Array of reasons the model stopped generating tokens, corresponding to each generation received.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The unique identifier for the completion. +/// +/// # Examples +/// +/// - chatcmpl-123 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_response_id = types.StringAttribute{ + .name = "gen_ai.response.id", + .brief = "The unique identifier for the completion.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the model that generated the response. +/// +/// # Examples +/// +/// - gpt-4-0613 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_response_model = types.StringAttribute{ + .name = "gen_ai.response.model", + .brief = "The name of the model that generated the response.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The Generative AI product as identified by the client or server instrumentation. +/// +/// # Examples +/// +/// - openai +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_system = types.StringAttribute{ + .name = "gen_ai.system", + .brief = "The Generative AI product as identified by the client or server instrumentation.", + .stability = .development, + .requirement_level = .required, +}; + +/// The tool call identifier. +/// +/// # Examples +/// +/// - call_mszuSIzqtI65i1wAUOE8w5H4 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_tool_call_id = types.StringAttribute{ + .name = "gen_ai.tool.call.id", + .brief = "The tool call identifier.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// The tool description. +/// +/// # Examples +/// +/// - Multiply two numbers +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_tool_description = types.StringAttribute{ + .name = "gen_ai.tool.description", + .brief = "The tool description.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Name of the tool utilized by the agent. +/// +/// # Examples +/// +/// - Flights +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_tool_name = types.StringAttribute{ + .name = "gen_ai.tool.name", + .brief = "Name of the tool utilized by the agent.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The number of tokens used in the GenAI input (prompt). +/// +/// # Examples +/// +/// - 100 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_usage_input_tokens = types.IntAttribute{ + .name = "gen_ai.usage.input_tokens", + .brief = "The number of tokens used in the GenAI input (prompt).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The number of tokens used in the GenAI response (completion). +/// +/// # Examples +/// +/// - 180 +/// Note: This attribute is experimental and may change in the future. +pub const gen_ai_usage_output_tokens = types.IntAttribute{ + .name = "gen_ai.usage.output_tokens", + .brief = "The number of tokens used in the GenAI response (completion).", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The GraphQL document being executed. +/// +/// # Examples +/// +/// - query findBookById { bookById(id: ?) { name } } +/// Note: This attribute is experimental and may change in the future. +pub const graphql_document = types.StringAttribute{ + .name = "graphql.document", + .brief = "The GraphQL document being executed.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the operation being executed. +/// +/// # Examples +/// +/// - findBookById +/// Note: This attribute is experimental and may change in the future. +pub const graphql_operation_name = types.StringAttribute{ + .name = "graphql.operation.name", + .brief = "The name of the operation being executed.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The type of the operation being executed. +/// +/// # Examples +/// +/// - query +/// - mutation +/// - subscription +/// Note: This attribute is experimental and may change in the future. +pub const graphql_operation_type = types.StringAttribute{ + .name = "graphql.operation.type", + .brief = "The type of the operation being executed.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// 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. +/// +/// # Examples +/// +/// - 3495 +/// Note: This attribute is experimental and may change in the future. +pub const http_request_body_size = types.IntAttribute{ + .name = "http.request.body.size", + .brief = "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.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. +/// +/// # Examples +/// +/// - [\"application/json\"] +/// - [\"1.2.3.4\", \"1.2.3.5\"] +pub const http_request_header = types.StringAttribute{ + .name = "http.request.header", + .brief = "HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// HTTP request method. +/// +/// # Examples +/// +/// - GET +/// - POST +/// - HEAD +pub const http_request_method = types.StringAttribute{ + .name = "http.request.method", + .brief = "HTTP request method.", + .stability = .stable, + .requirement_level = .required, +}; + +/// Original HTTP method sent by the client in the request line. +/// +/// # Examples +/// +/// - GeT +/// - ACL +/// - foo +pub const http_request_method_original = types.StringAttribute{ + .name = "http.request.method_original", + .brief = "Original HTTP method sent by the client in the request line.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The ordinal number of request resending attempt (for any reason, including redirects). +/// +/// # Examples +/// +/// - 3 +pub const http_request_resend_count = types.IntAttribute{ + .name = "http.request.resend_count", + .brief = "The ordinal number of request resending attempt (for any reason, including redirects).", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// 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. +/// +/// # Examples +/// +/// - 1437 +/// Note: This attribute is experimental and may change in the future. +pub const http_request_size = types.IntAttribute{ + .name = "http.request.size", + .brief = "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.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// 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. +/// +/// # Examples +/// +/// - 3495 +/// Note: This attribute is experimental and may change in the future. +pub const http_response_body_size = types.IntAttribute{ + .name = "http.response.body.size", + .brief = "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.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. +/// +/// # Examples +/// +/// - [\"application/json\"] +/// - [\"abc\", \"def\"] +pub const http_response_header = types.StringAttribute{ + .name = "http.response.header", + .brief = "HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// 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. +/// +/// # Examples +/// +/// - 1437 +/// Note: This attribute is experimental and may change in the future. +pub const http_response_size = types.IntAttribute{ + .name = "http.response.size", + .brief = "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.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). +/// +/// # Examples +/// +/// - 200 +pub const http_response_status_code = types.IntAttribute{ + .name = "http.response.status_code", + .brief = "[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The matched route, that is, the path template in the format used by the respective server framework. +/// +/// # Examples +/// +/// - /users/:userID? +/// - {controller}/{action}/{id?} +pub const http_route = types.StringAttribute{ + .name = "http.route", + .brief = "The matched route, that is, the path template in the format used by the respective server framework.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// This attribute represents the state of the application. +/// Note: This attribute is experimental and may change in the future. +pub const ios_app_state = types.StringAttribute{ + .name = "ios.app.state", + .brief = "This attribute represents the state of the application.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Local socket address. Useful in case of a multi-IP host. +/// +/// # Examples +/// +/// - 10.1.2.80 +/// - /tmp/my.sock +pub const network_local_address = types.StringAttribute{ + .name = "network.local.address", + .brief = "Local socket address. Useful in case of a multi-IP host.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// Local socket port. Useful in case of a multi-port host. +/// +/// # Examples +/// +/// - 65123 +pub const network_local_port = types.IntAttribute{ + .name = "network.local.port", + .brief = "Local socket port. Useful in case of a multi-port host.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// Peer address of the database node where the operation was performed. +/// +/// # Examples +/// +/// - 10.1.2.80 +/// - /tmp/my.sock +pub const network_peer_address = types.StringAttribute{ + .name = "network.peer.address", + .brief = "Peer address of the database node where the operation was performed.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// Peer port number of the network connection. +/// +/// # Examples +/// +/// - 65123 +pub const network_peer_port = types.IntAttribute{ + .name = "network.peer.port", + .brief = "Peer port number of the network connection.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. +/// +/// # Examples +/// +/// - http +/// - spdy +pub const network_protocol_name = types.StringAttribute{ + .name = "network.protocol.name", + .brief = "[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The actual version of the protocol used for network communication. +/// +/// # Examples +/// +/// - 1.0 +/// - 1.1 +/// - 2 +/// - 3 +pub const network_protocol_version = types.StringAttribute{ + .name = "network.protocol.version", + .brief = "The actual version of the protocol used for network communication.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). +/// +/// # Examples +/// +/// - tcp +/// - udp +/// - unix +pub const network_transport = types.StringAttribute{ + .name = "network.transport", + .brief = "[OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. +/// +/// # Examples +/// +/// - ipv4 +/// - ipv6 +pub const network_type = types.StringAttribute{ + .name = "network.type", + .brief = "[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// 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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. +/// +/// # Examples +/// +/// - [\"cmd/otecol\", \"--config=config.yaml\"] +/// Note: This attribute is experimental and may change in the future. +pub const process_command_args = types.StringAttribute{ + .name = "process.command_args", + .brief = "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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. +/// +/// # Examples +/// +/// - otelcol +/// Note: This attribute is experimental and may change in the future. +pub const process_executable_name = types.StringAttribute{ + .name = "process.executable.name", + .brief = "The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`.", + .stability = .development, + .requirement_level = .required, +}; + +/// 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`. +/// +/// # Examples +/// +/// - /usr/bin/cmd/otelcol +/// Note: This attribute is experimental and may change in the future. +pub const process_executable_path = types.StringAttribute{ + .name = "process.executable.path", + .brief = "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`.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The exit code of the process. +/// +/// # Examples +/// +/// - 127 +/// Note: This attribute is experimental and may change in the future. +pub const process_exit_code = types.IntAttribute{ + .name = "process.exit.code", + .brief = "The exit code of the process.", + .stability = .development, + .requirement_level = .required, +}; + +/// Process identifier (PID). +/// +/// # Examples +/// +/// - 1234 +/// Note: This attribute is experimental and may change in the future. +pub const process_pid = types.IntAttribute{ + .name = "process.pid", + .brief = "Process identifier (PID).", + .stability = .development, + .requirement_level = .required, +}; + +/// Compressed size of the message in bytes. +/// Note: This attribute is experimental and may change in the future. +pub const rpc_message_compressed_size = types.IntAttribute{ + .name = "rpc.message.compressed_size", + .brief = "Compressed size of the message in bytes.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. +/// Note: This attribute is experimental and may change in the future. +pub const rpc_message_id = types.IntAttribute{ + .name = "rpc.message.id", + .brief = "MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Whether this is a received or sent message. +/// Note: This attribute is experimental and may change in the future. +pub const rpc_message_type = types.StringAttribute{ + .name = "rpc.message.type", + .brief = "Whether this is a received or sent message.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// Uncompressed size of the message in bytes. +/// Note: This attribute is experimental and may change in the future. +pub const rpc_message_uncompressed_size = types.IntAttribute{ + .name = "rpc.message.uncompressed_size", + .brief = "Uncompressed size of the message in bytes.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the operation corresponding to the request, as returned by the AWS SDK +/// +/// # Examples +/// +/// - GetItem +/// - PutItem +/// Note: This attribute is experimental and may change in the future. +pub const rpc_method = types.StringAttribute{ + .name = "rpc.method", + .brief = "The name of the operation corresponding to the request, as returned by the AWS SDK", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The name of the service to which a request is made, as returned by the AWS SDK. +/// +/// # Examples +/// +/// - DynamoDB +/// - S3 +/// Note: This attribute is experimental and may change in the future. +pub const rpc_service = types.StringAttribute{ + .name = "rpc.service", + .brief = "The name of the service to which a request is made, as returned by the AWS SDK.", + .stability = .development, + .requirement_level = .recommended, +}; + +/// The value `aws-api`. +/// +/// # Examples +/// +/// - aws-api +/// Note: This attribute is experimental and may change in the future. +pub const rpc_system = types.StringAttribute{ + .name = "rpc.system", + .brief = "The value `aws-api`.", + .stability = .development, + .requirement_level = .required, +}; + +/// GenAI server address. +/// +/// # Examples +/// +/// - example.com +/// - 10.1.2.80 +/// - /tmp/my.sock +pub const server_address = types.StringAttribute{ + .name = "server.address", + .brief = "GenAI server address.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// GenAI server port. +/// +/// # Examples +/// +/// - 80 +/// - 8080 +/// - 443 +pub const server_port = types.IntAttribute{ + .name = "server.port", + .brief = "GenAI server port.", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The ID of the new session being started. +/// +/// # Examples +/// +/// - 00112233-4455-6677-8899-aabbccddeeff +/// Note: This attribute is experimental and may change in the future. +pub const session_id = types.StringAttribute{ + .name = "session.id", + .brief = "The ID of the new session being started.", + .stability = .development, + .requirement_level = .required, +}; + +/// The previous `session.id` for this user, when known. +/// +/// # Examples +/// +/// - 00112233-4455-6677-8899-aabbccddeeff +/// Note: This attribute is experimental and may change in the future. +pub const session_previous_id = types.StringAttribute{ + .name = "session.previous_id", + .brief = "The previous `session.id` for this user, when known.", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) +/// Note: This attribute is experimental and may change in the future. +pub const tls_protocol_name = types.StringAttribute{ + .name = "tls.protocol.name", + .brief = "Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values)", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) +/// +/// # Examples +/// +/// - 1.2 +/// - 3 +/// Note: This attribute is experimental and may change in the future. +pub const tls_protocol_version = types.StringAttribute{ + .name = "tls.protocol.version", + .brief = "Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values)", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) +/// +/// # Examples +/// +/// - https://localhost:9200/index/_search?q=user.id:kimchy +pub const url_full = types.StringAttribute{ + .name = "url.full", + .brief = "Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)", + .stability = .stable, + .requirement_level = .required, +}; + +/// The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component +/// +/// # Examples +/// +/// - /search +pub const url_path = types.StringAttribute{ + .name = "url.path", + .brief = "The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component", + .stability = .stable, + .requirement_level = .required, +}; + +/// The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component +/// +/// # Examples +/// +/// - q=OpenTelemetry +pub const url_query = types.StringAttribute{ + .name = "url.query", + .brief = "The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component", + .stability = .stable, + .requirement_level = .opt_in, +}; + +/// The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. +/// +/// # Examples +/// +/// - https +/// - ftp +/// - telnet +pub const url_scheme = types.StringAttribute{ + .name = "url.scheme", + .brief = "The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). +/// +/// # Examples +/// +/// - /users/{id} +/// - /users/:id +/// - /users?id={id} +/// Note: This attribute is experimental and may change in the future. +pub const url_template = types.StringAttribute{ + .name = "url.template", + .brief = "The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).", + .stability = .development, + .requirement_level = .opt_in, +}; + +/// Full user-agent string is generated by Cosmos DB SDK +/// +/// # Examples +/// +/// - cosmos-netstandard-sdk/3.23.0\|3.23.1\|1\|X64\|Linux 5.4.0-1098-azure 104 18\|.NET Core 3.1.32\|S\| +pub const user_agent_original = types.StringAttribute{ + .name = "user_agent.original", + .brief = "Full user-agent string is generated by Cosmos DB SDK", + .stability = .stable, + .requirement_level = .recommended, +}; + +/// Specifies the category of synthetic traffic, such as tests or bots. +/// Note: This attribute is experimental and may change in the future. +pub const user_agent_synthetic_type = types.StringAttribute{ + .name = "user_agent.synthetic.type", + .brief = "Specifies the category of synthetic traffic, such as tests or bots.", + .stability = .development, + .requirement_level = .opt_in, +}; + +test "semantic trace attributes" { + @import("std").testing.refAllDecls(@This()); +} diff --git a/src/types.zig b/src/types.zig index 1178295..c338143 100644 --- a/src/types.zig +++ b/src/types.zig @@ -302,6 +302,101 @@ pub const EntityGroup = struct { note: ?[]const u8 = null, }; +/// Metric instrument type +pub const InstrumentType = enum { + /// Counter - monotonic, increasing values + counter, + /// Up/Down Counter - can increase and decrease + updowncounter, + /// Histogram - distribution of values + histogram, + /// Gauge - current value at a point in time + gauge, + + pub fn toString(self: InstrumentType) []const u8 { + return switch (self) { + .counter => "counter", + .updowncounter => "updowncounter", + .histogram => "histogram", + .gauge => "gauge", + }; + } +}; + +/// Metric value type +pub const MetricValueType = enum { + /// Double precision floating point + double, + /// 64-bit integer + int, + + pub fn toString(self: MetricValueType) []const u8 { + return switch (self) { + .double => "double", + .int => "int", + }; + } +}; + +/// A semantic convention metric definition +pub const Metric = struct { + /// The metric name + name: []const u8, + /// Human-readable description + brief: []const u8, + /// Additional notes or documentation + note: ?[]const u8 = null, + /// Stability level + stability: StabilityLevel, + /// Instrument type + instrument: InstrumentType, + /// Unit of measurement + unit: []const u8, + /// Value type + value_type: MetricValueType, + /// Example values + examples: ?[]const []const u8 = null, + /// Deprecated reason if applicable + deprecated_reason: ?[]const u8 = null, + + pub fn init( + name: []const u8, + brief: []const u8, + stability: StabilityLevel, + instrument: InstrumentType, + unit: []const u8, + value_type: MetricValueType, + ) Metric { + return Metric{ + .name = name, + .brief = brief, + .stability = stability, + .instrument = instrument, + .unit = unit, + .value_type = value_type, + }; + } + + pub fn withNote(self: Metric, note: []const u8) Metric { + var result = self; + result.note = note; + return result; + } + + pub fn withExamples(self: Metric, examples: []const []const u8) Metric { + var result = self; + result.examples = examples; + return result; + } + + pub fn withDeprecation(self: Metric, reason: []const u8) Metric { + var result = self; + result.deprecated_reason = reason; + result.stability = .deprecated; + return result; + } +}; + /// Test helper to verify attribute definitions pub fn expectValidAttribute(comptime attr: anytype) void { // Compile-time validation @@ -313,6 +408,20 @@ pub fn expectValidAttribute(comptime attr: anytype) void { } } +/// Test helper to verify metric definitions +pub fn expectValidMetric(comptime metric: Metric) void { + // Compile-time validation + if (metric.name.len == 0) { + @compileError("Metric name cannot be empty"); + } + if (metric.brief.len == 0) { + @compileError("Metric brief cannot be empty"); + } + if (metric.unit.len == 0) { + @compileError("Metric unit cannot be empty"); + } +} + // Tests test "StringAttribute creation" { const attr = StringAttribute.init( @@ -409,4 +518,33 @@ test "ArrayAttribute union" { try std.testing.expectEqual(RequirementLevel.required, array_attr_double.getRequirementLevel()); } -// AttributeInfo is no longer needed - all information is contained in Attribute(ValueType) structs +test "Metric creation" { + const metric = Metric.init( + "test.metric", + "A test metric", + .stable, + .counter, + "{count}", + .double, + ); + + try std.testing.expectEqualStrings("test.metric", metric.name); + try std.testing.expectEqualStrings("A test metric", metric.brief); + try std.testing.expectEqual(StabilityLevel.stable, metric.stability); + try std.testing.expectEqual(InstrumentType.counter, metric.instrument); + try std.testing.expectEqualStrings("{count}", metric.unit); + try std.testing.expectEqual(MetricValueType.double, metric.value_type); + try std.testing.expectEqual(@as(?[]const u8, null), metric.note); +} + +test "InstrumentType string conversion" { + try std.testing.expectEqualStrings("counter", InstrumentType.counter.toString()); + try std.testing.expectEqualStrings("updowncounter", InstrumentType.updowncounter.toString()); + try std.testing.expectEqualStrings("histogram", InstrumentType.histogram.toString()); + try std.testing.expectEqualStrings("gauge", InstrumentType.gauge.toString()); +} + +test "MetricValueType string conversion" { + try std.testing.expectEqualStrings("double", MetricValueType.double.toString()); + try std.testing.expectEqualStrings("int", MetricValueType.int.toString()); +} diff --git a/src/url/registry.zig b/src/url/registry.zig deleted file mode 100644 index d7fbfb9..0000000 --- a/src/url/registry.zig +++ /dev/null @@ -1,308 +0,0 @@ -//! URL semantic conventions -//! -//! This module provides semantic convention attributes for URL instrumentation. -//! Based on OpenTelemetry URL semantic conventions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// URL attribute registry -pub const Attributes = struct { - /// Domain extracted from the url.full - pub const domain = types.StringAttribute.init( - "url.domain", - "Domain extracted from the `url.full`, such as \"opentelemetry.io\".", - .development, - .recommended, - ).withNote("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 " ++ - "enclosed by `[` and `]`, the `[` and `]` characters should also be captured in the domain field.") - .withExamples(&[_][]const u8{ "www.foo.bar", "opentelemetry.io", "3.12.167.2", "[1080:0:0:0:8:800:200C:417A]" }); - - /// File extension extracted from the url.full - pub const extension = types.StringAttribute.init( - "url.extension", - "The file extension extracted from the `url.full`, excluding the leading dot.", - .development, - .recommended, - ).withNote("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`.") - .withExamples(&[_][]const u8{ "png", "gz" }); - - /// Unmodified original URL - pub const full = types.StringAttribute.init( - "url.full", - "Absolute URL describing a network resource according to RFC3986.", - .stable, - .required, - ).withNote("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.") - .withExamples(&[_][]const u8{ "https://www.foo.bar/search?q=OpenTelemetry#SemConv", "//localhost" }); - - /// URI fragment component - pub const fragment = types.StringAttribute.init( - "url.fragment", - "The URI fragment component.", - .stable, - .opt_in, - ).withExamples(&[_][]const u8{"SemConv"}); - - /// URI path component - pub const path = types.StringAttribute.init( - "url.path", - "The URI path component.", - .stable, - .required, - ).withNote("Sensitive content provided in `url.path` should be scrubbed when instrumentations can identify it.") - .withExamples(&[_][]const u8{ "/search", "/users/123" }); - - /// Port extracted from the url.full - pub const port = types.IntAttribute.init( - "url.port", - "Port extracted from the `url.full`.", - .stable, - .recommended, - ).withExamples(&[_]i64{ 443, 8080 }); - - /// URI query component - pub const query = types.StringAttribute.init( - "url.query", - "The URI query component.", - .stable, - .conditionally_required, - ).withCondition("If and only if one was received/sent") - .withNote("Sensitive content provided in `url.query` should be scrubbed when instrumentations can identify it.") - .withExamples(&[_][]const u8{"q=OpenTelemetry"}); - - /// Highest registered URL domain - pub const registered_domain = types.StringAttribute.init( - "url.registered_domain", - "The highest registered url domain, stripped of the subdomain.", - .development, - .recommended, - ).withNote("This value can be determined precisely with the public suffix list. " ++ - "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`.") - .withExamples(&[_][]const u8{ "example.com", "foo.co.uk" }); - - /// URI scheme component - pub const scheme = types.StringAttribute.init( - "url.scheme", - "The URI scheme component identifying the used protocol.", - .stable, - .required, - ).withExamples(&[_][]const u8{ "http", "https" }); - - /// Subdomain extracted from the url.full - pub const subdomain = types.StringAttribute.init( - "url.subdomain", - "The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain.", - .development, - .recommended, - ).withNote("If the subdomain is \"east.mydomain.example.com\", then the subdomain is \"east.mydomain\".") - .withExamples(&[_][]const u8{ "east.mydomain", "www" }); - - /// Low-cardinality template of an absolute path reference - pub const template = types.StringAttribute.init( - "url.template", - "The low-cardinality template of an absolute path reference.", - .development, - .conditionally_required, - ).withCondition("If available") - .withNote("The `url.template` MUST have low cardinality. It is not usually available on HTTP clients, " ++ - "but may be known by the application or specialized HTTP instrumentation.") - .withExamples(&[_][]const u8{ "/users/{id}", "/users/:id", "/users?id={id}" }); - - /// Top level domain extracted from the url.full - pub const top_level_domain = types.StringAttribute.init( - "url.top_level_domain", - "The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name.", - .development, - .recommended, - ).withNote("For example, the top level domain for example.com is `com`. " ++ - "This value can be determined precisely with the public suffix list.") - .withExamples(&[_][]const u8{ "com", "co.uk" }); -}; - -/// URL semantic convention group -pub const Group = types.AttributeGroup{ - .id = "registry.url", - .brief = "Attributes describing URL.", - .stability = .stable, -}; - -// Helper functions for working with URLs - -/// Parse a URL and extract components -pub const ParsedUrl = struct { - scheme: ?[]const u8 = null, - domain: ?[]const u8 = null, - port: ?u16 = null, - path: ?[]const u8 = null, - query: ?[]const u8 = null, - fragment: ?[]const u8 = null, -}; - -/// Simple URL parser (basic implementation) -pub fn parseUrl(allocator: std.mem.Allocator, url: []const u8) !ParsedUrl { - _ = allocator; // For future use if needed - var parsed = ParsedUrl{}; - - // Find scheme - if (std.mem.indexOf(u8, url, "://")) |scheme_end| { - parsed.scheme = url[0..scheme_end]; - var rest = url[scheme_end + 3 ..]; - - // Find path start - const path_start = std.mem.indexOfAny(u8, rest, "/?#") orelse rest.len; - const authority = rest[0..path_start]; - - // Parse authority (domain:port) - if (std.mem.lastIndexOf(u8, authority, ":")) |port_start| { - parsed.domain = authority[0..port_start]; - const port_str = authority[port_start + 1 ..]; - parsed.port = std.fmt.parseInt(u16, port_str, 10) catch null; - } else { - parsed.domain = authority; - } - - if (path_start < rest.len) { - rest = rest[path_start..]; - - // Find query start - if (std.mem.indexOf(u8, rest, "?")) |query_start| { - parsed.path = rest[0..query_start]; - rest = rest[query_start + 1 ..]; - - // Find fragment start - if (std.mem.indexOf(u8, rest, "#")) |frag_start| { - parsed.query = rest[0..frag_start]; - parsed.fragment = rest[frag_start + 1 ..]; - } else { - parsed.query = rest; - } - } else if (std.mem.indexOf(u8, rest, "#")) |frag_start| { - parsed.path = rest[0..frag_start]; - parsed.fragment = rest[frag_start + 1 ..]; - } else { - parsed.path = rest; - } - } - } - - return parsed; -} - -/// Extract file extension from a path -pub fn getFileExtension(path: []const u8) ?[]const u8 { - if (std.mem.lastIndexOf(u8, path, ".")) |dot_pos| { - // Find the last slash to identify the filename part - const last_slash = std.mem.lastIndexOf(u8, path, "/") orelse 0; - const filename_start = if (last_slash > 0) last_slash + 1 else 0; - - // If the dot is the first character of the filename, it's a hidden file, not an extension - if (dot_pos == filename_start) { - return null; - } - - const ext = path[dot_pos + 1 ..]; - if (ext.len > 0 and std.mem.indexOf(u8, ext, "/") == null) { - return ext; - } - } - return null; -} - -/// Check if URL scheme is secure (https, wss, etc.) -pub fn isSecureScheme(scheme: []const u8) bool { - const secure_schemes = [_][]const u8{ "https", "wss", "ftps", "sftp" }; - for (secure_schemes) |secure| { - if (std.mem.eql(u8, scheme, secure)) { - return true; - } - } - return false; -} - -/// Get default port for common schemes -pub fn getDefaultPort(scheme: []const u8) ?u16 { - const scheme_ports = [_]struct { scheme: []const u8, port: u16 }{ - .{ .scheme = "http", .port = 80 }, - .{ .scheme = "https", .port = 443 }, - .{ .scheme = "ftp", .port = 21 }, - .{ .scheme = "ssh", .port = 22 }, - .{ .scheme = "telnet", .port = 23 }, - .{ .scheme = "smtp", .port = 25 }, - .{ .scheme = "dns", .port = 53 }, - .{ .scheme = "pop3", .port = 110 }, - .{ .scheme = "imap", .port = 143 }, - .{ .scheme = "ldap", .port = 389 }, - .{ .scheme = "ldaps", .port = 636 }, - }; - - for (scheme_ports) |sp| { - if (std.mem.eql(u8, scheme, sp.scheme)) { - return sp.port; - } - } - return null; -} - -// Tests -test "URL parsing" { - const allocator = std.testing.allocator; - - const parsed = try parseUrl(allocator, "https://example.com:8080/path/to/resource?param=value#section"); - - try std.testing.expectEqualStrings("https", parsed.scheme.?); - try std.testing.expectEqualStrings("example.com", parsed.domain.?); - try std.testing.expectEqual(@as(?u16, 8080), parsed.port); - try std.testing.expectEqualStrings("/path/to/resource", parsed.path.?); - try std.testing.expectEqualStrings("param=value", parsed.query.?); - try std.testing.expectEqualStrings("section", parsed.fragment.?); -} - -test "URL parsing without port" { - const allocator = std.testing.allocator; - - const parsed = try parseUrl(allocator, "http://example.com/path"); - - try std.testing.expectEqualStrings("http", parsed.scheme.?); - try std.testing.expectEqualStrings("example.com", parsed.domain.?); - try std.testing.expectEqual(@as(?u16, null), parsed.port); - try std.testing.expectEqualStrings("/path", parsed.path.?); -} - -test "File extension extraction" { - try std.testing.expectEqualStrings("txt", getFileExtension("/path/to/file.txt").?); - try std.testing.expectEqualStrings("gz", getFileExtension("/path/to/file.tar.gz").?); - try std.testing.expectEqual(@as(?[]const u8, null), getFileExtension("/path/to/file")); - try std.testing.expectEqual(@as(?[]const u8, null), getFileExtension("/path/to/.hidden")); -} - -test "Secure scheme detection" { - try std.testing.expect(isSecureScheme("https")); - try std.testing.expect(isSecureScheme("wss")); - try std.testing.expect(!isSecureScheme("http")); - try std.testing.expect(!isSecureScheme("ws")); -} - -test "Default port detection" { - try std.testing.expectEqual(@as(?u16, 80), getDefaultPort("http")); - try std.testing.expectEqual(@as(?u16, 443), getDefaultPort("https")); - try std.testing.expectEqual(@as(?u16, 22), getDefaultPort("ssh")); - try std.testing.expectEqual(@as(?u16, null), getDefaultPort("unknown")); -} - -test "URL attribute definitions" { - try std.testing.expectEqualStrings("url.full", Attributes.full.name); - try std.testing.expectEqual(types.StabilityLevel.stable, Attributes.full.stability); - try std.testing.expectEqual(types.RequirementLevel.required, Attributes.full.requirement_level); - - try std.testing.expectEqualStrings("url.scheme", Attributes.scheme.name); - try std.testing.expectEqual(types.StabilityLevel.stable, Attributes.scheme.stability); -} diff --git a/src/user-agent/registry.zig b/src/user-agent/registry.zig deleted file mode 100644 index 6f6180a..0000000 --- a/src/user-agent/registry.zig +++ /dev/null @@ -1,78 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: user-agent -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const syntheticTypeValue = enum { - /// Bot source. - bot, - /// Synthetic test source. - @"test", - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .bot => "bot", - .@"test" => "test", - }; - } -}; - -/// Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html -pub const user_agent_original = types.StringAttribute{ - .name = "user_agent.original", - .brief = "Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html", - .note = null, - .stability = .stable, - .requirement_level = .recommended, -}; - -/// Name of the user-agent extracted from original. Usually refers to the browser's name. -pub const user_agent_name = types.StringAttribute{ - .name = "user_agent.name", - .brief = "Name of the user-agent extracted from original. Usually refers to the browser's name.", - .note = "[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`", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Version of the user-agent extracted from original. Usually refers to the browser's version -pub const user_agent_version = types.StringAttribute{ - .name = "user_agent.version", - .brief = "Version of the user-agent extracted from original. Usually refers to the browser's version", - .note = "[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`\n\n", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Human readable operating system name. -pub const user_agent_os_name = types.StringAttribute{ - .name = "user_agent.os.name", - .brief = "Human readable operating system name.", - .note = "For mapping user agent strings to OS names, libraries such as [ua-parser](https://github.com/ua-parser) can be utilized.", - .stability = .development, - .requirement_level = .recommended, -}; - -/// The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md -pub const user_agent_os_version = types.StringAttribute{ - .name = "user_agent.os.version", - .brief = "The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md", - .note = "For mapping user agent strings to OS versions, libraries such as [ua-parser](https://github.com/ua-parser) can be utilized.\n\n", - .stability = .development, - .requirement_level = .recommended, -}; - -/// Specifies the category of synthetic traffic, such as tests or bots. -pub const user_agent_synthetic_type = types.EnumAttribute(syntheticTypeValue){ - .base = types.StringAttribute{ - .name = "user_agent.synthetic.type", - .brief = "Specifies the category of synthetic traffic, such as tests or bots.", - .note = "This attribute MAY be derived from the contents of the `user_agent.original` attribute. Components that populate the attribute are responsible for determining what they consider to be synthetic bot or test traffic. This attribute can either be set for self-identification purposes, or on telemetry detected to be generated as a result of a synthetic request. This attribute is useful for distinguishing between genuine client traffic and synthetic traffic generated by bots or tests.", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = syntheticTypeValue.bot, -}; - diff --git a/src/user-agent/user-agent.zig b/src/user-agent/user-agent.zig deleted file mode 100644 index 30aa192..0000000 --- a/src/user-agent/user-agent.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! user-agent semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/v8js/registry.zig b/src/v8js/registry.zig deleted file mode 100644 index 6dfeec4..0000000 --- a/src/v8js/registry.zig +++ /dev/null @@ -1,74 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: v8js -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -pub const gcTypeValue = enum { - /// Major (Mark Sweep Compact). - major, - /// Minor (Scavenge). - minor, - /// Incremental (Incremental Marking). - incremental, - /// Weak Callbacks (Process Weak Callbacks). - weakcb, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .major => "major", - .minor => "minor", - .incremental => "incremental", - .weakcb => "weakcb", - }; - } -}; - -pub const heapSpaceNameValue = enum { - /// New memory space. - new_space, - /// Old memory space. - old_space, - /// Code memory space. - code_space, - /// Map memory space. - map_space, - /// Large object memory space. - large_object_space, - - pub fn toString(self: @This()) []const u8 { - return switch (self) { - .new_space => "new_space", - .old_space => "old_space", - .code_space => "code_space", - .map_space => "map_space", - .large_object_space => "large_object_space", - }; - } -}; - -/// The type of garbage collection. -pub const v8js_gc_type = types.EnumAttribute(gcTypeValue){ - .base = types.StringAttribute{ - .name = "v8js.gc.type", - .brief = "The type of garbage collection.", - .note = null, - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = gcTypeValue.major, -}; - -/// The name of the space type of heap memory. -pub const v8js_heap_space_name = types.EnumAttribute(heapSpaceNameValue){ - .base = types.StringAttribute{ - .name = "v8js.heap.space.name", - .brief = "The name of the space type of heap memory.", - .note = "Value can be retrieved from value `space_name` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html", - .stability = .development, - .requirement_level = .recommended, - }, - .well_known_values = heapSpaceNameValue.new_space, -}; - diff --git a/src/v8js/v8js.zig b/src/v8js/v8js.zig deleted file mode 100644 index 7c4eaf0..0000000 --- a/src/v8js/v8js.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! v8js semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); - diff --git a/src/zos/registry.zig b/src/zos/registry.zig deleted file mode 100644 index f2b4ac2..0000000 --- a/src/zos/registry.zig +++ /dev/null @@ -1,25 +0,0 @@ -//! Generated from registry.yaml -//! Namespace: zos -//! This file contains semantic convention registry definitions. - -const std = @import("std"); -const types = @import("../types.zig"); - -/// The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis. -pub const zos_smf_id = types.StringAttribute{ - .name = "zos.smf.id", - .brief = "The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - -/// The name of the SYSPLEX to which the z/OS system belongs too. -pub const zos_sysplex_name = types.StringAttribute{ - .name = "zos.sysplex.name", - .brief = "The name of the SYSPLEX to which the z/OS system belongs too.", - .note = null, - .stability = .development, - .requirement_level = .recommended, -}; - diff --git a/src/zos/zos.zig b/src/zos/zos.zig deleted file mode 100644 index 454189e..0000000 --- a/src/zos/zos.zig +++ /dev/null @@ -1,5 +0,0 @@ -//! zos semantic conventions module -//! This module exports the registry as a clean namespace. - -pub const Registry = @import("registry.zig"); -