forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processor/geoip] Initial implementation (open-telemetry#33319)
**Description:** <Describe what has changed.> This is the initial implementation of the GeoIP processor. Note that it will still be a NOP (No Operation) from the user's perspective, as no Geo data providers are implemented [nor can be configured yet](open-telemetry#33268). However, this implementation aims to provide an overview of the processor's logic. The logic is the same for all signals (traces, metrics, and logs). For each signal, the processor follows these steps: 1. Locate an IP address attribute within the resource attributes. If not found, continue; if parsing the IP fails, return an error. By default, the IP address must be included within the `source.address` attribute key, see: https://github.com/open-telemetry/semantic-conventions/blob/v1.26.0/docs/general/attributes.md#source 2. Retrieve the geo-location metadata associated with the IP address using the available GeoProviders. At the moment, no additional check is done on the attributes returned by the providers. In a future PR, the processor will need to validate that all attributes follow the Geo semantic conventions. 3. Append the set of geo attributes to the resource attributes. The `processor/geoipprocessor/internal/provider/geoipprovider.go` file contains an initial interface proposal for the Geo providers. A mock implementation can be found in the geoip_processor_test.go file. **Link to tracking Issue:** open-telemetry#32663 **Testing:** Unit tests for the signals process **Documentation:** Should we update the README with the available configuration once it becomes operational? --------- Co-authored-by: Tiffany Hrabusa <[email protected]>
- Loading branch information
Showing
8 changed files
with
388 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 initial processing based on source.address resource attribute | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [32663] | ||
|
||
# (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: [] |
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
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
Oops, something went wrong.