diff --git a/buildscripts/templates/registry/incubating_java/IncubatingSemanticEvents.java.j2 b/buildscripts/templates/registry/incubating_java/IncubatingSemanticEvents.java.j2 new file mode 100644 index 00000000..93be5ce7 --- /dev/null +++ b/buildscripts/templates/registry/incubating_java/IncubatingSemanticEvents.java.j2 @@ -0,0 +1,30 @@ +{%- set my_class_name = ctx.root_namespace | pascal_case ~ "IncubatingEvents" -%} + +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class {{ my_class_name }} { + {%- for event in ctx.events -%} + {%- if event is deprecated -%} + {%- if event.deprecated.note == "Uncategorized." -%} + {%- set deprecated_javadoc = "@deprecated" -%} + {%- else -%} + {%- set deprecated_javadoc = "@deprecated " ~ event.deprecated.note -%} + {%- endif -%} + {%- else -%} + {%- set deprecated_javadoc = "" -%} + {%- endif -%} + {{ [event.brief, concat_if("\n\nNotes:\n\n", event.note), deprecated_javadoc] | comment }} + {%- if event is deprecated -%} + @Deprecated + {%- endif %} + public static final String {{ event.name | screaming_snake_case }} = "{{ event.name }}"; + {%- endfor %} + + private {{ my_class_name }}() {} +} diff --git a/buildscripts/templates/registry/incubating_java/weaver.yaml b/buildscripts/templates/registry/incubating_java/weaver.yaml index 725356cf..074c4ded 100644 --- a/buildscripts/templates/registry/incubating_java/weaver.yaml +++ b/buildscripts/templates/registry/incubating_java/weaver.yaml @@ -27,6 +27,18 @@ templates: }) application_mode: each file_name: "{{ctx.root_namespace | pascal_case}}IncubatingAttributes.java" + - pattern: IncubatingSemanticEvents.java.j2 + filter: > + semconv_signal("event"; { + "exclude_root_namespace": $excluded_namespaces + }) + | group_by(.root_namespace) + | map({ + root_namespace: .[0].root_namespace, + events: sort_by(.name) + }) + application_mode: each + file_name: "{{ctx.root_namespace | pascal_case}}IncubatingEvents.java" text_maps: java_enum_type: int: long @@ -73,4 +85,3 @@ text_maps: int[]: longArrayKeyTemplate double[]: doubleArrayKeyTemplate boolean[]: booleanArrayKeyTemplate - diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingEvents.java new file mode 100644 index 00000000..d1f90d14 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingEvents.java @@ -0,0 +1,47 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class AppIncubatingEvents { + /** + * This event indicates that the application has detected substandard UI rendering performance. + * + *
Notes: + * + *
Jank happens when the UI is rendered slowly enough for the user to experience some + * disruption or sluggishness. + */ + public static final String APP_JANK = "app.jank"; + + /** + * This event represents an instantaneous click on the screen of an application. + * + *
Notes: + * + *
The {@code app.screen.click} event can be used to indicate that a user has clicked or tapped + * on the screen portion of an application. Clicks outside of an application's active area SHOULD + * NOT generate this event. This event does not differentiate between touch/mouse down and + * touch/mouse up. Implementations SHOULD give preference to generating this event at the time the + * click is complete, typically on touch release or mouse up. The location of the click event MUST + * be provided in absolute screen pixels. + */ + public static final String APP_SCREEN_CLICK = "app.screen.click"; + + /** + * This event indicates that an application widget has been clicked. + * + *
Notes: + * + *
Use this event to indicate that visual application component has been clicked, typically + * through a user's manual interaction. + */ + public static final String APP_WIDGET_CLICK = "app.widget.click"; + + private AppIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzIncubatingEvents.java new file mode 100644 index 00000000..a6758f8c --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzIncubatingEvents.java @@ -0,0 +1,20 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class AzIncubatingEvents { + /** + * Deprecated. Use {@code azure.resource.log} instead. + * + * @deprecated Replaced by {@code azure.resource.log}. + */ + @Deprecated public static final String AZ_RESOURCE_LOG = "az.resource.log"; + + private AzIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingEvents.java new file mode 100644 index 00000000..e4568eac --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingEvents.java @@ -0,0 +1,20 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class AzureIncubatingEvents { + /** + * Describes Azure Resource Log event, see Azure + * Resource Log Top-level Schema for more details. + */ + public static final String AZURE_RESOURCE_LOG = "azure.resource.log"; + + private AzureIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingEvents.java new file mode 100644 index 00000000..3f31fb46 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingEvents.java @@ -0,0 +1,19 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class BrowserIncubatingEvents { + /** + * This event describes the website performance metrics introduced by Google, See web vitals. + */ + public static final String BROWSER_WEB_VITAL = "browser.web_vital"; + + private BrowserIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingEvents.java new file mode 100644 index 00000000..285bcec7 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingEvents.java @@ -0,0 +1,27 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class DbIncubatingEvents { + /** + * This event represents an exception that occurred during a database client operation, such as + * connection failures, query errors, timeouts, or other errors that prevent the operation from + * completing successfully. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during database client operations. + * Instrumentations SHOULD set the severity to WARN (severity number 13) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding database client span. + */ + public static final String DB_CLIENT_OPERATION_EXCEPTION = "db.client.operation.exception"; + + private DbIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingEvents.java new file mode 100644 index 00000000..96460146 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingEvents.java @@ -0,0 +1,27 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class DeviceIncubatingEvents { + /** + * This event represents an occurrence of a lifecycle transition on Android or iOS platform. + * + *
Notes: + * + *
The event body fields MUST be used to describe the state of the application at the time of + * the event. This event is meant to be used in conjunction with {@code os.name} resource semantic convention to identify the mobile operating + * system (e.g. Android, iOS). The {@code android.app.state} and {@code ios.app.state} fields are + * mutually exclusive and MUST NOT be used together, each field MUST be used with its + * corresponding {@code os.name} value. + */ + public static final String DEVICE_APP_LIFECYCLE = "device.app.lifecycle"; + + private DeviceIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingEvents.java new file mode 100644 index 00000000..f5dcb265 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingEvents.java @@ -0,0 +1,16 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class ExceptionIncubatingEvents { + /** This event describes a single exception. */ + public static final String EXCEPTION = "exception"; + + private ExceptionIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingEvents.java new file mode 100644 index 00000000..4669aca6 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingEvents.java @@ -0,0 +1,27 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class FaasIncubatingEvents { + /** + * This event represents an exception that occurred during FaaS function invocation, such as + * application errors, internal failures, or other exceptions that prevent the function from + * completing successfully. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during FaaS function invocation. + * Instrumentations SHOULD set the severity to ERROR (severity number 17) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding FaaS span. + */ + public static final String FAAS_INVOCATION_EXCEPTION = "faas.invocation.exception"; + + private FaasIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingEvents.java new file mode 100644 index 00000000..17906741 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingEvents.java @@ -0,0 +1,26 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class FeatureFlagIncubatingEvents { + /** + * Defines feature flag evaluation as an event. + * + *
Notes: + * + *
A {@code feature_flag.evaluation} event SHOULD be emitted whenever a feature flag value is + * evaluated, which may happen many times over the course of an application lifecycle. For + * example, a website A/B testing different animations may evaluate a flag each time a button is + * clicked. A {@code feature_flag.evaluation} event is emitted on each evaluation even if the + * result is the same. + */ + public static final String FEATURE_FLAG_EVALUATION = "feature_flag.evaluation"; + + private FeatureFlagIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingEvents.java new file mode 100644 index 00000000..4fb4767d --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingEvents.java @@ -0,0 +1,86 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class GenAiIncubatingEvents { + /** + * This event describes the assistant message passed to GenAI system. + * + * @deprecated Chat history is reported on {@code gen_ai.input.messages} attribute on spans or + * {@code gen_ai.client.inference.operation.details} event. + */ + @Deprecated public static final String GEN_AI_ASSISTANT_MESSAGE = "gen_ai.assistant.message"; + + /** + * This event describes the Gen AI response message. + * + * @deprecated Chat history is reported on {@code gen_ai.output.messages} attribute on spans or + * {@code gen_ai.client.inference.operation.details} event. + */ + @Deprecated public static final String GEN_AI_CHOICE = "gen_ai.choice"; + + /** + * Describes the details of a GenAI completion request including chat history and parameters. + * + *
Notes: + * + *
This event is opt-in and could be used to store input and output details independently from + * traces. + */ + public static final String GEN_AI_CLIENT_INFERENCE_OPERATION_DETAILS = + "gen_ai.client.inference.operation.details"; + + /** + * This event represents an exception that occurred during a Generative AI client operation, such + * as API errors, rate limiting, model errors, timeouts, or other errors that prevent the + * operation from completing successfully. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during Generative AI client + * operations. Instrumentations SHOULD set the severity to WARN (severity number 13) when + * recording this event. Instrumentations MAY provide a configuration option to populate exception + * events with the attributes captured on the corresponding Generative AI client span. + */ + public static final String GEN_AI_CLIENT_OPERATION_EXCEPTION = + "gen_ai.client.operation.exception"; + + /** + * This event captures the result of evaluating GenAI output for quality, accuracy, or other + * characteristics. This event SHOULD be parented to GenAI operation span being evaluated when + * possible or set {@code gen_ai.response.id} when span id is not available. + */ + public static final String GEN_AI_EVALUATION_RESULT = "gen_ai.evaluation.result"; + + /** + * This event describes the system instructions passed to the GenAI model. + * + * @deprecated Chat history is reported on {@code gen_ai.system_instructions} attribute on spans + * or {@code gen_ai.client.inference.operation.details} event. + */ + @Deprecated public static final String GEN_AI_SYSTEM_MESSAGE = "gen_ai.system.message"; + + /** + * This event describes the response from a tool or function call passed to the GenAI model. + * + * @deprecated Chat history is reported on {@code gen_ai.input.messages} attribute on spans or + * {@code gen_ai.client.inference.operation.details} event. + */ + @Deprecated public static final String GEN_AI_TOOL_MESSAGE = "gen_ai.tool.message"; + + /** + * This event describes the user message passed to the GenAI model. + * + * @deprecated Chat history is reported on {@code gen_ai.input.messages} attribute on spans or + * {@code gen_ai.client.inference.operation.details} event. + */ + @Deprecated public static final String GEN_AI_USER_MESSAGE = "gen_ai.user.message"; + + private GenAiIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingEvents.java new file mode 100644 index 00000000..d5efeea0 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingEvents.java @@ -0,0 +1,43 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class HttpIncubatingEvents { + /** + * This event represents an exception that occurred during an HTTP client request, such as network + * failures, timeouts, or other errors that prevent the request from completing successfully. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during HTTP client operations. + * Instrumentations SHOULD set the severity to WARN (severity number 13) when recording this + * event. Some HTTP client frameworks generate artificial exceptions for non-successful HTTP + * status codes (e.g., 404 Not Found). When possible, instrumentations SHOULD NOT record these + * artificial exceptions, or SHOULD set the severity to DEBUG (severity number 5). + * Instrumentations MAY provide a configuration option to populate exception events with the + * attributes captured on the corresponding HTTP client span. + */ + public static final String HTTP_CLIENT_REQUEST_EXCEPTION = "http.client.request.exception"; + + /** + * This event represents an exception that occurred during HTTP server request processing, such as + * application errors, internal failures, or other exceptions that prevent the server from + * successfully handling the request. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during HTTP server request + * processing. Instrumentations SHOULD set the severity to ERROR (severity number 17) when + * recording this event. Instrumentations MAY provide a configuration option to populate exception + * events with the attributes captured on the corresponding HTTP server span. + */ + public static final String HTTP_SERVER_REQUEST_EXCEPTION = "http.server.request.exception"; + + private HttpIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingEvents.java new file mode 100644 index 00000000..486b1600 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingEvents.java @@ -0,0 +1,73 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class MessagingIncubatingEvents { + /** + * This event represents an exception that occurred during a messaging create operation. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during a messaging create operation. + * Instrumentations SHOULD set the severity to WARN (severity number 13) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding messaging create span. + */ + public static final String MESSAGING_CREATE_EXCEPTION = "messaging.create.exception"; + + /** + * This event represents an exception that occurred during messaging process operations. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during messaging process operations. + * Instrumentations SHOULD set the severity to ERROR (severity number 17) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding messaging process span. + */ + public static final String MESSAGING_PROCESS_EXCEPTION = "messaging.process.exception"; + + /** + * This event represents an exception that occurred during a messaging receive operation. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during a messaging receive operation. + * Instrumentations SHOULD set the severity to WARN (severity number 13) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding messaging receive span. + */ + public static final String MESSAGING_RECEIVE_EXCEPTION = "messaging.receive.exception"; + + /** + * This event represents an exception that occurred during a messaging send operation. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during a messaging send operation. + * Instrumentations SHOULD set the severity to WARN (severity number 13) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding messaging send span. + */ + public static final String MESSAGING_SEND_EXCEPTION = "messaging.send.exception"; + + /** + * This event represents an exception that occurred during a messaging settle operation. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during a messaging settle operation. + * Instrumentations SHOULD set the severity to WARN (severity number 13) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding messaging settle span. + */ + public static final String MESSAGING_SETTLE_EXCEPTION = "messaging.settle.exception"; + + private MessagingIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingEvents.java new file mode 100644 index 00000000..778241df --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingEvents.java @@ -0,0 +1,53 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class RpcIncubatingEvents { + /** + * This event represents an exception that occurred during an outgoing RPC call, such as network + * failures, timeouts, serialization errors, or other errors that prevent the call from completing + * successfully. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during RPC client call operations. + * Instrumentations SHOULD set the severity to WARN (severity number 13) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding RPC client span. + */ + public static final String RPC_CLIENT_CALL_EXCEPTION = "rpc.client.call.exception"; + + /** + * Describes a message sent or received within the context of an RPC call. + * + *
Notes: + * + *
In the lifetime of an RPC stream, an event for each message sent/received on client and + * server spans SHOULD be created. In case of unary calls message events SHOULD NOT be recorded. + * + * @deprecated Deprecated, no replacement at this time. + */ + @Deprecated public static final String RPC_MESSAGE = "rpc.message"; + + /** + * This event represents an exception that occurred during incoming RPC call processing, such as + * application errors, internal failures, or other exceptions that prevent the server from + * successfully handling the call. + * + *
Notes: + * + *
This event SHOULD be recorded when an exception occurs during RPC server call processing. + * Instrumentations SHOULD set the severity to ERROR (severity number 17) when recording this + * event. Instrumentations MAY provide a configuration option to populate exception events with + * the attributes captured on the corresponding RPC server span. + */ + public static final String RPC_SERVER_CALL_EXCEPTION = "rpc.server.call.exception"; + + private RpcIncubatingEvents() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SessionIncubatingEvents.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SessionIncubatingEvents.java new file mode 100644 index 00000000..6dd4c294 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SessionIncubatingEvents.java @@ -0,0 +1,41 @@ +/* + * 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/IncubatingSemanticEvents.java.j2 +@SuppressWarnings("unused") +public final class SessionIncubatingEvents { + /** + * Indicates that a session has ended. + * + *
Notes: + * + *
For instrumentation that tracks user behavior during user sessions, a {@code session.end} + * event SHOULD be emitted every time a session ends. When a session ends and continues as a new + * session, this event SHOULD be emitted prior to the {@code session.start} event. + */ + public static final String SESSION_END = "session.end"; + + /** + * Indicates that a new session has been started, optionally linking to the prior session. + * + *
Notes: + * + *
For instrumentation that tracks user behavior during user sessions, a {@code session.start} + * event MUST be emitted every time a session is created. When a new session is created as a + * continuation of a prior session, the {@code session.previous_id} SHOULD be included in the + * event. The values of {@code session.id} and {@code session.previous_id} MUST be different. When + * the {@code session.start} event contains both {@code session.id} and {@code + * session.previous_id} fields, the event indicates that the previous session has ended. If the + * session ID in {@code session.previous_id} has not yet ended via explicit {@code session.end} + * event, then the consumer SHOULD treat this continuation event as semantically equivalent to + * {@code session.end(session.previous_id)} and {@code session.start(session.id)}. + */ + public static final String SESSION_START = "session.start"; + + private SessionIncubatingEvents() {} +} diff --git a/semconv-incubating/src/test/java/io/opentelemetry/semconv/incubating/IncubatingAvailabilityTest.java b/semconv-incubating/src/test/java/io/opentelemetry/semconv/incubating/IncubatingAvailabilityTest.java index 253e0ed0..3001e47d 100644 --- a/semconv-incubating/src/test/java/io/opentelemetry/semconv/incubating/IncubatingAvailabilityTest.java +++ b/semconv-incubating/src/test/java/io/opentelemetry/semconv/incubating/IncubatingAvailabilityTest.java @@ -93,6 +93,24 @@ void available() { isValidClass("io.opentelemetry.semconv.SchemaUrls"); } + @Test + void availableEvents() { + isValidClass("io.opentelemetry.semconv.incubating.AppIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.AzIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.AzureIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.BrowserIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.DbIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.DeviceIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.ExceptionIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.FaasIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.FeatureFlagIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.GenAiIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.HttpIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.MessagingIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.RpcIncubatingEvents"); + isValidClass("io.opentelemetry.semconv.incubating.SessionIncubatingEvents"); + } + private static void isValidClass(String fqcn) { Class> clazz = null; try {