-
Notifications
You must be signed in to change notification settings - Fork 127
Camunda Pyzeebe Instrumentation #1385
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1385 +/- ##
=======================================
Coverage 81.44% 81.44%
=======================================
Files 209 210 +1
Lines 23815 23889 +74
Branches 3753 3771 +18
=======================================
+ Hits 19396 19457 +61
- Misses 3159 3164 +5
- Partials 1260 1268 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Posting a partial review-ran out of time for today but I'll review the tests tomorrow.
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.
It looks like this PR needs to be rebased onto the latest main. It looks like there's also some missing coverage so we need to add some more tests for the following:
- For what was previously the if-statements at the top of the new hooks file (now they are calling that extract function) we need to add coverage for message_id under publish_message and resources under deploy_resource.
- The background task creation else clause is missing coverage.
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.
Ok, this looks really good now! I had one note about he resourceCount getting dropped and the only other thing I see in coverage now is we need a test to cover this line:
https://app.codecov.io/github/newrelic/newrelic-python-agent/commit/93d1520084d254e15c030b895972c73290856e9a#c9c66516ae9ada6bf1c147f9dda06069-R93
Basically create a test without a background_task decorator and expect no data present. There are examples of this in other instrumentation tests you can use as a reference.
resource = extract_agent_attribute_from_methods(args, {}, method_name, ("deploy_resource"), None, 0) | ||
if resource: | ||
try: | ||
trace._add_agent_attribute("zeebe.client.resourceFile", resource) |
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.
Aren't we missing a resourceCount here?
trace._add_agent_attribute("zeebe.client.resourceFile", resource) | |
trace._add_agent_attribute("zeebe.client.resourceFile", resource) | |
trace._add_agent_attribute("zeebe.client.resourceCount", len(list(args))) |
This PR adds support for the Camunda Pyzeebe Module
@worker.task
/@router.task
Need help with writing some tests for this instrumentation though