geoipprocessor

package module
v0.107.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

README

GeoIP Processor

Status
Stability development: traces, metrics, logs
Distributions []
Issues Open issues Closed issues
Code Owners @andrzej-stencel, @michalpristas, @rogercoll

Description

The geoIP processor geoipprocessor enhances resource attributes by appending information about the geographical location of an IP address. To add geographical information, the IP address must be included in the resource attributes using the source.address semantic conventions key attribute.

Geographical location metadata

The following resource attributes will be added if the corresponding information is found:

  * geo.city_name
  * geo.postal_code
  * geo.country_name
  * geo.country_iso_code
  * geo.continent_name
  * geo.continent_code
  * geo.region_name
  * geo.region_iso_code
  * geo.timezone
  * geo.location.lat
  * geo.location.lon

Configuration

The following settings must be configured:

  • providers: A map containing geographical location information providers. These providers are used to search for the geographical location attributes associated with an IP. Supported providers:

Examples

processors:
    # processor name: geoip
    geoip:
      providers:
        maxmind:
          database_path: /tmp/mygeodb

Documentation

Overview

Package geoipprocessor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() processor.Factory

NewFactory creates a new processor factory with default configuration, and registers the processors for metrics, traces, and logs.

Types

type Config

type Config struct {
	// Providers specifies the sources to extract geographical information about a given IP.
	Providers map[string]provider.Config `mapstructure:"-"`
}

Config holds the configuration for the GeoIP processor.

func (*Config) Unmarshal added in v0.105.0

func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error

Unmarshal a config.Parser into the config struct.

func (*Config) Validate

func (cfg *Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL