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

[IDEA] Transformer Logging Not Consistent #5524

Open
joshmc82 opened this issue Nov 8, 2022 · 3 comments
Open

[IDEA] Transformer Logging Not Consistent #5524

joshmc82 opened this issue Nov 8, 2022 · 3 comments
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-9615 triaged

Comments

@joshmc82
Copy link

joshmc82 commented Nov 8, 2022

Describe the bug
Source and destination transformers do not log to the Server Log console (or mirth.log on the server). This presents challenges when integrating with log aggregation products.

To Reproduce

  1. Create a new channel with any data types (I chose RAW)
  2. Add a source transformer step with javascript
  3. Add code to manually throw an error throw "source transformer error"
  4. Send any message to your channel
  5. Observe there is no log entry on your server or your Administrator Server log tab.

This does not happen on response transformers. If you put the throw in your response transformer, it will display in the server log.

Expected behavior
ALL transformer steps should log an error in the server log. The behavior across transformers should be consistent.

Actual behavior
No entry gets added to the server log.

Screenshots
Sample channel attached

Environment (please complete the following information):

  • OS: Linux (CentOS/Rocky Linux, Alpine)
  • Java Distribution/Version: OpenJDK 11, Java 8
  • Connect Version: 3.10.1, 3.12, 4.0.1, 4.1.1

Workaround(s)
Have to wrap every JS Transformer Step in a try/catch block and add a logger.error statement to log out the exception.

Example Channel Attached (modified version of channel from jonb to demonstrate the issue)
Pruner Experiment.zip

@joshmc82 joshmc82 added the bug Something isn't working label Nov 8, 2022
@joshmc82 joshmc82 changed the title [BUG] Your Issue Title [BUG] Transformer Logging Not Consistent Nov 8, 2022
@lmillergithub lmillergithub added triaged enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-9615 and removed bug Something isn't working labels Nov 9, 2022
@lmillergithub lmillergithub changed the title [BUG] Transformer Logging Not Consistent [IDEA] Transformer Logging Not Consistent Nov 9, 2022
@pladesma pladesma added the Fix-Commited Issue fixed and will be available in milestone label Mar 1, 2023
@pladesma pladesma added this to the 4.3.0 milestone Mar 1, 2023
@tonygermano
Copy link
Collaborator

Not sure if I agree that all transformers should go to the server log. These are channel/message errors, and they get logged with the message. It could make for a very busy server log with no good way to filter what you don't want to see. Transformer errors are also more likely to unintentionally contain PHI, which many people would not want going to the server logs.

@pladesma can you share more about the Fix that was committed next week and how this issue was addressed?

@narupley
Copy link
Collaborator

narupley commented Mar 7, 2023

This is a good point. We may want to hold off on this for 4.3 and think of a better solution.

We probably want to make this consistent, but the other way actually, where none of the message-specific scripts send errors to the server log when an exception gets thrown. The deploy/undeploy scripts still should, because those are not message-specific.

And then, perhaps we could add an option in the channel settings so you can decide whether or not you want message script-thrown errors to be sent to the server log.

Of course this would be less of a problem if we had better ways to filter the server log in the UI, but that would be a larger and separate issue.

@joshmc82
Copy link
Author

joshmc82 commented Mar 7, 2023

I like the idea of it being a setting we could toggle on and off by channel. It could even be off by default to prevent any unintentional logging.

@jdonextgen jdonextgen removed the Fix-Commited Issue fixed and will be available in milestone label Mar 8, 2023
@jdonextgen jdonextgen modified the milestones: 4.3.0, Future Planned Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-9615 triaged
Projects
None yet
Development

No branches or pull requests

6 participants