-
Notifications
You must be signed in to change notification settings - Fork 408
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(tracing): deprecate []
notation for DD_TRACE_METHODS
#8438
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 4 Passed, 348 Skipped, 24.85s Total duration (8m 18.74s time saved) |
…Dog/dd-trace-py into erikayasuda/dd_trace_methods_syntax
DD_TRACE_METHODS
syntax[]
notation for DD_TRACE_METHODS
[]
notation for DD_TRACE_METHODS
[]
notation for DD_TRACE_METHODS
[]
notation for DD_TRACE_METHODS
[]
notation for DD_TRACE_METHODS
…Dog/dd-trace-py into erikayasuda/dd_trace_methods_syntax
[]
notation for DD_TRACE_METHODS
[]
notation for DD_TRACE_METHODS
…Dog/dd-trace-py into erikayasuda/dd_trace_methods_syntax
Co-authored-by: Emmett Butler <723615+emmettbutler@users.noreply.github.com>
…Dog/dd-trace-py into erikayasuda/dd_trace_methods_syntax
@DataDog/apm-tees This change is the first step towards deprecating the legacy |
…Dog/dd-trace-py into erikayasuda/dd_trace_methods_syntax
🎉 |
Description
This PR deprecates the
[]
notation forDD_TRACE_METHODS
in favor of the:
notation.When customers tried to add
django_q
methods toDD_TRACE_METHODS
, calling__import__
during bootstrapping to figure out whether the provided method was a module or class method caused boostrapping errors. This is because modules likedjango_q
attempt to do configurations upon attempting to import, which we don't want happening during bootstrapping.The notation change for
DD_TRACE_METHODS
is primarily to help us distinguish between the legacy/deprecated and new semantics forDD_TRACE_METHODS
. With the deprecated semantics, we needed to guess what the base module was by importing, since only the method name is within the brackets even if it's actually a class method. With the new semantics, we are asking customers to include the class with the method name if it's a class method.Example:
Here we would attempt to
__import__(mymodule.mysubmodule.myclass)
, fail because the class is included, then re-attempt with__import__(mymodule.mysubmodule)
, which would succeed and indicate the base module is onlymymodule.mysubmodule
, and the functions are a class function calledmyclass.myfunc
andmyclass.otherfunc
.With the new semantics, this guess work would be taken out.
Here we know for sure the base module is just
mymodule.mysubmodule
, and the function names are also explicitly listed.Risks
This is a customer facing change, so respective updates to customer facing documentation are included. After the next major release, customers will be required to switch to the updated semantics.
Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.@DataDog/security-design-and-guidance
.Reviewer Checklist