diff --git a/specification/logs/semantic_conventions/events/README.md b/specification/logs/semantic_conventions/events/README.md new file mode 100644 index 00000000000..976ea10160c --- /dev/null +++ b/specification/logs/semantic_conventions/events/README.md @@ -0,0 +1,7 @@ +# Events semantic conventions + +Events in OpenTelemetry are a subset of logs with specific set of semantic conventions. + +Each event MUST follow the [`events.*`](./events.md) semantic conventions, and it must follow semantic conventions specific for the type of event. + +Each event is uniquely identified by the combination of name (`event.name` attribute) and domain (`event.domain` attribute). Each subfolder in this folder represents a domain. Individual files in the subfolders represent semantic conventions specific to individual events. diff --git a/specification/logs/semantic_conventions/events/browser/README.md b/specification/logs/semantic_conventions/events/browser/README.md new file mode 100644 index 00000000000..6506cd67dbd --- /dev/null +++ b/specification/logs/semantic_conventions/events/browser/README.md @@ -0,0 +1,9 @@ +# Browser events semantic conventions + +All browser events MUST have the `event.domain` attribute set to `browser`. + +| Event name | Description | +|---|---| +| [`navigation`](./navigation.md) | Represents a page navigation event with values from the Navigation Timing API | +| [`resource`](./resource.md) | Represents a resource with values from the Resource Timing API | + \ No newline at end of file diff --git a/specification/logs/semantic_conventions/events/browser/navigation.md b/specification/logs/semantic_conventions/events/browser/navigation.md new file mode 100644 index 00000000000..da3b22423ec --- /dev/null +++ b/specification/logs/semantic_conventions/events/browser/navigation.md @@ -0,0 +1,35 @@ +# Navigation + +**Status**: [Experimental](../../../../document-status.md) + +**type:** `navigation` + +**Description**: Represents a browser navigation event. + +The following attributes MUST be set with these predefined values: + + +| Attribute | Type | Value | Requirement Level | +|---|---|---|---| +| `event.name` | string | `navigation` | Required | +| `event.domain` | string | `browser` | Required | + + +Additional attributes are mapped from the [Navigation Timing API](https://www.w3.org/TR/navigation-timing-2/#sec-PerformanceNavigationTiming). + +This list is not exhaustive and is listed as an example. All numeric and string values thar are provided by the Navigation Timing API SHOULD be included. + + +| Attribute | Type | Example | Requirement Level | +|---|---|---|---| +| `name` | string | `https://example.com/a/b` | Recommended | +| `unloadEventStart` | double | 0 | Recommended | +| `unloadEventEnd` | double | 0 | Recommended | +| `domInteractive` | double | 1002.34 | Recommended | +| `domContentLoadedEventStart` | double | 1423.54 | Recommended | +| `domContentLoadedEventEnd` | double | 1428.51 | Recommended | +| `domComplete` | double | 1512.43 | Recommended | +| `loadEventStart` | double | 1589.23 | Recommended | +| `loadEventEnd` | double | 1599.21 | Recommended | +| `type` | string | `navigate`; `reload`; `back_forward` | Recommended | +| `redirectCount` | int | 0 | Recommended | diff --git a/specification/logs/semantic_conventions/events/browser/resource.md b/specification/logs/semantic_conventions/events/browser/resource.md new file mode 100644 index 00000000000..955070e44d1 --- /dev/null +++ b/specification/logs/semantic_conventions/events/browser/resource.md @@ -0,0 +1,38 @@ +# Navigation + +**Status**: [Experimental](../../../../document-status.md) + +**type:** `resource` + +**Description**: Represents a resource observed by the browser. + +The following attributes MUST be set with these predefined values: + + +| Attribute | Type | Value | Requirement Level | +|---|---|---|---| +| `event.name` | string | `resource` | Required | +| `event.domain` | string | `browser` | Required | + + +Additional attributes are mapped from the [Resource Timing API](https://www.w3.org/TR/resource-timing-2/#sec-performanceresourcetiming). + +This list is not exhaustive and is listed as an example. All numeric and string values thar are provided by the Resource Timing API SHOULD be included. + +| Attribute | Type | Example | Requirement Level | +|---|---|---|---| +| `name` | string | `https://example.com/a/b/` | Recommended | +| `redirectStart` | double | 0 | Recommended | +| `redirectEnd` | double | 0 | Recommended | +| `fetchStart` | double | 27.80000112 | Recommended | +| `domainLookupStart` | double | 33.5 | Recommended | +| `domainLookupEnd` | double | 60.5999 | Recommended | +| `connectStart` | double | 60.5999 | Recommended | +| `connectEnd` | double | 113.7 | Recommended | +| `secureConnectionStart` | double | 72.8 | Recommended | +| `requestStart` | double | 114.3 | Recommended | +| `responseStart` | double | 738.8 | Recommended | +| `responseEnd` | double | 790.599 | Recommended | +| `transferSize` | double | 71967 | Recommended | +| `encodedBodySize` | double | 71667 | Recommended | +| `decodedBodySize` | double | 364537 | Recommended | diff --git a/specification/logs/semantic_conventions/events/events.md b/specification/logs/semantic_conventions/events/events.md new file mode 100644 index 00000000000..dc4ce6676bf --- /dev/null +++ b/specification/logs/semantic_conventions/events/events.md @@ -0,0 +1,18 @@ +# Event + +**Status**: [Experimental](../../../document-status.md) + +**type:** `event` + +**Description**: All events are described by these attributes. + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| `event.name` | string | The event name that uniquely identifies the type of the event within the domain. | `exception`; `interaction` | Required | +| `event.domain` | string | Identifies the group of related events. Each event within a domain MUST have a unique value for the event.name attribute. | `browser`; `mobile` | Recommended | +| `event.data` | any | It is recommended that event attributes are sent as a nested object value in this attribute. [1] | Recommended | + + + +