Skip to content

Commit f381d68

Browse files
committed
fix merge conflict
2 parents 2529ced + 2884436 commit f381d68

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/langtrace_python_sdk/instrumentation/neo4j/patch.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737

3838
def driver_patch(operation_name, version, tracer):
3939
def traced_method(wrapped, instance, args, kwargs):
40-
40+
try:
41+
query = args[0].text if hasattr(args[0], "text") else args[0]
42+
query_text = json.dumps(query)
43+
except (AttributeError, TypeError):
44+
query_text = args[0]
4145
api = APIS[operation_name]
4246
service_provider = SERVICE_PROVIDERS.get("NEO4J", "neo4j")
4347
extra_attributes = baggage.get_baggage(LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY)
@@ -49,7 +53,11 @@ def traced_method(wrapped, instance, args, kwargs):
4953
"langtrace.version": v(LANGTRACE_SDK_NAME),
5054
"db.system": "neo4j",
5155
"db.operation": api["OPERATION"],
56+
<<<<<<< HEAD
5257
"db.query": json.dumps(args[0]) if args and len(args) > 0 else "",
58+
=======
59+
"db.query": query_text,
60+
>>>>>>> development
5361
**(extra_attributes if extra_attributes is not None else {}),
5462
}
5563

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.8.11"
1+
__version__ = "3.8.12"

0 commit comments

Comments
 (0)