26
26
_metadata_with_prefix ,
27
27
_metadata_with_leader_aware_routing ,
28
28
)
29
- from google .cloud .spanner_v1 ._opentelemetry_tracing import (
30
- add_event_on_current_span ,
31
- trace_call ,
32
- )
29
+ from google .cloud .spanner_v1 ._opentelemetry_tracing import trace_call
33
30
from google .cloud .spanner_v1 import RequestOptions
34
31
from google .cloud .spanner_v1 ._helpers import _retry
35
32
from google .cloud .spanner_v1 ._helpers import _check_rst_stream_error
@@ -73,10 +70,8 @@ def insert(self, table, columns, values):
73
70
:param values: Values to be modified.
74
71
"""
75
72
self ._mutations .append (Mutation (insert = _make_write_pb (table , columns , values )))
76
- add_event_on_current_span (
77
- "insert mutations added" ,
78
- dict (table = table , columns = columns ),
79
- )
73
+ # TODO: Decide if we should add a span event per mutation:
74
+ # https://github.com/googleapis/python-spanner/issues/1269
80
75
81
76
def update (self , table , columns , values ):
82
77
"""Update one or more existing table rows.
@@ -91,10 +86,8 @@ def update(self, table, columns, values):
91
86
:param values: Values to be modified.
92
87
"""
93
88
self ._mutations .append (Mutation (update = _make_write_pb (table , columns , values )))
94
- add_event_on_current_span (
95
- "update mutations added" ,
96
- dict (table = table , columns = columns ),
97
- )
89
+ # TODO: Decide if we should add a span event per mutation:
90
+ # https://github.com/googleapis/python-spanner/issues/1269
98
91
99
92
def insert_or_update (self , table , columns , values ):
100
93
"""Insert/update one or more table rows.
@@ -111,10 +104,8 @@ def insert_or_update(self, table, columns, values):
111
104
self ._mutations .append (
112
105
Mutation (insert_or_update = _make_write_pb (table , columns , values ))
113
106
)
114
- add_event_on_current_span (
115
- "insert_or_update mutations added" ,
116
- dict (table = table , columns = columns ),
117
- )
107
+ # TODO: Decide if we should add a span event per mutation:
108
+ # https://github.com/googleapis/python-spanner/issues/1269
118
109
119
110
def replace (self , table , columns , values ):
120
111
"""Replace one or more table rows.
@@ -129,10 +120,8 @@ def replace(self, table, columns, values):
129
120
:param values: Values to be modified.
130
121
"""
131
122
self ._mutations .append (Mutation (replace = _make_write_pb (table , columns , values )))
132
- add_event_on_current_span (
133
- "replace mutations added" ,
134
- dict (table = table , columns = columns ),
135
- )
123
+ # TODO: Decide if we should add a span event per mutation:
124
+ # https://github.com/googleapis/python-spanner/issues/1269
136
125
137
126
def delete (self , table , keyset ):
138
127
"""Delete one or more table rows.
@@ -145,10 +134,8 @@ def delete(self, table, keyset):
145
134
"""
146
135
delete = Mutation .Delete (table = table , key_set = keyset ._to_pb ())
147
136
self ._mutations .append (Mutation (delete = delete ))
148
- add_event_on_current_span (
149
- "delete mutations added" ,
150
- dict (table = table ),
151
- )
137
+ # TODO: Decide if we should add a span event per mutation:
138
+ # https://github.com/googleapis/python-spanner/issues/1269
152
139
153
140
154
141
class Batch (_BatchBase ):
0 commit comments