-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pkg/ottl] add User Agent parsing #34172
[pkg/ottl] add User Agent parsing #34172
Conversation
f0eb090
to
b63cd55
Compare
Hi @atoulme, @TylerHelmuth, @bogdandrutu, or @evan-bradley, this PR is failing CI on the |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
@pchila please handle the merge conflicts and merge in the latest from main |
|
Initialize a `uaparser.Parser` instance at the first UserAgent call and reuse it instead of creating a new parser for every invocation.
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
This reverts commit 6ac23c0. going for a simpler solution where the useragent parser is instantiated just before returning the anonymous ottl.ExprFunc[K] that uses it. This will prevent re-instantating the parser at each `UserAgent(...)` invocation.
@pchila we just had a release so there is a new merge conflict to handle. |
@pchila needs a changelog then we'll be good to go |
@TylerHelmuth added the changelog and now all the checks are green 🎉 |
Looks like your new dependency is conflicting with a renovatebot update that was merged. |
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Added a new ottl converter `UserAgent`: it parses an input string and matches against a [set of known UA regexes](https://github.com/ua-parser/uap-core/blob/master/regexes.yaml) to correctly identify user agent and its version **Link to tracking Issue:** open-telemetry#32434 **Testing:** Unit tests, E2E tests **Documentation:** <Describe the documentation added.> Added UserAgent description in `pkg/ottl/ottlfuncs/README.md` --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
Description:
Added a new ottl converter
UserAgent
: it parses an input string and matches against a set of known UA regexes to correctly identify user agent and its versionLink to tracking Issue: #32434
Testing: Unit tests, E2E tests
Documentation: Added UserAgent description in
pkg/ottl/ottlfuncs/README.md