Skip to content

Conversation

khpeet
Copy link

@khpeet khpeet commented May 7, 2025

This PR adds support for the Camunda Pyzeebe Module

  • Tracing and useful metadata collection for ZybeeClient functions
  • Tracing and useful metadata for ZybeeWorker decorators - @worker.task / @router.task

Need help with writing some tests for this instrumentation though

@khpeet khpeet requested a review from a team as a code owner May 7, 2025 20:31
@mergify mergify bot added the tests-failing Tests failing in CI. label May 7, 2025
@codecov-commenter
Copy link

codecov-commenter commented May 7, 2025

Codecov Report

Attention: Patch coverage is 63.41463% with 30 lines in your changes missing coverage. Please review.

Project coverage is 81.01%. Comparing base (0e8722c) to head (cfe9eff).
Report is 42 commits behind head on main.

Files with missing lines Patch % Lines
newrelic/hooks/external_pyzeebe.py 62.96% 11 Missing and 19 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1385      +/-   ##
==========================================
- Coverage   81.57%   81.01%   -0.56%     
==========================================
  Files         205      206       +1     
  Lines       23217    23346     +129     
  Branches     3670     3697      +27     
==========================================
- Hits        18939    18914      -25     
- Misses       3055     3168     +113     
- Partials     1223     1264      +41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khpeet khpeet marked this pull request as draft May 7, 2025 21:06
@mergify mergify bot removed the tests-failing Tests failing in CI. label May 8, 2025
@khpeet khpeet requested a review from umaannamalai May 28, 2025 17:56
@mergify mergify bot added the tests-failing Tests failing in CI. label May 28, 2025
@khpeet khpeet requested a review from umaannamalai June 18, 2025 13:56
@mergify mergify bot added the merge-conflicts Merge conflicts detected. label Jun 18, 2025
@khpeet khpeet requested a review from umaannamalai July 25, 2025 17:12
@hmstepanek hmstepanek self-requested a review August 26, 2025 19:12
@hmstepanek hmstepanek marked this pull request as ready for review August 26, 2025 23:29
Copy link
Contributor

@hmstepanek hmstepanek left a 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.

elif method_name == "deploy_resource":
resources = list(args)
if len(resources) == 1 and isinstance(resources[0], (list, tuple)):
resources = list(resources[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

For this one-just cast it to a list after the value comes back from the generic call.

Copy link
Author

Choose a reason for hiding this comment

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

@hmstepanek - do you mean to just remove the if check and simply:

        elif method_name == "deploy_resource":
            resources = list(args)
            if resources:
                trace._add_agent_attribute("zeebe.client.resourceCount", len(resources))
                if len(resources) == 1:
                    trace._add_agent_attribute("zeebe.client.resourceFile", str(resources[0]))

@khpeet khpeet requested a review from hmstepanek August 27, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-conflicts Merge conflicts detected. tests-failing Tests failing in CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants