diff --git a/.chloggen/geoipprocessor-client-address.yaml b/.chloggen/geoipprocessor-client-address.yaml new file mode 100644 index 000000000000..ff5cc9d5e4ba --- /dev/null +++ b/.chloggen/geoipprocessor-client-address.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: geoipprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add the `attributes` parameter and consider both `source.address` and `client.address` by default + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [37008] + +# (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: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/processor/geoipprocessor/README.md b/processor/geoipprocessor/README.md index 6d91b7b6a7d5..4c8ebc583445 100644 --- a/processor/geoipprocessor/README.md +++ b/processor/geoipprocessor/README.md @@ -14,7 +14,7 @@ ## Description -The geoIP processor `geoipprocessor` enhances the attributes of a span, log, or metric by appending information about the geographical location of an IP address. To add geographical information, the IP address must be included in the attributes using the [`source.address` semantic conventions key attribute](https://github.com/open-telemetry/semantic-conventions/blob/v1.26.0/docs/general/attributes.md#source). By default, only the resource attributes will be modified. Please refer to [config.go](./config.go) for the config spec. +The geoIP processor `geoipprocessor` enhances the attributes of a span, log, or metric by appending information about the geographical location of an IP address. To add geographical information, the IP address must be included in the attributes specified by the `attributes` configuration option (e.g., [`client.address`](https://github.com/open-telemetry/semantic-conventions/blob/v1.29.0/docs/general/attributes.md#client-attributes) and [`source.address`](https://github.com/open-telemetry/semantic-conventions/blob/v1.29.0/docs/general/attributes.md#source) by default). By default, only the resource attributes will be modified. Please refer to [config.go](./config.go) for the config spec. ### Geographical location metadata @@ -36,13 +36,14 @@ The following [resource attributes](./internal/convention/attributes.go) will be ## Configuration -The following settings must be configured: +The following settings can 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: - [maxmind](./internal/provider/maxmindprovider/README.md) -- `context`: Allows specifying the underlying telemetry context the processor will work with. Available values: - - `resource`(default): Resource attributes. +- `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` (default: `[client.address, source.address]`): An array of attribute names, which are used for the IP address lookup. ## Examples @@ -50,8 +51,9 @@ The following settings must be configured: processors: # processor name: geoip geoip: - context: resource providers: maxmind: database_path: /tmp/mygeodb + context: record + attributes: [client.address, source.address, custom.address] ``` diff --git a/processor/geoipprocessor/config.go b/processor/geoipprocessor/config.go index 03144906d360..62fcd8c1ace5 100644 --- a/processor/geoipprocessor/config.go +++ b/processor/geoipprocessor/config.go @@ -10,6 +10,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/otel/attribute" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor/internal/provider" ) @@ -43,6 +44,9 @@ type Config struct { // Context section allows specifying the source type to look for the IP. Available options: resource or record. Context ContextID `mapstructure:"context"` + + // An array of attribute names, which are used for the IP address lookup + Attributes []attribute.Key `mapstructure:"attributes"` } var ( @@ -62,6 +66,10 @@ func (cfg *Config) Validate() error { } } + if cfg.Attributes != nil && len(cfg.Attributes) == 0 { + return errors.New("the attributes array must not be empty") + } + return nil } diff --git a/processor/geoipprocessor/config_test.go b/processor/geoipprocessor/config_test.go index 746b210685fc..69d2f8bca4ce 100644 --- a/processor/geoipprocessor/config_test.go +++ b/processor/geoipprocessor/config_test.go @@ -13,6 +13,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/otelcol/otelcoltest" + "go.opentelemetry.io/otel/attribute" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor/internal/metadata" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor/internal/provider" @@ -39,6 +40,7 @@ func TestLoadConfig(t *testing.T) { Providers: map[string]provider.Config{ "maxmind": &maxmind.Config{DatabasePath: "/tmp/db"}, }, + Attributes: defaultAttributes, }, }, { @@ -48,6 +50,7 @@ func TestLoadConfig(t *testing.T) { Providers: map[string]provider.Config{ "maxmind": &maxmind.Config{DatabasePath: "/tmp/db"}, }, + Attributes: defaultAttributes, }, }, { @@ -58,6 +61,20 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, "invalid_source"), unmarshalErrorMessage: "unknown context not.an.otlp.context, available values: resource, record", }, + { + id: component.NewIDWithName(metadata.Type, "invalid_source_attributes"), + validateErrorMessage: "the attributes array must not be empty", + }, + { + id: component.NewIDWithName(metadata.Type, "custom_source_attributes"), + expected: &Config{ + Context: resource, + Providers: map[string]provider.Config{ + "maxmind": &maxmind.Config{DatabasePath: "/tmp/db"}, + }, + Attributes: []attribute.Key{"client.address", "source.address", "custom.address"}, + }, + }, } for _, tt := range tests { diff --git a/processor/geoipprocessor/factory.go b/processor/geoipprocessor/factory.go index fc2f40e0b0b2..9867c3ba87da 100644 --- a/processor/geoipprocessor/factory.go +++ b/processor/geoipprocessor/factory.go @@ -21,10 +21,13 @@ import ( var ( processorCapabilities = consumer.Capabilities{MutatesData: true} - // defaultResourceAttributes holds a list of default resource attribute keys. + // defaultAttributes holds a list of default resource attribute keys. // These keys are used to identify an IP address attribute associated with the resource. - defaultResourceAttributes = []attribute.Key{ - semconv.SourceAddressKey, // This key represents the standard source address attribute as defined in the OpenTelemetry semantic conventions. + defaultAttributes = []attribute.Key{ + // The client attributes are in use by the HTTP semantic conventions + semconv.ClientAddressKey, + // The source attributes are used when there is no client/server relationship between the two sides, or when that relationship is unknown + semconv.SourceAddressKey, } ) @@ -52,7 +55,8 @@ func getProviderFactory(key string) (provider.GeoIPProviderFactory, bool) { // createDefaultConfig returns a default configuration for the processor. func createDefaultConfig() component.Config { return &Config{ - Context: resource, + Context: resource, + Attributes: defaultAttributes, } } @@ -88,7 +92,7 @@ func createMetricsProcessor(ctx context.Context, set processor.Settings, cfg com if err != nil { return nil, err } - return processorhelper.NewMetrics(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers, set).processMetrics, processorhelper.WithCapabilities(processorCapabilities)) + return processorhelper.NewMetrics(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, providers, set).processMetrics, processorhelper.WithCapabilities(processorCapabilities)) } func createTracesProcessor(ctx context.Context, set processor.Settings, cfg component.Config, nextConsumer consumer.Traces) (processor.Traces, error) { @@ -97,7 +101,7 @@ func createTracesProcessor(ctx context.Context, set processor.Settings, cfg comp if err != nil { return nil, err } - return processorhelper.NewTraces(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers, set).processTraces, processorhelper.WithCapabilities(processorCapabilities)) + return processorhelper.NewTraces(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, providers, set).processTraces, processorhelper.WithCapabilities(processorCapabilities)) } func createLogsProcessor(ctx context.Context, set processor.Settings, cfg component.Config, nextConsumer consumer.Logs) (processor.Logs, error) { @@ -106,5 +110,5 @@ func createLogsProcessor(ctx context.Context, set processor.Settings, cfg compon if err != nil { return nil, err } - return processorhelper.NewLogs(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers, set).processLogs, processorhelper.WithCapabilities(processorCapabilities)) + return processorhelper.NewLogs(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, providers, set).processLogs, processorhelper.WithCapabilities(processorCapabilities)) } diff --git a/processor/geoipprocessor/geoip_processor.go b/processor/geoipprocessor/geoip_processor.go index c78d112c0725..3a5cdbc63a86 100644 --- a/processor/geoipprocessor/geoip_processor.go +++ b/processor/geoipprocessor/geoip_processor.go @@ -26,19 +26,17 @@ var ( // newGeoIPProcessor creates a new instance of geoIPProcessor with the specified fields. type geoIPProcessor struct { - providers []provider.GeoIPProvider - resourceAttributes []attribute.Key - logger *zap.Logger + providers []provider.GeoIPProvider + logger *zap.Logger cfg *Config } -func newGeoIPProcessor(processorConfig *Config, resourceAttributes []attribute.Key, providers []provider.GeoIPProvider, params processor.Settings) *geoIPProcessor { +func newGeoIPProcessor(processorConfig *Config, providers []provider.GeoIPProvider, params processor.Settings) *geoIPProcessor { return &geoIPProcessor{ - resourceAttributes: resourceAttributes, - providers: providers, - cfg: processorConfig, - logger: params.Logger, + providers: providers, + cfg: processorConfig, + logger: params.Logger, } } @@ -92,7 +90,7 @@ func (g *geoIPProcessor) geoLocation(ctx context.Context, ip net.IP) (attribute. // processAttributes processes a pcommon.Map by adding geolocation attributes based on the found IP address. func (g *geoIPProcessor) processAttributes(ctx context.Context, metadata pcommon.Map) error { - ipAddr, err := ipFromAttributes(g.resourceAttributes, metadata) + ipAddr, err := ipFromAttributes(g.cfg.Attributes, metadata) if err != nil { // TODO: log IP error not found if errors.Is(err, errIPNotFound) { diff --git a/processor/geoipprocessor/geoip_processor_test.go b/processor/geoipprocessor/geoip_processor_test.go index f0498b7150f8..3b8ee0e015b5 100644 --- a/processor/geoipprocessor/geoip_processor_test.go +++ b/processor/geoipprocessor/geoip_processor_test.go @@ -15,7 +15,6 @@ import ( "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.21.0" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/plogtest" @@ -82,52 +81,51 @@ var baseProviderMock = providerMock{ } var testCases = []struct { - name string - goldenDir string - context ContextID - lookupAttributes []attribute.Key + name string + goldenDir string + context ContextID + attributes []attribute.Key }{ { - name: "default source.address attribute, not found", - goldenDir: "no_source_address", - context: resource, - lookupAttributes: defaultResourceAttributes, + name: "default source.address attribute, not found", + goldenDir: "resource_no_source_address", + context: resource, }, { - name: "default source.address attribute", - goldenDir: "source_address", - context: resource, - lookupAttributes: defaultResourceAttributes, + name: "default source.address attribute", + goldenDir: "resource_source_address", + context: resource, }, { - name: "default source.address attribute no geo metadata found by providers", - goldenDir: "source_address_geo_not_found", - context: resource, - lookupAttributes: defaultResourceAttributes, + name: "default source.address attribute no geo metadata found by providers", + goldenDir: "resource_source_address_geo_not_found", + context: resource, }, { - name: "default source.ip attribute with an unspecified IP address should be skipped", - goldenDir: "unspecified_address", - context: resource, - lookupAttributes: defaultResourceAttributes, + name: "default source.ip attribute with an unspecified IP address should be skipped", + goldenDir: "resource_unspecified_address", + context: resource, }, { - name: "custom source attributes", - goldenDir: "custom_sources", - context: resource, - lookupAttributes: []attribute.Key{"ip", "host.ip"}, + name: "do not add resource attributes with an invalid ip", + goldenDir: "resource_invalid_address", + context: resource, }, { - name: "do not add resource attributes with an invalid ip", - goldenDir: "invalid_address", - context: resource, - lookupAttributes: defaultResourceAttributes, + name: "source address located in the record attributes", + goldenDir: "record_source_address", + context: record, }, { - name: "source address located in inner attributes", - goldenDir: "attribute_source_address", - context: record, - lookupAttributes: defaultResourceAttributes, + name: "client address located in the record attributes", + goldenDir: "record_client_address", + context: record, + }, + { + name: "custom address located in the record attributes", + goldenDir: "record_custom_address", + context: record, + attributes: []attribute.Key{"source.address", "client.address", "custom.address"}, }, } @@ -205,7 +203,6 @@ func TestProcessor(t *testing.T) { baseProviderMock.LocationF = func(_ context.Context, sourceIP net.IP) (attribute.Set, error) { if sourceIP.Equal(net.IPv4(1, 2, 3, 4)) { return attribute.NewSet([]attribute.KeyValue{ - semconv.SourceAddress("1.2.3.4"), attribute.String(conventions.AttributeGeoCityName, "Boxford"), attribute.String(conventions.AttributeGeoContinentCode, "EU"), attribute.String(conventions.AttributeGeoContinentName, "Europe"), @@ -226,7 +223,11 @@ func TestProcessor(t *testing.T) { for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { - cfg := &Config{Context: tt.context, Providers: map[string]provider.Config{providerKey: &providerConfigMock{}}} + var attributes []attribute.Key = defaultAttributes + if tt.attributes != nil { + attributes = tt.attributes + } + cfg := &Config{Context: tt.context, Providers: map[string]provider.Config{providerKey: &providerConfigMock{}}, Attributes: attributes} compareAllSignals(cfg, tt.goldenDir)(t) }) } diff --git a/processor/geoipprocessor/integration_test.go b/processor/geoipprocessor/integration_test.go index 57892c2a35a8..743ca473443a 100644 --- a/processor/geoipprocessor/integration_test.go +++ b/processor/geoipprocessor/integration_test.go @@ -10,6 +10,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor/internal/provider" maxmind "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor/internal/provider/maxmindprovider" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor/internal/provider/maxmindprovider/testdata" + "go.opentelemetry.io/otel/attribute" ) func TestProcessorWithMaxMind(t *testing.T) { @@ -22,7 +23,7 @@ func TestProcessorWithMaxMind(t *testing.T) { for _, tt := range testCases { t.Run("maxmind_"+tt.name, func(t *testing.T) { - cfg := &Config{Context: tt.context, Providers: map[string]provider.Config{"maxmind": &maxmindConfig}} + cfg := &Config{Context: tt.context, Providers: map[string]provider.Config{"maxmind": &maxmindConfig}, Attributes: []attribute.Key{"source.address", "client.address", "custom.address"}} compareAllSignals(cfg, tt.goldenDir)(t) }) diff --git a/processor/geoipprocessor/testdata/config.yaml b/processor/geoipprocessor/testdata/config.yaml index 01c7234a1b3c..21f3c104558c 100644 --- a/processor/geoipprocessor/testdata/config.yaml +++ b/processor/geoipprocessor/testdata/config.yaml @@ -15,3 +15,13 @@ geoip/invalid_source: maxmind: database_path: /tmp/db context: not.an.otlp.context +geoip/invalid_source_attributes: + providers: + maxmind: + database_path: /tmp/db + attributes: [] +geoip/custom_source_attributes: + providers: + maxmind: + database_path: /tmp/db + attributes: [client.address, source.address, custom.address] \ No newline at end of file diff --git a/processor/geoipprocessor/testdata/custom_sources/output-metrics.yaml b/processor/geoipprocessor/testdata/custom_sources/output-metrics.yaml deleted file mode 100644 index 092b79b2b3f7..000000000000 --- a/processor/geoipprocessor/testdata/custom_sources/output-metrics.yaml +++ /dev/null @@ -1,29 +0,0 @@ -resourceMetrics: - - resource: - attributes: - - key: host.ip - value: - stringValue: 1.2.3.4 - - key: ip - value: - stringValue: 1.2.3.4 - schemaUrl: https://test-res-schema.com/schema - scopeMetrics: - - metrics: - - gauge: - dataPoints: - - asDouble: 345 - attributes: - - key: aaa - value: - stringValue: bbb - timeUnixNano: "1000000" - name: test.gauge - schemaUrl: https://test-scope-schema.com/schema - scope: - attributes: - - key: foo - value: - stringValue: bar - name: MyTestInstrument - version: 1.2.3 diff --git a/processor/geoipprocessor/testdata/custom_sources/output-logs.yaml b/processor/geoipprocessor/testdata/record_client_address/input-logs.yaml similarity index 77% rename from processor/geoipprocessor/testdata/custom_sources/output-logs.yaml rename to processor/geoipprocessor/testdata/record_client_address/input-logs.yaml index df50e8eace83..f17f702a4d7c 100644 --- a/processor/geoipprocessor/testdata/custom_sources/output-logs.yaml +++ b/processor/geoipprocessor/testdata/record_client_address/input-logs.yaml @@ -1,15 +1,15 @@ resourceLogs: - resource: attributes: - - key: host.ip - value: - stringValue: 1.2.3.4 - key: ip value: - stringValue: 1.2.3.4 + stringValue: 1.2.2.1 scopeLogs: - logRecords: - attributes: + - key: client.address + value: + stringValue: 1.2.3.4 - key: host.name value: stringValue: HOST.ONE diff --git a/processor/geoipprocessor/testdata/record_client_address/input-metrics.yaml b/processor/geoipprocessor/testdata/record_client_address/input-metrics.yaml new file mode 100644 index 000000000000..1606146333fe --- /dev/null +++ b/processor/geoipprocessor/testdata/record_client_address/input-metrics.yaml @@ -0,0 +1,72 @@ +resourceMetrics: + - resource: + attributes: + - key: ip + value: + stringValue: 1.2.2.1 + schemaUrl: https://test-res-schema.com/schema + scopeMetrics: + - metrics: + - description: This also isn't a real metric + name: storage.amplitude + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + attributes: + - key: a + value: + stringValue: AAAA + - key: client.address + value: + stringValue: 1.2.3.4 + isMonotonic: false + unit: "1" + - name: delta.histogram.test + histogram: + aggregationTemporality: 1 + dataPoints: + - explicitBounds: [0.01, 0.1, 1, 10, 100] + timeUnixNano: "1000000" + bucketCounts: [9, 12, 17, 8, 34] + attributes: + - key: client.address + value: + stringValue: 1.2.3.4 + - name: summary.test + summary: + dataPoints: + - timeUnixNano: "1000000" + quantileValues: + - quantile: 0.25 + value: 50 + - quantile: 0.5 + value: 20 + - quantile: 0.75 + value: 75 + - quantile: 0.95 + value: 10 + attributes: + - key: client.address + value: + stringValue: 1.2.3.4 + - gauge: + dataPoints: + - asDouble: 345 + attributes: + - key: client.address + value: + stringValue: 1.2.3.4 + - key: aaa + value: + stringValue: bbb + timeUnixNano: "1000000" + name: test.gauge + schemaUrl: https://test-scope-schema.com/schema + scope: + attributes: + - key: foo + value: + stringValue: bar + name: MyTestInstrument + version: 1.2.3 diff --git a/processor/geoipprocessor/testdata/custom_sources/output-traces.yaml b/processor/geoipprocessor/testdata/record_client_address/input-traces.yaml similarity index 80% rename from processor/geoipprocessor/testdata/custom_sources/output-traces.yaml rename to processor/geoipprocessor/testdata/record_client_address/input-traces.yaml index 18b233132028..a1d181c2b6e3 100644 --- a/processor/geoipprocessor/testdata/custom_sources/output-traces.yaml +++ b/processor/geoipprocessor/testdata/record_client_address/input-traces.yaml @@ -1,12 +1,6 @@ resourceSpans: - resource: attributes: - - key: host.ip - value: - stringValue: 1.2.3.4 - - key: ip - value: - stringValue: 1.2.3.4 scopeSpans: - scope: {} spans: @@ -20,7 +14,13 @@ resourceSpans: - key: http.response.status_code value: intValue: "201" - endTimeUnixNano: "1581452773000000789" + - key: ip + value: + stringValue: 1.2.2.1 + - key: client.address + value: + stringValue: 1.2.3.4 + endTimeUnixNano: "1581452773000000789" events: - attributes: - key: event.attr1 diff --git a/processor/geoipprocessor/testdata/record_client_address/output-logs.yaml b/processor/geoipprocessor/testdata/record_client_address/output-logs.yaml new file mode 100644 index 000000000000..bc875fe99583 --- /dev/null +++ b/processor/geoipprocessor/testdata/record_client_address/output-logs.yaml @@ -0,0 +1,56 @@ +resourceLogs: + - resource: + attributes: + - key: ip + value: + stringValue: 1.2.2.1 + scopeLogs: + - logRecords: + - attributes: + - key: client.address + value: + stringValue: 1.2.3.4 + - key: host.name + value: + stringValue: HOST.ONE + - key: log.file.name + value: + stringValue: one.log + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + body: + stringValue: hello one + spanId: "" + traceId: "" + scope: {} diff --git a/processor/geoipprocessor/testdata/record_client_address/output-metrics.yaml b/processor/geoipprocessor/testdata/record_client_address/output-metrics.yaml new file mode 100644 index 000000000000..e2389712f8c9 --- /dev/null +++ b/processor/geoipprocessor/testdata/record_client_address/output-metrics.yaml @@ -0,0 +1,213 @@ +resourceMetrics: + - resource: + attributes: + - key: ip + value: + stringValue: 1.2.2.1 + schemaUrl: https://test-res-schema.com/schema + scopeMetrics: + - metrics: + - description: This also isn't a real metric + name: storage.amplitude + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + attributes: + - key: a + value: + stringValue: AAAA + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + - key: client.address + value: + stringValue: 1.2.3.4 + unit: "1" + - histogram: + aggregationTemporality: 1 + dataPoints: + - attributes: + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + - key: client.address + value: + stringValue: 1.2.3.4 + bucketCounts: + - "9" + - "12" + - "17" + - "8" + - "34" + explicitBounds: + - 0.01 + - 0.1 + - 1 + - 10 + - 100 + timeUnixNano: "1000000" + name: delta.histogram.test + - name: summary.test + summary: + dataPoints: + - attributes: + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + - key: client.address + value: + stringValue: 1.2.3.4 + quantileValues: + - quantile: 0.25 + value: 50 + - quantile: 0.5 + value: 20 + - quantile: 0.75 + value: 75 + - quantile: 0.95 + value: 10 + timeUnixNano: "1000000" + - gauge: + dataPoints: + - asDouble: 345 + attributes: + - key: aaa + value: + stringValue: bbb + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + - key: client.address + value: + stringValue: 1.2.3.4 + timeUnixNano: "1000000" + name: test.gauge + schemaUrl: https://test-scope-schema.com/schema + scope: + attributes: + - key: foo + value: + stringValue: bar + name: MyTestInstrument + version: 1.2.3 diff --git a/processor/geoipprocessor/testdata/record_client_address/output-traces.yaml b/processor/geoipprocessor/testdata/record_client_address/output-traces.yaml new file mode 100644 index 000000000000..7f9729e5cb59 --- /dev/null +++ b/processor/geoipprocessor/testdata/record_client_address/output-traces.yaml @@ -0,0 +1,70 @@ +resourceSpans: + - resource: {} + scopeSpans: + - scope: {} + spans: + - attributes: + - key: http.request.method + value: + stringValue: POST + - key: url.full + value: + stringValue: https://www.foo.bar/search?q=OpenTelemetry#SemConv + - key: http.response.status_code + value: + intValue: "201" + - key: ip + value: + stringValue: 1.2.2.1 + - key: client.address + value: + stringValue: 1.2.3.4 + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + name: span-elastic-http + parentSpanId: bcff497b5a47310f + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/geoipprocessor/testdata/custom_sources/input-logs.yaml b/processor/geoipprocessor/testdata/record_custom_address/input-logs.yaml similarity index 81% rename from processor/geoipprocessor/testdata/custom_sources/input-logs.yaml rename to processor/geoipprocessor/testdata/record_custom_address/input-logs.yaml index 33c04700e776..520a445ab7a5 100644 --- a/processor/geoipprocessor/testdata/custom_sources/input-logs.yaml +++ b/processor/geoipprocessor/testdata/record_custom_address/input-logs.yaml @@ -1,9 +1,6 @@ resourceLogs: - resource: attributes: - - key: host.ip - value: - stringValue: 1.2.3.4 - key: ip value: stringValue: 1.2.3.4 @@ -12,6 +9,9 @@ resourceLogs: - body: stringValue: "hello one" attributes: + - key: custom.address + value: + stringValue: 1.2.3.4 - key: host.name value: stringValue: HOST.ONE diff --git a/processor/geoipprocessor/testdata/custom_sources/input-metrics.yaml b/processor/geoipprocessor/testdata/record_custom_address/input-metrics.yaml similarity index 85% rename from processor/geoipprocessor/testdata/custom_sources/input-metrics.yaml rename to processor/geoipprocessor/testdata/record_custom_address/input-metrics.yaml index 9a36a49f7534..99f5060d22f6 100644 --- a/processor/geoipprocessor/testdata/custom_sources/input-metrics.yaml +++ b/processor/geoipprocessor/testdata/record_custom_address/input-metrics.yaml @@ -2,9 +2,6 @@ resourceMetrics: - schemaUrl: https://test-res-schema.com/schema resource: attributes: - - key: host.ip - value: - stringValue: 1.2.3.4 - key: ip value: stringValue: 1.2.3.4 @@ -24,6 +21,9 @@ resourceMetrics: - timeUnixNano: "1000000" asDouble: 345 attributes: + - key: custom.address + value: + stringValue: 1.2.3.4 - key: aaa value: stringValue: bbb diff --git a/processor/geoipprocessor/testdata/custom_sources/input-traces.yaml b/processor/geoipprocessor/testdata/record_custom_address/input-traces.yaml similarity index 91% rename from processor/geoipprocessor/testdata/custom_sources/input-traces.yaml rename to processor/geoipprocessor/testdata/record_custom_address/input-traces.yaml index 23eb39fc427a..665d598b371a 100644 --- a/processor/geoipprocessor/testdata/custom_sources/input-traces.yaml +++ b/processor/geoipprocessor/testdata/record_custom_address/input-traces.yaml @@ -1,9 +1,6 @@ resourceSpans: - resource: attributes: - - key: host.ip - value: - stringValue: 1.2.3.4 - key: ip value: stringValue: 1.2.3.4 @@ -11,6 +8,9 @@ resourceSpans: - scope: {} spans: - attributes: + - key: custom.address + value: + stringValue: 1.2.3.4 - key: http.request.method value: stringValue: POST diff --git a/processor/geoipprocessor/testdata/record_custom_address/output-logs.yaml b/processor/geoipprocessor/testdata/record_custom_address/output-logs.yaml new file mode 100644 index 000000000000..6ae68bc5c7cd --- /dev/null +++ b/processor/geoipprocessor/testdata/record_custom_address/output-logs.yaml @@ -0,0 +1,56 @@ +resourceLogs: + - resource: + attributes: + - key: ip + value: + stringValue: 1.2.3.4 + scopeLogs: + - logRecords: + - attributes: + - key: custom.address + value: + stringValue: 1.2.3.4 + - key: host.name + value: + stringValue: HOST.ONE + - key: log.file.name + value: + stringValue: one.log + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + body: + stringValue: hello one + spanId: "" + traceId: "" + scope: {} diff --git a/processor/geoipprocessor/testdata/record_custom_address/output-metrics.yaml b/processor/geoipprocessor/testdata/record_custom_address/output-metrics.yaml new file mode 100644 index 000000000000..6b4f8fe3d4ed --- /dev/null +++ b/processor/geoipprocessor/testdata/record_custom_address/output-metrics.yaml @@ -0,0 +1,62 @@ +resourceMetrics: + - resource: + attributes: + - key: ip + value: + stringValue: 1.2.3.4 + schemaUrl: https://test-res-schema.com/schema + scopeMetrics: + - metrics: + - gauge: + dataPoints: + - asDouble: 345 + attributes: + - key: custom.address + value: + stringValue: 1.2.3.4 + - key: aaa + value: + stringValue: bbb + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + timeUnixNano: "1000000" + name: test.gauge + schemaUrl: https://test-scope-schema.com/schema + scope: + attributes: + - key: foo + value: + stringValue: bar + name: MyTestInstrument + version: 1.2.3 diff --git a/processor/geoipprocessor/testdata/record_custom_address/output-traces.yaml b/processor/geoipprocessor/testdata/record_custom_address/output-traces.yaml new file mode 100644 index 000000000000..a6f86e6a8e18 --- /dev/null +++ b/processor/geoipprocessor/testdata/record_custom_address/output-traces.yaml @@ -0,0 +1,72 @@ +resourceSpans: + - resource: + attributes: + - key: ip + value: + stringValue: 1.2.3.4 + scopeSpans: + - scope: {} + spans: + - attributes: + - key: custom.address + value: + stringValue: 1.2.3.4 + - key: http.request.method + value: + stringValue: POST + - key: url.full + value: + stringValue: https://www.foo.bar/search?q=OpenTelemetry#SemConv + - key: http.response.status_code + value: + intValue: "201" + - key: geo.city_name + value: + stringValue: Boxford + - key: geo.continent_code + value: + stringValue: EU + - key: geo.continent_name + value: + stringValue: Europe + - key: geo.country_iso_code + value: + stringValue: GB + - key: geo.country_name + value: + stringValue: United Kingdom + - key: geo.location.lat + value: + doubleValue: 1234 + - key: geo.location.lon + value: + doubleValue: 5678 + - key: geo.postal_code + value: + stringValue: OX1 + - key: geo.region_iso_code + value: + stringValue: WBK + - key: geo.region_name + value: + stringValue: West Berkshire + - key: geo.timezone + value: + stringValue: Europe/London + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + name: span-elastic-http + parentSpanId: bcff497b5a47310f + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/geoipprocessor/testdata/attribute_source_address/input-logs.yaml b/processor/geoipprocessor/testdata/record_source_address/input-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/attribute_source_address/input-logs.yaml rename to processor/geoipprocessor/testdata/record_source_address/input-logs.yaml diff --git a/processor/geoipprocessor/testdata/attribute_source_address/input-metrics.yaml b/processor/geoipprocessor/testdata/record_source_address/input-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/attribute_source_address/input-metrics.yaml rename to processor/geoipprocessor/testdata/record_source_address/input-metrics.yaml diff --git a/processor/geoipprocessor/testdata/attribute_source_address/input-traces.yaml b/processor/geoipprocessor/testdata/record_source_address/input-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/attribute_source_address/input-traces.yaml rename to processor/geoipprocessor/testdata/record_source_address/input-traces.yaml diff --git a/processor/geoipprocessor/testdata/attribute_source_address/output-logs.yaml b/processor/geoipprocessor/testdata/record_source_address/output-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/attribute_source_address/output-logs.yaml rename to processor/geoipprocessor/testdata/record_source_address/output-logs.yaml diff --git a/processor/geoipprocessor/testdata/attribute_source_address/output-metrics.yaml b/processor/geoipprocessor/testdata/record_source_address/output-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/attribute_source_address/output-metrics.yaml rename to processor/geoipprocessor/testdata/record_source_address/output-metrics.yaml diff --git a/processor/geoipprocessor/testdata/attribute_source_address/output-traces.yaml b/processor/geoipprocessor/testdata/record_source_address/output-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/attribute_source_address/output-traces.yaml rename to processor/geoipprocessor/testdata/record_source_address/output-traces.yaml diff --git a/processor/geoipprocessor/testdata/invalid_address/input-logs.yaml b/processor/geoipprocessor/testdata/resource_invalid_address/input-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/invalid_address/input-logs.yaml rename to processor/geoipprocessor/testdata/resource_invalid_address/input-logs.yaml diff --git a/processor/geoipprocessor/testdata/invalid_address/input-metrics.yaml b/processor/geoipprocessor/testdata/resource_invalid_address/input-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/invalid_address/input-metrics.yaml rename to processor/geoipprocessor/testdata/resource_invalid_address/input-metrics.yaml diff --git a/processor/geoipprocessor/testdata/invalid_address/input-traces.yaml b/processor/geoipprocessor/testdata/resource_invalid_address/input-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/invalid_address/input-traces.yaml rename to processor/geoipprocessor/testdata/resource_invalid_address/input-traces.yaml diff --git a/processor/geoipprocessor/testdata/invalid_address/output-logs.yaml b/processor/geoipprocessor/testdata/resource_invalid_address/output-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/invalid_address/output-logs.yaml rename to processor/geoipprocessor/testdata/resource_invalid_address/output-logs.yaml diff --git a/processor/geoipprocessor/testdata/invalid_address/output-metrics.yaml b/processor/geoipprocessor/testdata/resource_invalid_address/output-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/invalid_address/output-metrics.yaml rename to processor/geoipprocessor/testdata/resource_invalid_address/output-metrics.yaml diff --git a/processor/geoipprocessor/testdata/invalid_address/output-traces.yaml b/processor/geoipprocessor/testdata/resource_invalid_address/output-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/invalid_address/output-traces.yaml rename to processor/geoipprocessor/testdata/resource_invalid_address/output-traces.yaml diff --git a/processor/geoipprocessor/testdata/no_source_address/input-logs.yaml b/processor/geoipprocessor/testdata/resource_no_source_address/input-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/no_source_address/input-logs.yaml rename to processor/geoipprocessor/testdata/resource_no_source_address/input-logs.yaml diff --git a/processor/geoipprocessor/testdata/no_source_address/input-metrics.yaml b/processor/geoipprocessor/testdata/resource_no_source_address/input-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/no_source_address/input-metrics.yaml rename to processor/geoipprocessor/testdata/resource_no_source_address/input-metrics.yaml diff --git a/processor/geoipprocessor/testdata/no_source_address/input-traces.yaml b/processor/geoipprocessor/testdata/resource_no_source_address/input-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/no_source_address/input-traces.yaml rename to processor/geoipprocessor/testdata/resource_no_source_address/input-traces.yaml diff --git a/processor/geoipprocessor/testdata/no_source_address/output-logs.yaml b/processor/geoipprocessor/testdata/resource_no_source_address/output-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/no_source_address/output-logs.yaml rename to processor/geoipprocessor/testdata/resource_no_source_address/output-logs.yaml diff --git a/processor/geoipprocessor/testdata/no_source_address/output-metrics.yaml b/processor/geoipprocessor/testdata/resource_no_source_address/output-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/no_source_address/output-metrics.yaml rename to processor/geoipprocessor/testdata/resource_no_source_address/output-metrics.yaml diff --git a/processor/geoipprocessor/testdata/no_source_address/output-traces.yaml b/processor/geoipprocessor/testdata/resource_no_source_address/output-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/no_source_address/output-traces.yaml rename to processor/geoipprocessor/testdata/resource_no_source_address/output-traces.yaml diff --git a/processor/geoipprocessor/testdata/source_address/input-logs.yaml b/processor/geoipprocessor/testdata/resource_source_address/input-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address/input-logs.yaml rename to processor/geoipprocessor/testdata/resource_source_address/input-logs.yaml diff --git a/processor/geoipprocessor/testdata/source_address/input-metrics.yaml b/processor/geoipprocessor/testdata/resource_source_address/input-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address/input-metrics.yaml rename to processor/geoipprocessor/testdata/resource_source_address/input-metrics.yaml diff --git a/processor/geoipprocessor/testdata/source_address/input-traces.yaml b/processor/geoipprocessor/testdata/resource_source_address/input-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address/input-traces.yaml rename to processor/geoipprocessor/testdata/resource_source_address/input-traces.yaml diff --git a/processor/geoipprocessor/testdata/source_address/output-logs.yaml b/processor/geoipprocessor/testdata/resource_source_address/output-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address/output-logs.yaml rename to processor/geoipprocessor/testdata/resource_source_address/output-logs.yaml diff --git a/processor/geoipprocessor/testdata/source_address/output-metrics.yaml b/processor/geoipprocessor/testdata/resource_source_address/output-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address/output-metrics.yaml rename to processor/geoipprocessor/testdata/resource_source_address/output-metrics.yaml diff --git a/processor/geoipprocessor/testdata/source_address/output-traces.yaml b/processor/geoipprocessor/testdata/resource_source_address/output-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address/output-traces.yaml rename to processor/geoipprocessor/testdata/resource_source_address/output-traces.yaml diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/input-logs.yaml b/processor/geoipprocessor/testdata/resource_source_address_geo_not_found/input-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address_geo_not_found/input-logs.yaml rename to processor/geoipprocessor/testdata/resource_source_address_geo_not_found/input-logs.yaml diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/input-metrics.yaml b/processor/geoipprocessor/testdata/resource_source_address_geo_not_found/input-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address_geo_not_found/input-metrics.yaml rename to processor/geoipprocessor/testdata/resource_source_address_geo_not_found/input-metrics.yaml diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/input-traces.yaml b/processor/geoipprocessor/testdata/resource_source_address_geo_not_found/input-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address_geo_not_found/input-traces.yaml rename to processor/geoipprocessor/testdata/resource_source_address_geo_not_found/input-traces.yaml diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/output-logs.yaml b/processor/geoipprocessor/testdata/resource_source_address_geo_not_found/output-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address_geo_not_found/output-logs.yaml rename to processor/geoipprocessor/testdata/resource_source_address_geo_not_found/output-logs.yaml diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/output-metrics.yaml b/processor/geoipprocessor/testdata/resource_source_address_geo_not_found/output-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address_geo_not_found/output-metrics.yaml rename to processor/geoipprocessor/testdata/resource_source_address_geo_not_found/output-metrics.yaml diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/output-traces.yaml b/processor/geoipprocessor/testdata/resource_source_address_geo_not_found/output-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/source_address_geo_not_found/output-traces.yaml rename to processor/geoipprocessor/testdata/resource_source_address_geo_not_found/output-traces.yaml diff --git a/processor/geoipprocessor/testdata/unspecified_address/input-logs.yaml b/processor/geoipprocessor/testdata/resource_unspecified_address/input-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/unspecified_address/input-logs.yaml rename to processor/geoipprocessor/testdata/resource_unspecified_address/input-logs.yaml diff --git a/processor/geoipprocessor/testdata/unspecified_address/input-metrics.yaml b/processor/geoipprocessor/testdata/resource_unspecified_address/input-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/unspecified_address/input-metrics.yaml rename to processor/geoipprocessor/testdata/resource_unspecified_address/input-metrics.yaml diff --git a/processor/geoipprocessor/testdata/unspecified_address/input-traces.yaml b/processor/geoipprocessor/testdata/resource_unspecified_address/input-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/unspecified_address/input-traces.yaml rename to processor/geoipprocessor/testdata/resource_unspecified_address/input-traces.yaml diff --git a/processor/geoipprocessor/testdata/unspecified_address/output-logs.yaml b/processor/geoipprocessor/testdata/resource_unspecified_address/output-logs.yaml similarity index 100% rename from processor/geoipprocessor/testdata/unspecified_address/output-logs.yaml rename to processor/geoipprocessor/testdata/resource_unspecified_address/output-logs.yaml diff --git a/processor/geoipprocessor/testdata/unspecified_address/output-metrics.yaml b/processor/geoipprocessor/testdata/resource_unspecified_address/output-metrics.yaml similarity index 100% rename from processor/geoipprocessor/testdata/unspecified_address/output-metrics.yaml rename to processor/geoipprocessor/testdata/resource_unspecified_address/output-metrics.yaml diff --git a/processor/geoipprocessor/testdata/unspecified_address/output-traces.yaml b/processor/geoipprocessor/testdata/resource_unspecified_address/output-traces.yaml similarity index 100% rename from processor/geoipprocessor/testdata/unspecified_address/output-traces.yaml rename to processor/geoipprocessor/testdata/resource_unspecified_address/output-traces.yaml