def METHOD_NAME(self, span, level, msg, attrs):
    # type: (Span, str, str, Dict[str, Any]) -> None
    if not self._config.logs_enabled:
        return
    tags = self._logs_tags(span)
    METHOD_NAME = {
        "timestamp": time.time() * 1000,
        "message": msg,
        "hostname": get_hostname(),
        "ddsource": self._integration_name,
        "service": span.service or "",
        "status": level,
        "ddtags": tags,
    }
    if span is not None:
        METHOD_NAME["dd.trace_id"] = str(span.trace_id)
        METHOD_NAME["dd.span_id"] = str(span.span_id)
    METHOD_NAME.update(attrs)
    self._log_writer.enqueue(METHOD_NAME)