-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processor/geoipprocessor] Read both the client.address and the sourc…
…e.address attributes
- Loading branch information
1 parent
22cd8a2
commit dd1e8cf
Showing
9 changed files
with
483 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
processor/geoipprocessor/testdata/attribute_client_address/input-logs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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 | ||
body: | ||
stringValue: hello one | ||
spanId: "" | ||
traceId: "" | ||
scope: {} |
72 changes: 72 additions & 0 deletions
72
processor/geoipprocessor/testdata/attribute_client_address/input-metrics.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
39 changes: 39 additions & 0 deletions
39
processor/geoipprocessor/testdata/attribute_client_address/input-traces.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
resourceSpans: | ||
- resource: | ||
attributes: | ||
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 | ||
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: "" |
56 changes: 56 additions & 0 deletions
56
processor/geoipprocessor/testdata/attribute_client_address/output-logs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: {} |
Oops, something went wrong.