-
Notifications
You must be signed in to change notification settings - Fork 897
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
Add Resource browser and app attributes, clarify device attributes as client-side only #2115
Changes from all commits
a07e596
51b548f
31e3e4e
edad422
9801b85
9085bce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ This document defines standard attributes for resources. These attributes are ty | |
## TODOs | ||
|
||
* Add more compute units: AppEngine unit, etc. | ||
* Add Web Browser. | ||
* Decide if lower case strings only. | ||
* Consider to add optional/required for each attribute and combination of attributes | ||
(e.g when supplying a k8s resource all k8s may be required). | ||
|
@@ -91,6 +90,31 @@ namespace = Company | |
service.name = Shop.shoppingcart | ||
``` | ||
|
||
## App | ||
|
||
**type:** `app` | ||
|
||
**Description:** A client application instance. | ||
|
||
<!-- semconv service --> | ||
| Attribute | Type | Description | Examples | Required | | ||
|---|---|---|---|---| | ||
| `app.name` | string | Logical name of the client application. [1] | `web storefront` | Yes | | ||
| `app.namespace` | string | A namespace for `app.name`. [2] | `Shop` | No | | ||
| `app.bundle` | string | Name of the bundle or package. [3] | `ShopApplication`, `com.example.ShopApplication` | No | | ||
| `app.version` | string | The version string of the app build or implementation. This can include more verbose information, such as the build number. [4] | `2.0.0` | No | | ||
| `app.short_version` | string | Human-readable version or version used to identify a release to end users. [5] | `10.14.1` | No | | ||
|
||
**[1]:** MUST be the same for all instances of the application running on individual client devices. If the value was not specified, SDKs MUST fallback to `unknown_application`. | ||
|
||
**[2]:** A string value having a meaning that helps to distinguish a group of client applications, for example the team name that owns a group of applications or web site name that consists of multiple components. `app.name` is expected to be unique within the same namespace. If `app.namespace` is not specified in the Resource then `app.name` is expected to be unique for all applications that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it correct to say that one app can belong to only one app.namespace? In order words, a single app.namespace can have multiple apps, or app.name(s) but an app.name can only belong to one namespace? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about the situation (real world asks from customers) who are capturing telemetry from browser applications with large surface area (hundreds of different screens), built and maintained by different teams but all packaged in one user-facing UI. These customers want to have different Considering that resources are immutable by the spec, we cannot change the Wonder what is the recommended path forward to support such cases? Relaxing spec requirements on resource immutability maybe? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding onto above, another case where updating resource would be useful when adding user identifiying attributes like If not mutating the resource then at least swapping out the currently attached Resource on TracerProvider / MeterProvider / ... so any new spans afterwards would use the new state / easily differentiated based on different Resource instance There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
**[3]:** For iOS bundles, this equates to the `CFBundleName` property, and for Android to the `android:package` attribute. | ||
|
||
**[4]:** For iOS bundles, this equates to the `CFBundleVersion` property, and for Android to the `android:versionCode` attribute. | ||
|
||
**[5]:** For iOS bundles, this equates to the `CFBundleShortVersionString` property, and for Android to the `android:versionName` attribute. | ||
|
||
## Telemetry SDK | ||
|
||
**type:** `telemetry.sdk` | ||
|
@@ -151,11 +175,12 @@ Attributes defining a computing instance (e.g. host): | |
Attributes defining a running environment (e.g. Operating System, Cloud, Data Center, Deployment Service): | ||
|
||
- [Operating System](./os.md) | ||
- [Device](./device.md) | ||
- [Device](./device.md) (client-side) | ||
- [Cloud](./cloud.md) | ||
- Deployment: | ||
- [Deployment Environment](./deployment_environment.md) | ||
- [Kubernetes](./k8s.md) | ||
- [Browser](./browser.md) | ||
|
||
## Version attributes | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Browser | ||
|
||
**Status**: [Experimental](../../document-status.md) | ||
|
||
**type:** `browser` | ||
|
||
**Description**: The web browser in which the application represented by the resource is running. The `browser.*` attributes MUST be used only for resources that represent applications running in a web browser. The presence of these attributes is intended to identify client-side telemetry. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should spec have semconv for things that are currently mostly added during ingest? I don't think anyone parses useragent client side and there is currently no other way of getting the browser version etc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe indeed worth calling out the specific case for the browser telemetry, where the information in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can make the change. However, I wonder if that will make it unclear whether an SDK should implement collecting these values. I think if we assume that all browsers will send these headers, then the SDKs will not be sending any of these attributes, and we might as well not define them? |
||
<!-- semconv device --> | ||
| Attribute | Type | Description | Examples | Required | | ||
|---|---|---|---|---| | ||
| `browser.name` | string | The web browser name | `Chrome` | No | | ||
| `browser.version` | string | The web browser version | `90` | No | | ||
| `browser.platform` | string | The operating system | `Windows` | No | | ||
| `browser.mobile` | boolean | Flag indicating a mobile device | | No | | ||
| `browser.user_agent` | string | Full user-agent string provided by the browser [1] | `'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36'` | No | | ||
|
||
**[1]:** The user-agent value should be provided only from browsers that do not have a mechanism to retrieve name, version, and platform individually (for example from the User-Agent Client Hints API). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Snake case is recommended for words in attribute names, so browser.userAgent should be browser.user_agent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this different from existing
service.*
attributes?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An app is not a service. It has different qualitative properties and behaviors. Separating the namespaces will allow backends to account for these differences and treat RUM signals differently.