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

feat(tracer): support methods with the same name (ABCs) by including fully qualified name in v2 #1486

Conversation

leandrodamascena
Copy link
Contributor

Issue number: #1454

Summary

Changes

Please provide a summary of what's being changed

This change modifies the name of the range generated by the capture_method tracker. In some cases it is very difficult to identify which functions are added in XRay just using the function name, the reason for this is because a python function/file/system can use abstract methods/classes or even functions with the same name in different classes.

image

User experience

Please share what the user experience looks like before and after this change

Before to this change, the span name only used the function name:
image

After this change, the span name includes the module and Python qualified name (PEP 3155)

image

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena leandrodamascena requested a review from a team as a code owner August 31, 2022 00:11
@leandrodamascena leandrodamascena requested review from mploski and removed request for a team August 31, 2022 00:11
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 31, 2022
@github-actions github-actions bot added the feature New feature or functionality label Aug 31, 2022
@boring-cyborg boring-cyborg bot added the dependencies Pull requests that update a dependency file label Sep 5, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2022

Codecov Report

Merging #1486 (827aa46) into v2 (64513d9) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##               v2    #1486   +/-   ##
=======================================
  Coverage   99.57%   99.57%           
=======================================
  Files         125      125           
  Lines        5602     5602           
  Branches      653      653           
=======================================
  Hits         5578     5578           
  Misses         12       12           
  Partials       12       12           
Impacted Files Coverage Δ
aws_lambda_powertools/tracing/tracer.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@heitorlessa heitorlessa requested review from heitorlessa and removed request for mploski September 6, 2022 08:05
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

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

looks great!! Made a few comments to enhance maintenance.

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Sep 7, 2022
@heitorlessa
Copy link
Contributor

Looking...

@heitorlessa heitorlessa changed the title feat(tracer): improved Span operation names to include module and qualname feat(tracer): support methods with the same name (ABCs) by including fully qualified name in v2 Sep 8, 2022
@leandrodamascena leandrodamascena merged commit 3690943 into aws-powertools:v2 Sep 8, 2022
@leandrodamascena leandrodamascena deleted the feat/capture-method-span-name branch September 8, 2022 13:32
github-actions bot pushed a commit that referenced this pull request Sep 8, 2022
…fully qualified name in v2 (#1486)

Co-authored-by: Heitor Lessa <[email protected]>
Co-authored-by: Ruben Fonseca <[email protected]>
heitorlessa added a commit that referenced this pull request Sep 9, 2022
* develop:
  chore(deps-dev): bump aws-cdk-lib from 2.40.0 to 2.41.0 (#1507)
  update changelog with latest changes
  feat(tracer): support methods with the same name (ABCs) by including fully qualified name in v2 (#1486)
  chore(deps-dev): bump aws-cdk-aws-apigatewayv2-integrations-alpha from 2.39.1a0 to 2.40.0a0 (#1496)
  chore(deps-dev): bump mkdocs-material from 8.4.2 to 8.4.3 (#1504)
  chore(deps): bump pydantic from 1.10.1 to 1.10.2 (#1502)
  update changelog with latest changes
  feat(data-classes): add KafkaEvent and KafkaEventRecord (#1485)
  chore(deps-dev): bump pytest from 7.1.2 to 7.1.3 (#1497)
  update changelog with latest changes
  feat(event_handler): add cookies as 1st class citizen in v2 (#1487)
  chore(deps-dev): bump black from 22.6.0 to 22.8.0 (#1494)
  chore(deps-dev): bump aws-cdk-lib from 2.39.1 to 2.40.0 (#1495)
  chore(maintenance): add discord link to first PR and first issue (#1493)
  update changelog with latest changes
  refactor(batch): remove legacy sqs_batch_processor (#1492)
  chore(deps): bump pydantic from 1.10.0 to 1.10.1 (#1491)
  chore(deps-dev): bump flake8-variables-names from 0.0.4 to 0.0.5 (#1490)
Tankanow pushed a commit to Tankanow/aws-lambda-powertools-python that referenced this pull request Sep 13, 2022
…fully qualified name in v2 (aws-powertools#1486)

Co-authored-by: Heitor Lessa <[email protected]>
Co-authored-by: Ruben Fonseca <[email protected]>
Tankanow pushed a commit to Tankanow/aws-lambda-powertools-python that referenced this pull request Sep 13, 2022
…fully qualified name in v2 (aws-powertools#1486)

Co-authored-by: Heitor Lessa <[email protected]>
Co-authored-by: Ruben Fonseca <[email protected]>
rubenfonseca added a commit that referenced this pull request Sep 14, 2022
…fully qualified name in v2 (#1486)

Co-authored-by: Heitor Lessa <[email protected]>
Co-authored-by: Ruben Fonseca <[email protected]>
rubenfonseca added a commit that referenced this pull request Oct 14, 2022
…fully qualified name in v2 (#1486)

Co-authored-by: Heitor Lessa <[email protected]>
Co-authored-by: Ruben Fonseca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation feature New feature or functionality size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants