-
Notifications
You must be signed in to change notification settings - Fork 1k
Logging custom annotations for PHOENIX-1198 #15
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
Conversation
… context of a user operation (PhoenixConnection is available)
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.
How about adding a custom annotation for known properties like TENANT_ID and CURRENT_SCN?
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.
Good call. Will add.
|
This would be a lot nicer if you didn't mix the logging changes with the tracing changes - the changelist would be much more succinct and to the point. Otherwise, seems like the right approach, though it could use some cleanup (docs, readability, etc) |
|
Had an offline conversation with Jesse and he had a good idea. Can we change the property name by dropping the "trace" part of it and have this instead? I don't think having "custom" in there adds anything either. How about just phoenix.annotation? Then you can use these for tracing and logging both. |
|
I like it. Good call. |
…ng-custom-annotations
…ng-custom-annotations
…ng-custom-annotations
…ng-custom-annotations
|
Merged now. |
Signed-off-by: Josh Elser <elserj@apache.org> Closes apache#15
This PR adds custom annotations to log lines generated in Phoenix's client-side code. It builds on PR #13 and uses the same mechanism to pass custom annotations to connections. These custom annotations are only added to client-side code logging that is within the context of a user operation (meaning a PhoenixConnection is available). No new log lines are added here. Only existing log lines are changed.
Usage:
phoenix.trace.custom.annotation.a1=v1{a1=v1} something loggedIgnore the following files here, since they are covered in PR #13: BaseTracingTestIT.java, PhoenixTracingEndToEndIT.java, TraceReader.java, Tracing.java, JDBCUtilTest.java
@jtaylor-sfdc