-
Notifications
You must be signed in to change notification settings - Fork 78
[confgenerator] Add parse_regex in otel logging.
#1930
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
[confgenerator] Add parse_regex in otel logging.
#1930
Conversation
c47c9a5 to
648251d
Compare
c674e32 to
7b90c3a
Compare
7b90c3a to
ba974ed
Compare
3a98ac7 to
e3d98df
Compare
785484a to
ba509d5
Compare
parse_regex in otel logging.parse_regex in otel logging.
ba509d5 to
a97c696
Compare
955bf0f to
d5f80a8
Compare
confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/input.yaml
Outdated
Show resolved
Hide resolved
f703fd3 to
58503fd
Compare
confgenerator/logging_processors.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to address this in a followup PR:
I would like us to be a little smarter about whether we use onigiruma for the regex. For this code, we can just check if the regex compiles:
output := ottl.ExtractPatternsRubyRegex(fromAccessor, p.Regex)
if _, err := regexp.Compile(p.Regex); err == nil {
// If it compiles as a Go regex, use the built-in parser
output = ottl.ExtractPatterns(fromAccessor, p.Regex)
}
// ...
cachedParsedRegex.SetIf(output, fromAccessor.IsPresent()),
I also want to expose this (whether or not a regex is Go-compatible) as a feature flag so we can track this across customer deployments.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do this in a followup PR. Created tracker for this in : b/436898109.
58503fd to
06bc949
Compare
…s in otel logging.
…he" processor since `apache_access` is supported now.
e74de76 to
19f87d3
Compare
|
All integration test failures are unrelated, |
Description
Adding
parse_regexsupport on Otel Logging. This is based on theOTTLfunctionExtractPatternsRubyRegexadded in GoogleCloudPlatform/opentelemetry-operations-collector#350.Details to consider
googlecloudexporterwhen ishttpRequest.statusset aninteger.output_otel.yamlwith missinghttpRequestmap.httpRequest.statusinteger value. opentelemetry-operations-go#1062.There is an issue inUbuntu Jammynot finding theIANA Time Zone databaseso settingTZ=America/Los_Angeleswas not working in transformation tests :The Otel docs suggests addingtime/tzadatain the Collector Build. This is the best solution.I've installedtzdatadirectly which works, but may not be the best solution overall.More details in Updating opentelemetry-operantions-collector to bring googleclientauth #2012 (comment).Related issue
b/434196968
How has this been tested?
Checklist: