-
Notifications
You must be signed in to change notification settings - Fork 27
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
Python SDK version 1.1 #263
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ridden during SDK development
…for all outstanding network calls to complete
…rocessing object, so it can be shared across multiple implementations (coming soon)
@domharrington @emilyskuo Gentle nudge on this PR, thanks! |
emilyskuo
approved these changes
Jul 3, 2021
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.
Looks good to me!
domharrington
pushed a commit
that referenced
this pull request
Apr 19, 2022
* style: fix linter errors in tests * docs: correct inline documentation for MetricsApiConfig class * refactor: move METRICS_API to MetricsApiConfig so that it can be overridden during SDK development * feat: add a logger for debugging * refactor: move submission code to its own file * feat: add timeout parameter * fix: remove unnecessary debugging statements * feat: when the process is exiting, send any queued requests and wait for all outstanding network calls to complete * refactor: move ALLOWED_HTTP_HOSTS enforcement into the core Metrics processing object, so it can be shared across multiple implementations (coming soon) * docs: clean up README.md and make sure all parameters are documented * feat: make it easier for users to override the new `timeout` parameter * release: bump version to 1.1.0 * Ignore .envrc files (sometimes used in Python development) * style: proper formatting with black
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧰 What's being changed?
This is mostly refactoring, code cleanup, and maintainability improvements, in preparation for larger changes coming later this week.
• Fix RM-1310: Improve our ability to debug the Python SDK by adding a logger and by creating a place to override the Metrics API URL (so ReadMe engineers can test against their local Metrics installation)
• Fix RM-1314: batching prevents the last few requests from reaching our server; the new
atexit_handler
function allows us to flush any remaining logs before the process shuts down.• Refactored the code for making the ReadMe API post; moved it to its own file.
• Added a timeout parameter for API calls, so that the client doesn't wait forever if the API is unresponsive.
I've also bumped the version to 1.1.0.
Roadmap for changes coming over the next few days:
• Version 1.1.0: this release, mostly refactoring and maintainability
• Version 1.2.0: add support for the new style of redacted fields—instead of disappearing from the payload entirely, they'll be sent as
[REDACTED]
, or for strings,[REDACTEDnn]
(nn = length of the redacted string)• Version 2.0.0: add new adapters for Flask and Django so that clients can call the grouping function from within their application context (instead of running in WSGI middleware), which will make this a lot more usable for more substantial applications.
🧪 Testing
Tested on a branch of the new metrics-test-python service, which I had written earlier this month.