def METHOD_NAME(self, event):
    context = {"library": {"name": "sentry", "version": self.version}}
    props = {
        "eventId": event.event_id,
        "transaction": event.get_tag("transaction") or "",
        "release": event.get_tag("sentry:release") or "",
        "level": event.get_tag("level") or "",
        "environment": event.get_tag("environment") or "",
    }
    if "sentry.interfaces.User" in event.interfaces:
        user = event.interfaces["sentry.interfaces.User"]
        if user.ip_address:
            context["ip"] = user.ip_address
        user_id = user.id
    else:
        user_id = None
    if "sentry.interfaces.Http" in event.interfaces:
        http = event.interfaces["sentry.interfaces.Http"]
        headers = http.headers
        if not isinstance(headers, dict):
            headers = dict(headers or ())
        context.update(
            {
                "userAgent": headers.get("User-Agent", ""),
                "page": {
                    "url": http.url,
                    "method": http.method,
                    "search": http.query_string or "",
                    "referrer": headers.get("Referer", ""),
                },
            }
        )
    if "sentry.interfaces.Exception" in event.interfaces:
        exc = event.interfaces["sentry.interfaces.Exception"].values[0]
        props.update({"exceptionType": exc.type})
    return {
        "context": context,
        "userId": user_id,
        "event": "Error Captured",
        "properties": props,
        "integration": {"name": "sentry", "version": self.version},
        "timestamp": event.datetime.isoformat() + "Z",
    }