Skip to content

New component: geonameprocessor #39965

Open
@antonjim-te

Description

@antonjim-te

The purpose and use-cases of the new component

New processor to map from geoname.id into geo location attributes.

The geoname data can be accessible from http://www.geonames.org using two approaches:

  • Store all the geoname data in memory extracted from a file. More info about the file

  • Call API to get the geo location info of a geonameID

    • Public Rest API http://api.geonames.org/getJSON?geonameId=<GeoNameID>&username=<username>
      • Example result:
    "geonameId": 5128581,
    "name": "New York",
    "lat": "40.71427",
    "lng": "-74.00597",
    "countryName": "United States",
    "countryCode": "US",
    "population": 8175133,
    "adminName1": "New York",
    "adminCode1": "NY",
    "adminName2": "New York County",
    "timezone": {
      "timeZoneId": "America/New_York",
      "gmtOffset": -5,
      "dstOffset": -4
    },
    "fcode": "PPL",
    "fcl": "P",
    "continentCode": "NA",
    "elevation": null,
    "bBox": {
      "east": -73.7002721,
      "north": 40.9152555,
      "south": 40.496044,
      "west": -74.2557349
    
    • Require to cache geo location data

Example configuration for the component

processors:
    geonameprocessor:
      providers:
          file:
              geonames: /tmp/mygeodb
          api:
              geonames:
                  username: user1
              ttl: 1d
      context: record
      attributes: [geoname.id]
  • providers: GeoNames location information providers. It can be configured by file or api
  • context (default: resource): Allows specifying the underlying telemetry context the processor will work with. Available values:
    • resource: Resource attributes.
    • record: Attributes within a data point, log record or a span.
  • attributes: An array of attribute names, which contains the geoname.id value.

Telemetry data types supported

metrics, traces, logs

Code Owner(s)

No response

Sponsor (optional)

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Sponsor NeededNew component seeking sponsor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions