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

Merge geo.location.lon and geo.location.lat #1638

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 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
22 changes: 22 additions & 0 deletions .chloggen/geo_merge_lat_lon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: geo

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Merging `geo.location.lon` and `geo.location.lat` into a single `geo.location` field.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1638]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
15 changes: 13 additions & 2 deletions docs/attributes-registry/geo.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

# Geo

- [Geo Attributes](#geo-attributes)
- [Deprecated geo Attributes](#deprecated-geo-attributes)

## Geo Attributes

Geo fields can carry data about a specific location related to an event. This geolocation information can be derived from techniques such as Geo IP, or be user-supplied.
Expand All @@ -16,8 +19,7 @@ Note: Geo attributes are typically used under another namespace, such as client.
| <a id="geo-continent-code" href="#geo-continent-code">`geo.continent.code`</a> | string | Two-letter code representing continent’s name. | `AF`; `AN`; `AS` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-country-iso-code" href="#geo-country-iso-code">`geo.country.iso_code`</a> | string | Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)). | `CA` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-locality-name" href="#geo-locality-name">`geo.locality.name`</a> | string | Locality name. Represents the name of a city, town, village, or similar populated place. | `Montreal`; `Berlin` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-location-lat" href="#geo-location-lat">`geo.location.lat`</a> | double | Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). | `45.505918` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-location-lon" href="#geo-location-lon">`geo.location.lon`</a> | double | Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). | `-73.61483` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-location" href="#geo-location">`geo.location`</a> | double[] | Latitude and longitude (in that order) of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). | `[45.505918, -73.61483]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-postal-code" href="#geo-postal-code">`geo.postal_code`</a> | string | Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. | `94040` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="geo-region-iso-code" href="#geo-region-iso-code">`geo.region.iso_code`</a> | string | Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)). | `CA-QC` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

Expand All @@ -34,3 +36,12 @@ Note: Geo attributes are typically used under another namespace, such as client.
| `NA` | North America | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `OC` | Oceania | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `SA` | South America | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

## Deprecated geo Attributes

"Describes deprecated geo attributes."

| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| <a id="geo-location-lat" href="#geo-location-lat">`geo.location.lat`</a> | double | Deprecated. Use `geo.location` instead. | `45.505918` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Use `geo.location` instead. |
| <a id="geo-location-lon" href="#geo-location-lon">`geo.location.lon`</a> | double | Deprecated. Use `geo.location` instead. | `-73.61483` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Use `geo.location` instead. |
22 changes: 22 additions & 0 deletions model/geo/deprecated/registry-deprecated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
groups:
- id: registry.geo.deprecated
type: attribute_group
display_name: Deprecated geo Attributes
brief: >
"Describes deprecated geo attributes."
stability: experimental
attributes:
- id: geo.location.lon
stability: experimental
type: double
deprecated: "Use `geo.location` instead."
brief: >
Deprecated. Use `geo.location` instead.
examples: [ -73.614830 ]
- id: geo.location.lat
stability: experimental
type: double
deprecated: "Use `geo.location` instead."
brief: >
Deprecated. Use `geo.location` instead.
examples: [ 45.505918 ]
14 changes: 4 additions & 10 deletions model/geo/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,12 @@ groups:
brief: >
Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)).
examples: [ 'CA' ]
- id: geo.location.lon
- id: geo.location
stability: experimental
type: double
type: double[]
brief: >
Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).
examples: [ -73.614830 ]
- id: geo.location.lat
stability: experimental
type: double
brief: >
Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).
examples: [ 45.505918 ]
Latitude and longitude (in that order) of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).
gregkalapos marked this conversation as resolved.
Show resolved Hide resolved
examples: [ [45.505918, -73.614830] ]
- id: geo.postal_code
stability: experimental
type: string
Expand Down
Loading