Skip to content

[chore] Add event's to the namespace registry #2382 #2464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
71 changes: 2 additions & 69 deletions docs/app/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,76 +9,9 @@ linkTitle: App
This document defines events related to client-side applications
(e.g. web apps or mobile apps).

<!-- toc -->
## Events

- [Click Events](#click-events)
- [Event: `app.screen.click`](#event-appscreenclick)
- [Event: `app.widget.click`](#event-appwidgetclick)
- [Attributes](#attributes)

<!-- tocstop -->

## Click Events

### Event: `app.screen.click`

<!-- semconv event.app.screen.click -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

The event name MUST be `app.screen.click`.

This event represents an instantaneous click on the screen of an application.

The `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.

| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`app.screen.coordinate.x`](/docs/registry/attributes/app.md) | int | The x (horizontal) coordinate of a screen coordinate, in screen pixels. | `0`; `131` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`app.screen.coordinate.y`](/docs/registry/attributes/app.md) | int | The y (vertical) component of a screen coordinate, in screen pixels. | `12`; `99` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Event: `app.widget.click`

<!-- semconv event.app.widget.click -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

The event name MUST be `app.widget.click`.

This event indicates that an application widget has been clicked.

Use this event to indicate that visual application component has been clicked, typically through a user's manual interaction.

| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`app.widget.id`](/docs/registry/attributes/app.md) | string | An identifier that uniquely differentiates this widget from other widgets in the same application. [1] | `f9bc787d-ff05-48ad-90e1-fca1d46130b3`; `submit_order_1829` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`app.screen.coordinate.x`](/docs/registry/attributes/app.md) | int | The x (horizontal) coordinate of a screen coordinate, in screen pixels. | `0`; `131` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`app.screen.coordinate.y`](/docs/registry/attributes/app.md) | int | The y (vertical) component of a screen coordinate, in screen pixels. | `12`; `99` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`app.widget.name`](/docs/registry/attributes/app.md) | string | The name of an application widget. [2] | `submit`; `attack`; `Clear Cart` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |

**[1] `app.widget.id`:** A widget is an application component, typically an on-screen visual GUI element.

**[2] `app.widget.name`:** A widget is an application component, typically an on-screen visual GUI element.

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
Is now described in the namespace registry.

## Attributes

Expand Down
15 changes: 4 additions & 11 deletions docs/azure/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Azure
redirect: /docs/specs/semconv/registry/namespaces/azure/event-azure-resource-log/ 301!
--->

# Semantic conventions for Azure resource logs
# Azure

**Status**: [Development][DocumentStatus]

This document describes Azure Resource Logs, see [Azure Resource Log Top-level Schema][AzureResourceSchema].

Semantic conventions are defined for the following signals:

* [Events](events.md)

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
[AzureResourceSchema]: https://learn.microsoft.com/azure/azure-monitor/essentials/resource-logs-schema#top-level-common-schema
This page has moved to
[Azure](/docs/registry/namespaces/azure/event-azure-resource-log.md).
34 changes: 33 additions & 1 deletion docs/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This document defines semantic conventions for source code.
| [`code.file.path`](/docs/registry/attributes/code.md) | string | 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. | `/usr/local/MyApplication/content_root/app/index.php` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`code.function.name`](/docs/registry/attributes/code.md) | string | 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. [1] | `com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`code.line.number`](/docs/registry/attributes/code.md) | int | 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. | `42` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`code.stacktrace`](/docs/registry/attributes/code.md) | string | 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. | `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)` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`code.stacktrace`](/docs/registry/attributes/code.md) | string | A stacktrace as a string in the natural representation for the language runtime. 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. [2] | `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)` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1] `code.function.name`:** 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
Expand All @@ -41,6 +41,38 @@ Examples:
* Rust: `playground::my_module::my_cool_func`
* C function: `fopen`

**[2] `code.stacktrace`:** The table below, adapted from [Google Cloud][gcp-error-reporting], includes
possible representations of stacktraces in various languages. The table is not
meant to be a recommendation for any particular language, although SIGs are free
to adopt them if they see fit.

| Language | Format |
| ---------- | ------------------------------------------------------------------- |
| C# | the return value of [Exception.ToString()][csharp-stacktrace] |
| Elixir | the return value of [Exception.format/3][elixir-stacktrace] |
| Erlang | the return value of [`erl_error:format`][erlang-stacktrace] |
| Go | the return value of [runtime.Stack][go-stacktrace] |
| Java | the contents of [Throwable.printStackTrace()][java-stacktrace] |
| Javascript | the return value of [error.stack][js-stacktrace] as returned by V8 |
| Python | the return value of [traceback.format_exc()][python-stacktrace] |
| Ruby | the return value of [Exception.full_message][ruby-full-message] |

Backends can use the language specified methodology for generating a stacktrace
combined with platform information from the
[telemetry sdk resource][telemetry-sdk-resource] in order to extract more fine
grained information from a stacktrace, if necessary.

[gcp-error-reporting]: https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.events/report
[java-stacktrace]: https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29
[python-stacktrace]: https://docs.python.org/3/library/traceback.html#traceback.format_exc
[js-stacktrace]: https://v8.dev/docs/stack-trace-api
[ruby-full-message]: https://docs.ruby-lang.org/en/3.4/Exception.html#method-i-full_message
[csharp-stacktrace]: https://docs.microsoft.com/dotnet/api/system.exception.tostring
[go-stacktrace]: https://pkg.go.dev/runtime/debug#Stack
[telemetry-sdk-resource]: ../resource/README.md#telemetry-sdk
[erlang-stacktrace]: https://www.erlang.org/doc/apps/stdlib/erl_error.html#format_exception/3
[elixir-stacktrace]: https://hexdocs.pm/elixir/1.14.3/Exception.html#format/3

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
Expand Down
4 changes: 2 additions & 2 deletions docs/database/oracledb.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ section.

**[12] `db.query.summary`:** if available through instrumentation hooks or if the instrumentation supports generating a query summary.

**[13] `db.query.text`:** For sanitization see [Sanitization of `db.query.text`](../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.
**[13] `db.query.text`:** 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.

**[14] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless explicitly configured and sanitized to exclude sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](../database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text MUST also NOT be collected by default unless explicitly configured. The query parameter values themselves are opt-in, see [`db.query.parameter.<key>`](../registry/attributes/db.md)).
**[14] `db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless explicitly configured and sanitized to exclude sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext). Parameterized query text MUST also NOT be collected by default unless explicitly configured. The query parameter values themselves are opt-in, see [`db.query.parameter.<key>`](/docs/registry/attributes/db.md)).

**[15] `db.stored_procedure.name`:** It is RECOMMENDED to capture the value as provided by the application
without attempting to do any case normalization.
Expand Down
2 changes: 1 addition & 1 deletion docs/exceptions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ linkTitle: Exceptions

Semantic conventions for Exceptions are defined for the following signals:

* [Exceptions on spans](exceptions-spans.md): Semantic Conventions for Exceptions associated with *spans*.
* Events: is described in the namespace registry
* [Exceptions in logs](exceptions-logs.md): Semantic Conventions for Exceptions recorded in *logs*.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
47 changes: 33 additions & 14 deletions docs/exceptions/exceptions-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ This document defines semantic conventions for recording exceptions on
[logs](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.46.0/specification/logs/api.md#emit-a-logrecord)
emitted through the [Logger API](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.46.0/specification/logs/api.md#logger).

<!-- toc -->

- [Recording an exception](#recording-an-exception)
- [Attributes](#attributes)
- [Stacktrace representation](#stacktrace-representation)

<!-- tocstop -->

## Recording an exception

Exceptions SHOULD be recorded as attributes on the
Expand Down Expand Up @@ -46,20 +38,47 @@ The table below indicates which attributes should be added to the
|---|---|---|---|---|---|
| [`exception.message`](/docs/registry/attributes/exception.md) | string | The exception message. | `Division by zero`; `Can't convert 'int' object to str implicitly` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`exception.type`](/docs/registry/attributes/exception.md) | string | 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. | `java.net.ConnectException`; `OSError` | `Conditionally Required` [2] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`exception.stacktrace`](/docs/registry/attributes/exception.md) | string | 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. | `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)` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`exception.stacktrace`](/docs/registry/attributes/exception.md) | string | 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. [3] | `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)` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1] `exception.message`:** Required if `exception.type` is not set, recommended otherwise.

**[2] `exception.type`:** Required if `exception.message` is not set, recommended otherwise.

**[3] `exception.stacktrace`:** The table below, adapted from [Google Cloud][gcp-error-reporting], includes
possible representations of stacktraces in various languages. The table is not
meant to be a recommendation for any particular language, although SIGs are free
to adopt them if they see fit.

| Language | Format |
| ---------- | ------------------------------------------------------------------- |
| C# | the return value of [Exception.ToString()][csharp-stacktrace] |
| Elixir | the return value of [Exception.format/3][elixir-stacktrace] |
| Erlang | the return value of [`erl_error:format`][erlang-stacktrace] |
| Go | the return value of [runtime.Stack][go-stacktrace] |
| Java | the contents of [Throwable.printStackTrace()][java-stacktrace] |
| Javascript | the return value of [error.stack][js-stacktrace] as returned by V8 |
| Python | the return value of [traceback.format_exc()][python-stacktrace] |
| Ruby | the return value of [Exception.full_message][ruby-full-message] |

Backends can use the language specified methodology for generating a stacktrace
combined with platform information from the
[telemetry sdk resource][telemetry-sdk-resource] in order to extract more fine
grained information from a stacktrace, if necessary.

[gcp-error-reporting]: https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.events/report
[java-stacktrace]: https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29
[python-stacktrace]: https://docs.python.org/3/library/traceback.html#traceback.format_exc
[js-stacktrace]: https://v8.dev/docs/stack-trace-api
[ruby-full-message]: https://docs.ruby-lang.org/en/3.4/Exception.html#method-i-full_message
[csharp-stacktrace]: https://docs.microsoft.com/dotnet/api/system.exception.tostring
[go-stacktrace]: https://pkg.go.dev/runtime/debug#Stack
[telemetry-sdk-resource]: ../resource/README.md#telemetry-sdk
[erlang-stacktrace]: https://www.erlang.org/doc/apps/stdlib/erl_error.html#format_exception/3
[elixir-stacktrace]: https://hexdocs.pm/elixir/1.14.3/Exception.html#format/3

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Stacktrace representation

Same as [Trace Semantic Conventions for Exceptions - Stacktrace
Representation](exceptions-spans.md#stacktrace-representation).

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
Loading
Loading