Skip to content

Commit

Permalink
Remove unnecessary instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed Jul 24, 2023
1 parent dde35d2 commit e07ffc3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
12 changes: 0 additions & 12 deletions newrelic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2269,18 +2269,6 @@ def _process_module_builtin_defaults():
"instrument_graphql_validate",
)

_process_module_definition(
"google.cloud.firestore_v1.base_document",
"newrelic.hooks.datastore_firestore",
"instrument_google_cloud_firestore_v1_base_document",
)

_process_module_definition(
"google.cloud.firestore_v1.base_collection",
"newrelic.hooks.datastore_firestore",
"instrument_google_cloud_firestore_v1_base_collection",
)

_process_module_definition(
"google.cloud.firestore_v1.document",
"newrelic.hooks.datastore_firestore",
Expand Down
28 changes: 0 additions & 28 deletions newrelic/hooks/datastore_firestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ def instrument_google_cloud_firestore_v1_base_client(module):
)


def instrument_google_cloud_firestore_v1_base_collection(module):
for name in _firestore_collection_commands:
if hasattr(module.BaseCollectionReference, name) and not getattr(getattr(module.BaseCollectionReference, name), "_nr_wrapped", False):
wrap_datastore_trace(
module, "BaseCollectionReference.%s" % name, product="Firestore", target=_get_object_id, operation=name
)
getattr(module.BaseCollectionReference, name)._nr_wrapped = True

for name in _firestore_collection_generator_commands:
if hasattr(module.BaseCollectionReference, name) and not getattr(getattr(module.BaseCollectionReference, name), "_nr_wrapped", False):
wrap_generator_method(module, "BaseCollectionReference", name)
getattr(module.BaseCollectionReference, name)._nr_wrapped = True


def instrument_google_cloud_firestore_v1_collection(module):
for name in _firestore_collection_commands:
if hasattr(module.CollectionReference, name) and not getattr(getattr(module.CollectionReference, name), "_nr_wrapped", False):
Expand All @@ -88,20 +74,6 @@ def instrument_google_cloud_firestore_v1_collection(module):
getattr(module.CollectionReference, name)._nr_wrapped = True


def instrument_google_cloud_firestore_v1_base_document(module):
for name in _firestore_document_commands:
if hasattr(module.BaseDocumentReference, name) and not getattr(getattr(module.BaseDocumentReference, name), "_nr_wrapped", False):
wrap_datastore_trace(
module, "BaseDocumentReference.%s" % name, product="Firestore", target=_get_object_id, operation=name
)
getattr(module.BaseDocumentReference, name)._nr_wrapped = True

for name in _firestore_document_generator_commands:
if hasattr(module.BaseDocumentReference, name) and not getattr(getattr(module.BaseDocumentReference, name), "_nr_wrapped", False):
wrap_generator_method(module, "BaseDocumentReference", name)
getattr(module.BaseDocumentReference, name)._nr_wrapped = True


def instrument_google_cloud_firestore_v1_document(module):
for name in _firestore_document_commands:
if hasattr(module.DocumentReference, name) and not getattr(getattr(module.DocumentReference, name), "_nr_wrapped", False):
Expand Down

0 comments on commit e07ffc3

Please sign in to comment.