You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current extracted attributes are user_agent.name, user_agent.version and user_agent.original. But more information can be extracted from the user_agent.original string, like the OS related information.
This functionally would be very helpful for logs/metrics analytics, for example, a Nginx Ingress Controller log record contains the user-agent, this function could be configured in the collector to extract the OS information from all Nginx logs. Dashboards and alerts can be built over this information; OS with most errors? Which are the most common OS versions? etc.
The text was updated successfully, but these errors were encountered:
It looks like the UA parser provides a function to parse Os info from a user agent string.
In https://github.com/ua-parser/uap-core/blob/master/tests/test_os.yaml I found various user agent strings; however all expected test results consist of family, major, minor, patch and patch_minor and not type, name, version, build_id and description. So there is no 1:1 mapping between the two.
As a first iteration we could map:
user_agent.os.name to Os.family
user_agent.os.version to {Os.major}.{Os.minor}.{Os.patch}.{Os.patch_minor}
Maybe we could also set user_agent.os.type by performing a lookup based on Os.family. e.g., Android -> Linux, WatchOS -> iOS, etc.
What about the rest of the fields you proposed though?
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
UserAgent semantic convention attributes can be extracted using the OTTL UserAgent function: https://github.com/pchila/opentelemetry-collector-contrib/tree/7da12e47eb9cf719aa593f9935bce9ba72844703/pkg/ottl/ottlfuncs#useragent (implemented in #34172)
The current extracted attributes are user_agent.name, user_agent.version and user_agent.original. But more information can be extracted from the
user_agent.original
string, like the OS related information.Semantic conventions proposal: open-telemetry/semantic-conventions#1433
Current Elastic ECS user_agent OS attributes: https://www.elastic.co/guide/en/ecs/current/ecs-user_agent.html#_field_reuse_30
Describe the solution you'd like
Extract additional fields from the user_agent:
Describe alternatives you've considered
No response
Additional context
This functionally would be very helpful for logs/metrics analytics, for example, a Nginx Ingress Controller log record contains the user-agent, this function could be configured in the collector to extract the OS information from all Nginx logs. Dashboards and alerts can be built over this information; OS with most errors? Which are the most common OS versions? etc.
The text was updated successfully, but these errors were encountered: