Skip to content

Commit

Permalink
Make instance info args optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
umaannamalai committed Jul 31, 2023
1 parent 53f8400 commit 7687c06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions newrelic/api/datastore_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def create_node(self):
)


def DatastoreTraceWrapper(wrapped, product, target, operation, host, port_path_or_id, database_name):
def DatastoreTraceWrapper(wrapped, product, target, operation, host=None, port_path_or_id=None, database_name=None):
"""Wraps a method to time datastore queries.
:param wrapped: The function to apply the trace to.
Expand Down Expand Up @@ -242,7 +242,7 @@ def _nr_datastore_trace_wrapper_(wrapped, instance, args, kwargs):
return FunctionWrapper(wrapped, _nr_datastore_trace_wrapper_)


def datastore_trace(product, target, operation, host, port_path_or_id, database_name):
def datastore_trace(product, target, operation, host=None, port_path_or_id=None, database_name=None):
"""Decorator allows datastore query to be timed.
:param product: The name of the vendor.
Expand Down Expand Up @@ -287,7 +287,7 @@ def datastore_trace(product, target, operation, host, port_path_or_id, database_
)


def wrap_datastore_trace(module, object_path, product, target, operation, host, port_path_or_id, database_name):
def wrap_datastore_trace(module, object_path, product, target, operation, host=None, port_path_or_id=None, database_name=None):
"""Method applies custom timing to datastore query.
:param module: Module containing the method to be instrumented.
Expand Down

0 comments on commit 7687c06

Please sign in to comment.