-
Notifications
You must be signed in to change notification settings - Fork 28
feat(insight): add instrumentation config #210
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
feat(insight): add instrumentation config #210
Conversation
This also reworks our config class to use a root dataclass with nested dataclasses for each `insights_config` option set.
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.
Pull Request Overview
This PR adds per-integration instrumentation configuration to Honeybadger while reworking the core configuration to use nested dataclasses. Key changes include changes to config management across integrations (Django, Flask, ASGI, Celery, DB), updates to integration tests to verify new behavior, and revised documentation outlining the new configuration options.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
honeybadger/utils.py | Updated filter_dict logic to support optional removal of filter keys |
honeybadger/tests/* | Added tests to cover new configuration options and instrumentation scenarios |
honeybadger/contrib/* | Updated instrumentation for Flask, Django, ASGI, Celery, and DB to respect new config flags |
honeybadger/config.py and config_types.py | Reworked the configuration using dataclasses and improved validation of unknown keys |
README.md | Updated documentation with configuration examples for each integration |
dev-requirements.txt | Added dependency on sqlalchemy |
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.
Looking good!
Could this error be logged so the user (if they are paying attention) can see that an invalid configuration option was provided? |
We could do that. |
Also a nice little refactor on the Configuration internals.
This PR adds custom config per integration / component. Along with this I reworked
honeybadger.config
to lean on dataclasses. A few notes:Unknown Configuration option: blah
for the rootUnknown DBConfig option: include_stuff
for each invalid dataclassdb
contrib module, which means it has it's own config as well. That felt better than including db config in both django and flask config namespaces.