Skip to content

Commit 82cf8a4

Browse files
authored
chore(tracing): remove test_span_finish_with_ancestors test (#15215)
## Description The API was deleted in #15212 ## Testing <!-- Describe your testing strategy or note what tests are included --> ## Risks <!-- Note any risks associated with this change, or "None" if no risks --> ## Additional Notes <!-- Any other information that would be helpful for reviewers -->
1 parent 75d837c commit 82cf8a4

File tree

1 file changed

+5
-1
lines changed
  • ddtrace/contrib/internal/ddtrace_api

1 file changed

+5
-1
lines changed

ddtrace/contrib/internal/ddtrace_api/patch.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
log = get_logger(__name__)
2424
T = TypeVar("T")
2525
_FN_PARAMS: Dict[str, List[str]] = dict()
26+
# for situations where the intended internal target doesn't have the same name
27+
# as the API method. one example is when a public ddtrace method gets internalized
28+
# in a major version
29+
_API_TO_IMPL_NAME: Dict[str, str] = {"finish_with_ancestors": "_finish_with_ancestors"}
2630

2731

2832
def _params_for_fn(wrapping_context: WrappingContext, instance: ddtrace_api._Stub, fn_name: str):
@@ -38,7 +42,7 @@ def _handle_return(self) -> None:
3842
fn_name = self.__frame__.f_code.co_name
3943
_call_on_real_instance(
4044
stub,
41-
fn_name,
45+
_API_TO_IMPL_NAME.get(fn_name, fn_name),
4246
self.get_local("retval"),
4347
**{param: self.get_local(param) for param in _params_for_fn(self, stub, fn_name) if param != "self"},
4448
)

0 commit comments

Comments
 (0)