-
Notifications
You must be signed in to change notification settings - Fork 8
feat: Support organization MDC #200
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
Solves #195 Resolving the user and organisation information requires to intervene at a late stage, much later than the logging MDCWebFilter class (after ResolveGeorchestraUserGlobalFilter). Resolving the objects would also imply a circular dependency if implemented in the logging module. So, it seems to make more sense to implement it in the main geOrchestra gateway code.
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.
Awesome
I don't know what to do about the failing builds though, they're reporting |
They're failing on all pending PRs, right ? I was concerned first, then concluded that the CI was currently a bit broken |
My first Gateway PR ! Champagne ! |
About |
Back to this PR, before thinking about merging it, I'd like your opinion guys about something:
Why so many MDCs ? Well, since the idea is to provide analytics dataviz, it will help having user-friendly labels available. I could get there some other way afterwards, but it's more complicated And now, here is my question: does it seem OK for you to have just one toggle config (user:true/false, org: true/false) for this bunch of MDCs, or do you think we should have more granular control around which ones we want (e.g. configure them one by one) ? |
|
having more granular control would mostly be to allow "downsizing" the amount of data logged, right ? i'm not sure logging firstname & lastname is relevant if you log the uid/username.. but on my platform username is while i agree changing uids is an issue, i'm not a fan of uuids either, because that requires an ldap query to resolve the "current" user associated with it, so you still need to keep track of that mapping somewhere. |
Well, that's why I wanted to log user first/last name and org full name, it's to avoid looking up on the LDAP to get nice human-friendly names. And in that case, I don't even need the username (done with uuid and human-friendly labels) I believe I remember struggling with an org shortname that had changed at some point and it causing trouble, back when I was working on CKAN-georchestra integration, so I'm thinking uuids might help. |
What about adding a
Does it seem like a reasonable compromise ? |
yes that seems good if that's not too much boilerplate to write, assuming that if a dashboard (or something consuming the data down the line) requires the 'extras' attributes it's stated clearly :) |
Nope, no trouble. Let's go for that |
Add the switch in configuration file Add the logic according to discussion on #200 Give a better name to the filter Update the doc
Add the switch in configuration file Add the logic according to discussion on #200 Give a better name to the filter Update the doc
bd5606c
to
3a7d787
Compare
done. I also renamed the filter, the name was not very explicit. And updated the doc |
Solves #195
Resolving the user and organisation information requires to intervene at a late stage, much later than the logging MDCWebFilter class (after ResolveGeorchestraUserGlobalFilter). Resolving the objects would also imply a circular dependency if implemented in the logging module. So, it seems to make more sense to implement it in the main geOrchestra gateway code.