Skip to content
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

Added mobile carrier info related semantic conventions to span spec #1669

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ release.
- Add already specified `messaging.rabbitmq.routing_key` span attribute key to the respective YAML file.
- Clarify usage of "otel." attribute namespace. ([#1640](https://github.com/open-telemetry/opentelemetry-specification/pull/1640))
- Add possibility to disable `db.statement` via instrumentation configuration. ([#1659](https://github.com/open-telemetry/opentelemetry-specification/pull/1659))

- Add mobile related network state: `net.host.connection_type` & `net.host.carrier.*` [#1647](https://github.com/open-telemetry/opentelemetry-specification/issues/1647)
### Compatibility

### OpenTelemetry Protocol
Expand Down
21 changes: 20 additions & 1 deletion specification/trace/semantic_conventions/span-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,26 @@ the `net.peer.*` properties of a client are equal to the `net.host.*` properties
| `net.host.ip` | string | Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. | `192.168.0.1` | No |
| `net.host.port` | int | Like `net.peer.port` but for the host port. | `35555` | No |
| `net.host.name` | string | Local hostname or similar, see note below. | `localhost` | No |

| `net.host.connection_type` | string | The current network connection type in common terms | `wifi` | No |
| `net.host.carrier.name` | string | Name of the mobile carrier. | `sprint` | No |
| `net.host.carrier.mcc` | string | [Mobile country code](https://en.wikipedia.org/wiki/Mobile_country_code) | `310` | No |
| `net.host.carrier.mnc` | string | [Mobile network code](https://en.wikipedia.org/wiki/Mobile_country_code) | `001` | No |
| `net.host.carrier.icc` | string | [ISO country code (two character)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | `DE` | No |
Comment on lines +45 to +48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not "general network connection attributes", but are very specific to mobile clients.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "general" in the title is more about "low-level networking" as opposed to "protocol-specific attributes".

In any case, I think if we make them span attributes (which seems to be the best currently available option) then putting them under net.host is sensible.

Also net.host.connection_type would make sense for other clients as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iNikem do you think these should be placed in a different semantic convention document, specifically for mobile?


`net.host.connection_type` SHOULD be one of the following :

| Value | Description |
| --- | --- |
| `wifi` | connected via wifi |
| `wired` | connected via a hard-wire |
| `1G` | connected via a first gen cellular technology, such as `AMPS` or equivalent |
| `2G` | connected via a second gen cellular technology, such as `GPRS` |
| `3G` | connected via a third gen cellular technology, such as `UMTS` or `1xEV-DO` |
| `4G` | connected via a fourth gen cellular technology, such as `eHRPD` or `LTE` |
| `5G` | connected via a fifth gen cellular technology, such as `5G NR` |
| `unavailable` | network is disconnected or unavailable. |


`net.transport` MUST be one of the following:

| Value | Description |
Expand Down