Skip to content
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

Add modify_fields processor and use it to set logName #474

Merged
merged 55 commits into from
Apr 14, 2022

Conversation

quentinmit
Copy link
Member

@quentinmit quentinmit commented Mar 17, 2022

Major changes in this branch:

  • Refactor exclude_logs and filter parsing to be more consistent with Cloud Logging syntax
  • Use Lua for most exclude_logs and modify_fields conditions
  • Add modify_fields processor
    • Source value: move_from, copy_from, static_value
    • default_value if source value is unset
    • map_values, type to transform the values
    • omit_if to conditionally remove a field
  • Set logName using the new processor

@quentinmit quentinmit requested a review from qingling128 March 17, 2022 20:27
@quentinmit quentinmit force-pushed the quentin-logtransform branch from c3fb21d to cc99f52 Compare March 17, 2022 22:38
@quentinmit quentinmit force-pushed the quentin-logtransform branch from 2ade241 to 3c9748a Compare March 21, 2022 18:46
@quentinmit quentinmit force-pushed the quentin-logtransform branch from f03f58a to 8ae8016 Compare April 8, 2022 20:18
@quentinmit quentinmit marked this pull request as ready for review April 12, 2022 19:14
// Cloud Logging's filter syntax has extremely weird rules around quoting/escaping
//
// A "text" is a literal that is not surrounded by double quotes. A
// test may contain a small number of special characters, must start
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// test may contain a small number of special characters, must start
// text may contain a small number of special characters, must start

Copy link
Contributor

@qingling128 qingling128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did another pass and resolved some open threads. The only remaining things:

LGTM modulo the two things above are addressed.

Copy link
Contributor

@qingling128 qingling128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@quentinmit quentinmit changed the title Add modify_fields processor and use it to set logName and instrumentation_source Add modify_fields processor and use it to set logName Apr 14, 2022
@quentinmit quentinmit merged commit 1b1cf03 into master Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants