skywalking/plugins/sw_psycopg.py [48:66]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            dsn = self.connection.info.get_parameters()
            port = self.connection.info.port
            peer = f"{dsn['host']}:{str(port)}"

            with get_context().new_exit_span(op='PostgreSQL/Psycopg/execute', peer=peer,
                                             component=Component.Psycopg) as span:
                span.layer = Layer.Database

                span.tag(TagDbType('PostgreSQL'))
                span.tag(TagDbInstance(dsn['dbname']))
                span.tag(TagDbStatement(query))

                if config.plugin_sql_parameters_max_length and vars is not None:
                    text = ','.join(str(v) for v in vars)

                    if len(text) > config.plugin_sql_parameters_max_length:
                        text = f'{text[:config.plugin_sql_parameters_max_length]}...'

                    span.tag(TagDbSqlParameters(f'[{text}]'))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



skywalking/plugins/sw_psycopg.py [163:181]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            dsn = self.connection.info.get_parameters()
            port = self.connection.info.port
            peer = f"{dsn['host']}:{str(port)}"

            with get_context().new_exit_span(op='PostgreSQL/Psycopg/execute', peer=peer,
                                             component=Component.Psycopg) as span:
                span.layer = Layer.Database

                span.tag(TagDbType('PostgreSQL'))
                span.tag(TagDbInstance(dsn['dbname']))
                span.tag(TagDbStatement(query))

                if config.plugin_sql_parameters_max_length and vars is not None:
                    text = ','.join(str(v) for v in vars)

                    if len(text) > config.plugin_sql_parameters_max_length:
                        text = f'{text[:config.plugin_sql_parameters_max_length]}...'

                    span.tag(TagDbSqlParameters(f'[{text}]'))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



