Skip to content

Commit 59fa855

Browse files
Rm enable_commenter fixes for a different pr
1 parent b591b0a commit 59fa855

File tree

1 file changed

+1
-14
lines changed
  • instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2

1 file changed

+1
-14
lines changed

instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/__init__.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ def instrument_connection(
164164
self,
165165
connection,
166166
tracer_provider: typing.Optional[trace_api.TracerProvider] = None,
167-
enable_commenter: bool = False,
168-
commenter_options: dict = None,
169167
):
170168
if self._is_instrumented_by_opentelemetry:
171169
# _instrument (via BaseInstrumentor) or instrument_connection (this)
@@ -182,8 +180,6 @@ def instrument_connection(
182180
connection.cursor_factory = _new_cursor_factory(
183181
base_factory=connection.cursor_factory,
184182
tracer_provider=tracer_provider,
185-
enable_commenter=enable_commenter,
186-
commenter_options=commenter_options,
187183
)
188184
self._is_instrumented_by_opentelemetry = True
189185

@@ -240,23 +236,14 @@ def get_statement(self, cursor, args):
240236
return statement
241237

242238

243-
def _new_cursor_factory(
244-
db_api: dbapi.DatabaseApiIntegration = None,
245-
base_factory: pg_cursor = None,
246-
tracer_provider: typing.Optional[trace_api.TracerProvider] = None,
247-
enable_commenter: bool = False,
248-
commenter_options: dict = None,
249-
):
239+
def _new_cursor_factory(db_api=None, base_factory=None, tracer_provider=None):
250240
if not db_api:
251241
db_api = DatabaseApiIntegration(
252242
__name__,
253243
Psycopg2Instrumentor._DATABASE_SYSTEM,
254244
connection_attributes=Psycopg2Instrumentor._CONNECTION_ATTRIBUTES,
255245
version=__version__,
256246
tracer_provider=tracer_provider,
257-
enable_commenter=enable_commenter,
258-
commenter_options=commenter_options,
259-
connect_module=psycopg2,
260247
)
261248

262249
base_factory = base_factory or pg_cursor

0 commit comments

Comments
 (0)