Skip to content

New component: geonameprocessor #39965

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

Open
antonjim-te opened this issue May 9, 2025 · 1 comment
Open

New component: geonameprocessor #39965

antonjim-te opened this issue May 9, 2025 · 1 comment
Labels
needs triage New item requiring triage Sponsor Needed New component seeking sponsor

Comments

@antonjim-te
Copy link

antonjim-te commented May 9, 2025

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

@antonjim-te antonjim-te added Sponsor Needed New component seeking sponsor needs triage New item requiring triage labels May 9, 2025
@antonjim-te
Copy link
Author

antonjim-te commented May 9, 2025

cc @andrzej-stencel @michalpristas @rogercoll as geoipprocessor owners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New item requiring triage Sponsor Needed New component seeking sponsor
Projects
None yet
Development

No branches or pull requests

1 participant