async def METHOD_NAME(self, method, resource, extra_tags, *args, **kwargs):
    pin = Pin.get_from(self)
    if not pin or not pin.enabled():
        result = await method(*args, **kwargs)
        return result
    service = pin.service
    with pin.tracer.trace(
        self._self_datadog_name, service=service, resource=resource, span_type=SpanTypes.SQL
    ) as s:
        s.set_tag_str(COMPONENT, config.aiomysql.integration_name)
        # set span.kind to the type of request being performed
        s.set_tag_str(SPAN_KIND, SpanKind.CLIENT)
        s.set_tag(SPAN_MEASURED_KEY)
        s.set_tag_str(sql.QUERY, resource)
        s.set_tags(pin.tags)
        s.set_tags(extra_tags)
        # set analytics sample rate
        s.set_tag(ANALYTICS_SAMPLE_RATE_KEY, config.aiomysql.get_analytics_sample_rate())
        try:
            result = await method(*args, **kwargs)
            return result
        finally:
            s.set_metric(db.ROWCOUNT, self.rowcount)
            s.set_metric("db.rownumber", self.rownumber)