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

A draft for making a decision on managing logging configurations #28603

Closed
wants to merge 1 commit into from
Closed

A draft for making a decision on managing logging configurations #28603

wants to merge 1 commit into from

Conversation

ebberg
Copy link

@ebberg ebberg commented Aug 31, 2021

Description

This is a draft for an ADR, that has implications on logging configuration for the edx platform, and would affect the kinds of additional logging management in applications. This is of specific interest for devops/sre edx platform work -- in other words, "Developer" and "Operator" roles.

Supporting information

I'm new to making changes on the EdX Platform, and my references are the following. Apologies in advance if I've left out anything important in this initial draft.

I'm referencing:

Testing instructions

Verifying this change is implemented backwards-compatible with existing usages of log configuration is essential. Also essential for ergonomics: reasonable errors for malformed logging overrides.

Deadline

"Soon-ish," as log ingestion and analysis for priority projects might get blocked on this, hindering maintenance efforts.

Other information

It might be useful for me or others to add specific use cases for this change, with the understanding that the list of potential use cases might change over time.

Thank you

Thanks for your time in reading, happy to try out contributions to open edx software, and look forward to any discussion and feedback on this ADR.

@openedx-webhooks
Copy link

openedx-webhooks commented Aug 31, 2021

Thanks for the pull request, @ebberg! I've created OSPR-6006 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

⚠️ We can't start reviewing your pull request until you've submitted a signed contributor agreement or indicated your institutional affiliation. Please see the CONTRIBUTING file for more information. If you've signed an agreement in the past, you may need to re-sign. See The New Home of the Open edX Codebase for details.

@natabene
Copy link
Contributor

natabene commented Sep 2, 2021

@ebberg Thank you for the contribution! Once you have signed our Contributor Agreement and it has been processed, you will receive a confirmation via email from our Legal team. We then will be able to review this and all your future code contributions.

@pdpinch
Copy link
Contributor

pdpinch commented Sep 2, 2021 via email

@natabene
Copy link
Contributor

natabene commented Sep 3, 2021

@pdpinch Thank you for letting me know, could you please provide me with email address for @ebberg so I can update our contributor records?

@ghost
Copy link

ghost commented Sep 14, 2021

@natabene sure thing, it's: berge@mit.edu

@natabene
Copy link
Contributor

@ebberg Could you please also tell me your first and last name, so I can add you to our contributors list?

@nedbat nedbat removed the NEED-CLA label Sep 29, 2021
@nedbat nedbat changed the title A draft for making a decision on managing logging configurations A draft for making a decision on managing logging configurations Sep 29, 2021
Decision
========

Let us add an optional override dictionary to `get_logging_config`. This would
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you talking about setting a param to https://github.com/edx/edx-platform/blob/ac8b4f5a6dfdc4ccc6433aeae60d42f6aa341207/openedx/core/lib/logsettings.py#L13 that would allow us to replace the entire logger config dictionary? Thus allowing any operator to fully manage how logging is done on their deployment of edx-platform?

Copy link
Contributor

Choose a reason for hiding this comment

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

@ebberg checking back in on this. Trying to understand what piece you want to make overridable.

Copy link
Contributor

Choose a reason for hiding this comment

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

The general idea is to be able to support customizing the logging configuration by passing in configuration values. The specifics of the mechanism are still subject to debate and design work. For the time being we have written a plugin to override the LOGGING setting but it might be worth exploring how to support some measure of modification without having to resort to a plugin.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense, I agree that making the logging settings more configurable is valuable. I think we can go a bit further though and explore also making it easier to understand and explain.

It sounds like the current suggestion is to have more config settings that can be passed to the get_logger_config function that will allow for more flexibility?

implementations is less. But the initial comment to the implementation is worth
reproducing in full here:

Return the appropriate logging config dictionary. You should assign the
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite understand what this means. If say, common.py has set LOGGING and then we override that by pulling from a yaml file in production.py, what's the concern? What's the negative impact of resetting the LOGGING variable that I'm missing?

Decision
========

Let us add an optional override dictionary to `get_logging_config`. This would
Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense, I agree that making the logging settings more configurable is valuable. I think we can go a bit further though and explore also making it easier to understand and explain.

It sounds like the current suggestion is to have more config settings that can be passed to the get_logger_config function that will allow for more flexibility?

@natabene
Copy link
Contributor

@ebberg Happy 2022, I hope all is well. Just checking to see if you have time to implement feedback.

@pdpinch
Copy link
Contributor

pdpinch commented Feb 21, 2022

ebberg is not longer with MIT and we've decided to close this ADR PR for now. We might revisit it later.

@openedx-webhooks
Copy link

@ebberg Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

@natabene
Copy link
Contributor

@pdpinch Please make sure to offboard ebberg from TCRIL's list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U rejected
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants