Skip to content

Conversation

@LujieDuan
Copy link
Contributor

@LujieDuan LujieDuan commented Nov 2, 2023

Description

Add support to set, modify, and filter by trace and spanId fields in LogEntry:

  • Both can be set via logging.googleapis.com/* if ingested as structured log (e.g., from a parse_json processor);
  • The fields can be used in modify_fields processors;
  • The fields can be referred in exclude_logs processors;

Related issue

b/308132501
#1483
#459

How has this been tested?

  1. Modified TestModifyFields to cover modify_fields usage of the new fields;
  2. Added TestLogEntrySpecialFields to verify the special fields are handled correctly;
  3. Added TestExcludeLogsModifyFieldsOrder to cover exclude_logs usage, and the processors are executed in the correct order.
  4. Unit tests updated.

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made. (doc CL prepared)
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@LujieDuan LujieDuan changed the title add traceid Support referencing the trace and spanId fields Nov 3, 2023
@LujieDuan LujieDuan force-pushed the lujieduan-add-traceid branch 4 times, most recently from 7f76608 to e164230 Compare November 9, 2023 14:34
@LujieDuan LujieDuan force-pushed the lujieduan-add-traceid branch from e164230 to 9e7e905 Compare November 9, 2023 18:35
@LujieDuan LujieDuan marked this pull request as ready for review November 10, 2023 15:44
@LujieDuan LujieDuan requested review from a team, franciscovalentecastro, hsmatulis and ridwanmsharif and removed request for a team, hsmatulis and ridwanmsharif November 10, 2023 15:44
Copy link
Contributor

@rafaelwestphal rafaelwestphal left a comment

Choose a reason for hiding this comment

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

Do we need to update the documentation anywhere?

Copy link
Contributor

@braydonk braydonk left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@braydonk
Copy link
Contributor

Do we need to update the documentation anywhere?

Yes we probably will

@braydonk
Copy link
Contributor

Added the GitHub Issues requesting this feature to related issues.

@LujieDuan LujieDuan merged commit c29f586 into master Nov 10, 2023
@ridwanmsharif ridwanmsharif deleted the lujieduan-add-traceid branch July 23, 2024 15:09
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.

4 participants