Skip to content

Commit 7cb3063

Browse files
committed
Only incubating to start with
1 parent 4af4a6e commit 7cb3063

File tree

10 files changed

+156
-832
lines changed

10 files changed

+156
-832
lines changed

buildscripts/templates/registry/incubating_java/IncubatingSemanticMetrics.java.j2

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,15 @@ public final class {{ my_class_name }} {
3535
{%- endif %}
3636
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
3737
{%- elif metric is stable -%}
38-
{%- set stable_class_name = ctx.root_namespace | pascal_case ~ "Metrics" -%}
39-
{%- set stable_class_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "#" ~ (metric.metric_name | replace(".", "_") | screaming_snake_case) -%}
4038

41-
/**
42-
* Name of the {@code {{ metric.metric_name }}} metric.
43-
*
44-
* @deprecated deprecated in favor of stable {@link {{ stable_class_link }}_NAME} constant.
45-
*/
46-
@Deprecated public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_NAME = "{{ metric.metric_name }}";
39+
/** Name of the {@code {{ metric.metric_name }}} metric. */
40+
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_NAME = "{{ metric.metric_name }}";
4741

48-
/**
49-
* Unit of the {@code {{ metric.metric_name }}} metric.
50-
*
51-
* @deprecated deprecated in favor of stable {@link {{ stable_class_link }}_UNIT} constant.
52-
*/
53-
@Deprecated public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_UNIT = "{{ metric.unit }}";
42+
/** Unit of the {@code {{ metric.metric_name }}} metric. */
43+
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_UNIT = "{{ metric.unit }}";
5444

55-
/**
56-
* Description of the {@code {{ metric.metric_name }}} metric.
57-
*
58-
* @deprecated deprecated in favor of stable {@link {{ stable_class_link }}_DESCRIPTION} constant.
59-
*/
60-
@Deprecated public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
45+
/** Description of the {@code {{ metric.metric_name }}} metric. */
46+
public static final String {{ metric.metric_name | replace(".", "_") | screaming_snake_case }}_DESCRIPTION = "{{ metric.brief | replace('\n', ' ') | replace('"', '\\"') }}";
6147
{%- endif -%}
6248
{%- endfor %}
6349

buildscripts/templates/registry/java/weaver.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ templates:
2929
})
3030
application_mode: each
3131
file_name: "{{ctx.root_namespace | pascal_case}}Attributes.java"
32-
- pattern: SemanticMetrics.java.j2
33-
filter: >
34-
semconv_grouped_metrics({
35-
"exclude_root_namespace": $excluded_namespaces,
36-
"exclude_stability": ["experimental", "deprecated"]
37-
}) | map({
38-
root_namespace: .root_namespace,
39-
metrics: .metrics
40-
})
41-
application_mode: each
42-
file_name: "{{ctx.root_namespace | pascal_case}}Metrics.java"
32+
# - pattern: SemanticMetrics.java.j2
33+
# filter: >
34+
# semconv_grouped_metrics({
35+
# "exclude_root_namespace": $excluded_namespaces,
36+
# "exclude_stability": ["experimental", "deprecated"]
37+
# }) | map({
38+
# root_namespace: .root_namespace,
39+
# metrics: .metrics
40+
# })
41+
# application_mode: each
42+
# file_name: "{{ctx.root_namespace | pascal_case}}Metrics.java"
4343
text_maps:
4444
java_enum_type:
4545
int: long

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingMetrics.java

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -241,30 +241,13 @@ public final class DbIncubatingMetrics {
241241
public static final String DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE_DESCRIPTION =
242242
"Deprecated, use `azure.cosmosdb.client.operation.request_charge` instead.";
243243

244-
/**
245-
* Name of the {@code db.client.operation.duration} metric.
246-
*
247-
* @deprecated deprecated in favor of stable {@link
248-
* io.opentelemetry.semconv.DbMetrics#DB_CLIENT_OPERATION_DURATION_NAME} constant.
249-
*/
250-
@Deprecated
244+
/** Name of the {@code db.client.operation.duration} metric. */
251245
public static final String DB_CLIENT_OPERATION_DURATION_NAME = "db.client.operation.duration";
252246

253-
/**
254-
* Unit of the {@code db.client.operation.duration} metric.
255-
*
256-
* @deprecated deprecated in favor of stable {@link
257-
* io.opentelemetry.semconv.DbMetrics#DB_CLIENT_OPERATION_DURATION_UNIT} constant.
258-
*/
259-
@Deprecated public static final String DB_CLIENT_OPERATION_DURATION_UNIT = "s";
260-
261-
/**
262-
* Description of the {@code db.client.operation.duration} metric.
263-
*
264-
* @deprecated deprecated in favor of stable {@link
265-
* io.opentelemetry.semconv.DbMetrics#DB_CLIENT_OPERATION_DURATION_DESCRIPTION} constant.
266-
*/
267-
@Deprecated
247+
/** Unit of the {@code db.client.operation.duration} metric. */
248+
public static final String DB_CLIENT_OPERATION_DURATION_UNIT = "s";
249+
250+
/** Description of the {@code db.client.operation.duration} metric. */
268251
public static final String DB_CLIENT_OPERATION_DURATION_DESCRIPTION =
269252
"Duration of database client operations.";
270253

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingMetrics.java

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -51,30 +51,13 @@ public final class HttpIncubatingMetrics {
5151
public static final String HTTP_CLIENT_REQUEST_BODY_SIZE_DESCRIPTION =
5252
"Size of HTTP client request bodies.";
5353

54-
/**
55-
* Name of the {@code http.client.request.duration} metric.
56-
*
57-
* @deprecated deprecated in favor of stable {@link
58-
* io.opentelemetry.semconv.HttpMetrics#HTTP_CLIENT_REQUEST_DURATION_NAME} constant.
59-
*/
60-
@Deprecated
54+
/** Name of the {@code http.client.request.duration} metric. */
6155
public static final String HTTP_CLIENT_REQUEST_DURATION_NAME = "http.client.request.duration";
6256

63-
/**
64-
* Unit of the {@code http.client.request.duration} metric.
65-
*
66-
* @deprecated deprecated in favor of stable {@link
67-
* io.opentelemetry.semconv.HttpMetrics#HTTP_CLIENT_REQUEST_DURATION_UNIT} constant.
68-
*/
69-
@Deprecated public static final String HTTP_CLIENT_REQUEST_DURATION_UNIT = "s";
70-
71-
/**
72-
* Description of the {@code http.client.request.duration} metric.
73-
*
74-
* @deprecated deprecated in favor of stable {@link
75-
* io.opentelemetry.semconv.HttpMetrics#HTTP_CLIENT_REQUEST_DURATION_DESCRIPTION} constant.
76-
*/
77-
@Deprecated
57+
/** Unit of the {@code http.client.request.duration} metric. */
58+
public static final String HTTP_CLIENT_REQUEST_DURATION_UNIT = "s";
59+
60+
/** Description of the {@code http.client.request.duration} metric. */
7861
public static final String HTTP_CLIENT_REQUEST_DURATION_DESCRIPTION =
7962
"Duration of HTTP client requests.";
8063

@@ -108,30 +91,13 @@ public final class HttpIncubatingMetrics {
10891
public static final String HTTP_SERVER_REQUEST_BODY_SIZE_DESCRIPTION =
10992
"Size of HTTP server request bodies.";
11093

111-
/**
112-
* Name of the {@code http.server.request.duration} metric.
113-
*
114-
* @deprecated deprecated in favor of stable {@link
115-
* io.opentelemetry.semconv.HttpMetrics#HTTP_SERVER_REQUEST_DURATION_NAME} constant.
116-
*/
117-
@Deprecated
94+
/** Name of the {@code http.server.request.duration} metric. */
11895
public static final String HTTP_SERVER_REQUEST_DURATION_NAME = "http.server.request.duration";
11996

120-
/**
121-
* Unit of the {@code http.server.request.duration} metric.
122-
*
123-
* @deprecated deprecated in favor of stable {@link
124-
* io.opentelemetry.semconv.HttpMetrics#HTTP_SERVER_REQUEST_DURATION_UNIT} constant.
125-
*/
126-
@Deprecated public static final String HTTP_SERVER_REQUEST_DURATION_UNIT = "s";
127-
128-
/**
129-
* Description of the {@code http.server.request.duration} metric.
130-
*
131-
* @deprecated deprecated in favor of stable {@link
132-
* io.opentelemetry.semconv.HttpMetrics#HTTP_SERVER_REQUEST_DURATION_DESCRIPTION} constant.
133-
*/
134-
@Deprecated
97+
/** Unit of the {@code http.server.request.duration} metric. */
98+
public static final String HTTP_SERVER_REQUEST_DURATION_UNIT = "s";
99+
100+
/** Description of the {@code http.server.request.duration} metric. */
135101
public static final String HTTP_SERVER_REQUEST_DURATION_DESCRIPTION =
136102
"Duration of HTTP server requests.";
137103

0 commit comments

Comments
 (0)