Skip to content

Conversation

@mcoburnmx
Copy link
Contributor

@mcoburnmx mcoburnmx commented Oct 8, 2024

Summary of Changes

Added the PathRequestLoggingFilter to log incoming requests to a Path connector in OpenSearch (e.g. requests from Synchronicity) including the connector's response. Added support for masking out sensitive fields in the MDX model separately from the upstream request logger LogValueMasker so that masker regular expressions in one do not affect the other.

Note that this requires these path-core changes as well.

Fixes # MC-3689

Public API Additions/Changes

Nothing public was modified; however, the FilterOrderSequence was updated to include the PathRequestLoggingFilter so any connector that picks up these changes will automatically start using the PathRequestLoggingFilter. To actually get the connector to output the logs changes like this will need to made to add an IncomingLogstash appender and reference it from the "sandbox,qa,integration,production" Spring profile. For local development purposes you can reference the appender from the "development" Spring profile.

Downstream Consumer Impact

This has an indirect way of impacting any connector that picks up these changes so careful testing locally and after deploying to pre-prod is recommended.

How Has This Been Tested?

I added unit tests and also tested this out with a connector by adding a reference to the IncomingLogstash appender from the "development" Spring profile and ran the Arsenal test suite locally. Then I inspected the log for each incoming request to the Path connector initiated by Arsenal to confirm that the logstasher fields were assigned the expected values and that masking was leveraged where expected. I recommend another Path developer vets out these changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • [] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@mcoburnmx mcoburnmx force-pushed the mpc/mc-3689 branch 3 times, most recently from 6e71aef to 2193207 Compare October 9, 2024 17:53
@mcoburnmx mcoburnmx force-pushed the mpc/mc-3689 branch 6 times, most recently from 8d38b36 to 6ad8440 Compare January 31, 2025 19:16
@meotch meotch marked this pull request as ready for review April 16, 2025 15:36
Copy link

@RyanJones08 RyanJones08 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 have a way to disable these if testing local

@meotch
Copy link

meotch commented Apr 30, 2025

Do we have a way to disable these if testing local

Yes, we only configure the logger in logback for sand/qa/int/prod. It is turned off locally by default.

See https://gitlab.com/mxtechnologies/mx/experiences/path/path-connector-hancock-whitney/-/merge_requests/527 for an example of how logback logger will be configured

@meotch meotch merged commit 87239b4 into master Apr 30, 2025
4 checks passed
@meotch meotch deleted the mpc/mc-3689 branch April 30, 2025 20:28
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.

5 participants