Skip to content

Commit

Permalink
Update pkg/ottl/ottlfuncs/README.md
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
  • Loading branch information
pchila and TylerHelmuth authored Aug 12, 2024
1 parent 7538cf0 commit bb5c618
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/ottl/ottlfuncs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1552,12 +1552,15 @@ Examples:

`UserAgent(value)`

The `UserAgent` Converter parses the string argument trying to match it against well-known user-agent strings as defined
[here](https://github.com/ua-parser/uap-core/blob/master/regexes.yaml)
The `UserAgent` Converter parses the string argument trying to match it against well-known user-agent strings.

`value` is a string or a path to a string. If `value` is not a string an error is returned.

The results of the parsing are returned as a map containing `user_agent.name`, `user_agent.version` and `user_agent.original`
as defined in semconv v1.25.0.

Parsing is done using the [uap-go package](github.com/ua-parser/uap-go). The specific formats it recognizes can be found [here](https://github.com/ua-parser/uap-core/blob/master/regexes.yaml).

Examples:

- `UserAgent("curl/7.81.0")`
Expand Down

0 comments on commit bb5c618

Please sign in to comment.