Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{%- set my_class_name = ctx.root_namespace | pascal_case ~ "IncubatingMetrics" -%}

/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.semconv.incubating;

// DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2
@SuppressWarnings("unused")
public final class {{ my_class_name }} {
{%- for metric in ctx.metrics -%}
{%- if metric is experimental -%}
{%- if metric is deprecated -%}
{%- set deprecated_javadoc = "@deprecated " ~ metric.deprecated.note -%}
{%- else -%}
{%- set deprecated_javadoc = "" -%}
{%- endif %}

/** Name of the {@code {{ metric.metric_name }}} metric. */
{%- if metric is deprecated %}
@Deprecated
{%- endif %}
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_NAME = "{{ metric.metric_name }}";

/** Unit of the {@code {{ metric.metric_name }}} metric. */
{%- if metric is deprecated %}
@Deprecated
{%- endif %}
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_UNIT = "{{ metric.unit }}";

/** Description of the {@code {{ metric.metric_name }}} metric. */
{%- if metric is deprecated %}
@Deprecated
{%- endif %}
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
{%- elif metric is stable -%}

/** Name of the {@code {{ metric.metric_name }}} metric. */
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_NAME = "{{ metric.metric_name }}";

/** Unit of the {@code {{ metric.metric_name }}} metric. */
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_UNIT = "{{ metric.unit }}";

/** Description of the {@code {{ metric.metric_name }}} metric. */
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
{%- endif -%}
{%- endfor %}

private {{ my_class_name }}() {}
}
11 changes: 11 additions & 0 deletions buildscripts/templates/registry/incubating_java/weaver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ templates:
})
application_mode: each
file_name: "{{ctx.root_namespace | pascal_case}}IncubatingAttributes.java"
- pattern: IncubatingSemanticMetrics.java.j2
filter: >
semconv_grouped_metrics({
"exclude_root_namespace": $excluded_namespaces,
"exclude_stability": []
}) | map({
root_namespace: .root_namespace,
metrics: .metrics
})
application_mode: each
file_name: "{{ctx.root_namespace | pascal_case}}IncubatingMetrics.java"
text_maps:
java_enum_type:
int: long
Expand Down
39 changes: 39 additions & 0 deletions buildscripts/templates/registry/java/SemanticMetrics.java.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{%- set my_class_name = ctx.root_namespace | pascal_case ~ "Metrics" -%}

/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.semconv;

// DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/java/SemanticMetrics.java.j2
@SuppressWarnings("unused")
public final class {{ my_class_name }} {
{%- for metric in ctx.metrics -%}
{%- if metric is stable -%}
{%- if metric is deprecated -%}
{%- set deprecated_javadoc = "@deprecated " ~ metric.deprecated.note -%}
{%- endif %}

/** Name of the {@code {{ metric.metric_name }}} metric. */
{%- if metric is deprecated %}
@Deprecated
{%- endif %}
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_NAME = "{{ metric.metric_name }}";

/** Unit of the {@code {{ metric.metric_name }}} metric. */
{%- if metric is deprecated %}
@Deprecated
{%- endif %}
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_UNIT = "{{ metric.unit }}";

/** Description of the {@code {{ metric.metric_name }}} metric. */
{%- if metric is deprecated %}
@Deprecated
{%- endif %}
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
{%- endif -%}
{%- endfor %}

private {{ my_class_name }}() {}
}
11 changes: 11 additions & 0 deletions buildscripts/templates/registry/java/weaver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ templates:
})
application_mode: each
file_name: "{{ctx.root_namespace | pascal_case}}Attributes.java"
# - pattern: SemanticMetrics.java.j2
# filter: >
# semconv_grouped_metrics({
# "exclude_root_namespace": $excluded_namespaces,
# "exclude_stability": ["experimental", "deprecated"]
# }) | map({
# root_namespace: .root_namespace,
# metrics: .metrics
# })
# application_mode: each
# file_name: "{{ctx.root_namespace | pascal_case}}Metrics.java"
text_maps:
java_enum_type:
int: long
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.semconv.incubating;

// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2
@SuppressWarnings("unused")
public final class AzureIncubatingMetrics {

/** Name of the {@code azure.cosmosdb.client.active_instance.count} metric. */
public static final String AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT_NAME =
"azure.cosmosdb.client.active_instance.count";

/** Unit of the {@code azure.cosmosdb.client.active_instance.count} metric. */
public static final String AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT_UNIT = "{instance}";

/** Description of the {@code azure.cosmosdb.client.active_instance.count} metric. */
public static final String AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT_DESCRIPTION =
"Number of active client instances.";

/** Name of the {@code azure.cosmosdb.client.operation.request_charge} metric. */
public static final String AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE_NAME =
"azure.cosmosdb.client.operation.request_charge";

/** Unit of the {@code azure.cosmosdb.client.operation.request_charge} metric. */
public static final String AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE_UNIT = "{request_unit}";

/** Description of the {@code azure.cosmosdb.client.operation.request_charge} metric. */
public static final String AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE_DESCRIPTION =
"[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation.";

private AzureIncubatingMetrics() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.semconv.incubating;

// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2
@SuppressWarnings("unused")
public final class CicdIncubatingMetrics {

/** Name of the {@code cicd.pipeline.run.active} metric. */
public static final String CICD_PIPELINE_RUN_ACTIVE_NAME = "cicd.pipeline.run.active";

/** Unit of the {@code cicd.pipeline.run.active} metric. */
public static final String CICD_PIPELINE_RUN_ACTIVE_UNIT = "{run}";

/** Description of the {@code cicd.pipeline.run.active} metric. */
public static final String CICD_PIPELINE_RUN_ACTIVE_DESCRIPTION =
"The number of pipeline runs currently active in the system by state.";

/** Name of the {@code cicd.pipeline.run.duration} metric. */
public static final String CICD_PIPELINE_RUN_DURATION_NAME = "cicd.pipeline.run.duration";

/** Unit of the {@code cicd.pipeline.run.duration} metric. */
public static final String CICD_PIPELINE_RUN_DURATION_UNIT = "s";

/** Description of the {@code cicd.pipeline.run.duration} metric. */
public static final String CICD_PIPELINE_RUN_DURATION_DESCRIPTION =
"Duration of a pipeline run grouped by pipeline, state and result.";

/** Name of the {@code cicd.pipeline.run.errors} metric. */
public static final String CICD_PIPELINE_RUN_ERRORS_NAME = "cicd.pipeline.run.errors";

/** Unit of the {@code cicd.pipeline.run.errors} metric. */
public static final String CICD_PIPELINE_RUN_ERRORS_UNIT = "{error}";

/** Description of the {@code cicd.pipeline.run.errors} metric. */
public static final String CICD_PIPELINE_RUN_ERRORS_DESCRIPTION =
"The number of errors encountered in pipeline runs (eg. compile, test failures).";

/** Name of the {@code cicd.system.errors} metric. */
public static final String CICD_SYSTEM_ERRORS_NAME = "cicd.system.errors";

/** Unit of the {@code cicd.system.errors} metric. */
public static final String CICD_SYSTEM_ERRORS_UNIT = "{error}";

/** Description of the {@code cicd.system.errors} metric. */
public static final String CICD_SYSTEM_ERRORS_DESCRIPTION =
"The number of errors in a component of the CICD system (eg. controller, scheduler, agent).";

/** Name of the {@code cicd.worker.count} metric. */
public static final String CICD_WORKER_COUNT_NAME = "cicd.worker.count";

/** Unit of the {@code cicd.worker.count} metric. */
public static final String CICD_WORKER_COUNT_UNIT = "{count}";

/** Description of the {@code cicd.worker.count} metric. */
public static final String CICD_WORKER_COUNT_DESCRIPTION =
"The number of workers on the CICD system by state.";

private CicdIncubatingMetrics() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.semconv.incubating;

// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2
@SuppressWarnings("unused")
public final class ContainerIncubatingMetrics {

/** Name of the {@code container.cpu.time} metric. */
public static final String CONTAINER_CPU_TIME_NAME = "container.cpu.time";

/** Unit of the {@code container.cpu.time} metric. */
public static final String CONTAINER_CPU_TIME_UNIT = "s";

/** Description of the {@code container.cpu.time} metric. */
public static final String CONTAINER_CPU_TIME_DESCRIPTION = "Total CPU time consumed.";

/** Name of the {@code container.cpu.usage} metric. */
public static final String CONTAINER_CPU_USAGE_NAME = "container.cpu.usage";

/** Unit of the {@code container.cpu.usage} metric. */
public static final String CONTAINER_CPU_USAGE_UNIT = "{cpu}";

/** Description of the {@code container.cpu.usage} metric. */
public static final String CONTAINER_CPU_USAGE_DESCRIPTION =
"Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs.";

/** Name of the {@code container.disk.io} metric. */
public static final String CONTAINER_DISK_IO_NAME = "container.disk.io";

/** Unit of the {@code container.disk.io} metric. */
public static final String CONTAINER_DISK_IO_UNIT = "By";

/** Description of the {@code container.disk.io} metric. */
public static final String CONTAINER_DISK_IO_DESCRIPTION = "Disk bytes for the container.";

/** Name of the {@code container.filesystem.available} metric. */
public static final String CONTAINER_FILESYSTEM_AVAILABLE_NAME = "container.filesystem.available";

/** Unit of the {@code container.filesystem.available} metric. */
public static final String CONTAINER_FILESYSTEM_AVAILABLE_UNIT = "By";

/** Description of the {@code container.filesystem.available} metric. */
public static final String CONTAINER_FILESYSTEM_AVAILABLE_DESCRIPTION =
"Container filesystem available bytes.";

/** Name of the {@code container.filesystem.capacity} metric. */
public static final String CONTAINER_FILESYSTEM_CAPACITY_NAME = "container.filesystem.capacity";

/** Unit of the {@code container.filesystem.capacity} metric. */
public static final String CONTAINER_FILESYSTEM_CAPACITY_UNIT = "By";

/** Description of the {@code container.filesystem.capacity} metric. */
public static final String CONTAINER_FILESYSTEM_CAPACITY_DESCRIPTION =
"Container filesystem capacity.";

/** Name of the {@code container.filesystem.usage} metric. */
public static final String CONTAINER_FILESYSTEM_USAGE_NAME = "container.filesystem.usage";

/** Unit of the {@code container.filesystem.usage} metric. */
public static final String CONTAINER_FILESYSTEM_USAGE_UNIT = "By";

/** Description of the {@code container.filesystem.usage} metric. */
public static final String CONTAINER_FILESYSTEM_USAGE_DESCRIPTION = "Container filesystem usage.";

/** Name of the {@code container.memory.usage} metric. */
public static final String CONTAINER_MEMORY_USAGE_NAME = "container.memory.usage";

/** Unit of the {@code container.memory.usage} metric. */
public static final String CONTAINER_MEMORY_USAGE_UNIT = "By";

/** Description of the {@code container.memory.usage} metric. */
public static final String CONTAINER_MEMORY_USAGE_DESCRIPTION = "Memory usage of the container.";

/** Name of the {@code container.network.io} metric. */
public static final String CONTAINER_NETWORK_IO_NAME = "container.network.io";

/** Unit of the {@code container.network.io} metric. */
public static final String CONTAINER_NETWORK_IO_UNIT = "By";

/** Description of the {@code container.network.io} metric. */
public static final String CONTAINER_NETWORK_IO_DESCRIPTION = "Network bytes for the container.";

/** Name of the {@code container.uptime} metric. */
public static final String CONTAINER_UPTIME_NAME = "container.uptime";

/** Unit of the {@code container.uptime} metric. */
public static final String CONTAINER_UPTIME_UNIT = "s";

/** Description of the {@code container.uptime} metric. */
public static final String CONTAINER_UPTIME_DESCRIPTION =
"The time the container has been running.";

private ContainerIncubatingMetrics() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.semconv.incubating;

// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2
@SuppressWarnings("unused")
public final class CpuIncubatingMetrics {

/** Name of the {@code cpu.frequency} metric. */
@Deprecated public static final String CPU_FREQUENCY_NAME = "cpu.frequency";

/** Unit of the {@code cpu.frequency} metric. */
@Deprecated public static final String CPU_FREQUENCY_UNIT = "{Hz}";

/** Description of the {@code cpu.frequency} metric. */
@Deprecated
public static final String CPU_FREQUENCY_DESCRIPTION =
"Deprecated. Use `system.cpu.frequency` instead.";

/** Name of the {@code cpu.time} metric. */
@Deprecated public static final String CPU_TIME_NAME = "cpu.time";

/** Unit of the {@code cpu.time} metric. */
@Deprecated public static final String CPU_TIME_UNIT = "s";

/** Description of the {@code cpu.time} metric. */
@Deprecated
public static final String CPU_TIME_DESCRIPTION = "Deprecated. Use `system.cpu.time` instead.";

/** Name of the {@code cpu.utilization} metric. */
@Deprecated public static final String CPU_UTILIZATION_NAME = "cpu.utilization";

/** Unit of the {@code cpu.utilization} metric. */
@Deprecated public static final String CPU_UTILIZATION_UNIT = "1";

/** Description of the {@code cpu.utilization} metric. */
@Deprecated
public static final String CPU_UTILIZATION_DESCRIPTION =
"Deprecated. Use `system.cpu.utilization` instead.";

private CpuIncubatingMetrics() {}
}
Loading